SSIZE_T for BSD/Solaris/LP64
    Michael Franz 
    mvfranz at gmail.com
       
    Wed Feb 18 17:52:57 PST 2009
    
    
  
Hi,
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
-0500
+++ 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
-#else
-#ifdef _LP64
+#if defined(_LP64) || defined(_ALLBSD_SOURCE)
 #define SSIZE_T ssize_t
 #else
 #define SSIZE_T int
 #endif
-#endif
 #ifdef __cplusplus
 extern "C" {
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/bsd-port-dev/attachments/20090218/87ee2f96/attachment.html 
    
    
More information about the bsd-port-dev
mailing list