SSIZE_T for BSD/Solaris/LP64

Michael Franz mvfranz at
Wed Feb 18 17:52:57 PST 2009


The comments in jdk/src/share/hpi/include/hpi_impl.h about ssize_t and
darwin indicate that there is a conflict with the definition of ssize_t.
The icedtea project patches
jdk/src/solaris/hpi/native_threads/src/sys_api_td.c to use SSIZE_T instead
of ssize_t.  SSIZE_T is then either defined as ssize_t or int.  I think this
will work for BSD if we apply the following patch to
jdk/src/share/hpi/export/hpi.h .  We may also be able to clean up the code
in jdk/src/share/hpi/include/hpi_impl.h

--- jdk/src/share/hpi/export/hpi.h.orig    2009-02-16 22:48:01.000000000
+++ jdk/src/share/hpi/export/hpi.h    2009-02-16 23:16:45.000000000 -0500
@@ -39,15 +39,11 @@
 #include "hpi_md.h"
 #include "dll.h"

-#ifdef __solaris__
-#define SSIZE_T ssize_t
-#ifdef _LP64
+#if defined(_LP64) || defined(_ALLBSD_SOURCE)
 #define SSIZE_T ssize_t
 #define SSIZE_T int

 #ifdef __cplusplus
 extern "C" {

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the bsd-port-dev mailing list