One problem we are encountering with rxtx is libc5 versions of the jdk native
include files are not compiling clean with rxtx.  If anyone able to dig around
has the libc5 version installed we are interested in knowing if this is a 
problem with the libc5 jdk jni or rxtx.

The only think on the rxtx side I can think of is maybe the flags -ansi 
-D_POSIX_SOURCE -D_BSD_SOURCE could be causing problems with the jdk jni.  It
works fine on the glibc version.

This was not a problem with previous releases of the libc5 jdk/rxtx when I had
libc5 systems around.  There have been proposed changes to typedefs_md.h but 
I'm not convinced they are right.

Trent Jarvi
[EMAIL PROTECTED]
http://jarvi.ezlink.com/rxtx

[Typical problems....]
> gcc -I /usr/local/lib/rxtx-1.2-beta-1 -I 
/usr/local/lib/rxtx-1.2-beta-1/i586-pc-linux-gnulibc1 -I . -I 
/usr/local/lib/java/jdk1.1//include -I 
/usr/local/lib/java/jdk1.1//include/genunix/ -g -O2 -Wall -ansi -DTIMEOUT 
-DASYNC -D_POSIX_SOURCE -D_BSD_SOURCE -c -fPIC -DPIC ../src/SerialImp.c
> In file included from /usr/local/lib/java/jdk1.1//include/typedefs.h:18,
>                  from /usr/local/lib/java/jdk1.1//include/oobj.h:25,
>                  from /usr/local/lib/java/jdk1.1//include/StubPreamble.h:26,
>                  from ../src/SerialImp.c:24:
> /usr/local/lib/java/jdk1.1//include/genunix/typedefs_md.h:149: parse error 
before `a'
> In file included from /usr/local/lib/java/jdk1.1//include/oobj.h:25,
>                  from /usr/local/lib/java/jdk1.1//include/StubPreamble.h:26,
>                  from ../src/SerialImp.c:24:
> /usr/local/lib/java/jdk1.1//include/typedefs.h:31: parse error before 
`int64_t'
> /usr/local/lib/java/jdk1.1//include/typedefs.h:31: warning: no semicolon at 
end of struct or union
> /usr/local/lib/java/jdk1.1//include/typedefs.h:33: parse error before `}'

> /usr/local/lib/java/jdk1.1//include/typedefs.h:33: warning: data definition 
has no type or storage class
> In file included from /usr/local/lib/java/jdk1.1//include/StubPreamble.h:26,
>                  from ../src/SerialImp.c:24:
> /usr/local/lib/java/jdk1.1//include/oobj.h:55: parse error before `number'
> /usr/local/lib/java/jdk1.1//include/oobj.h:160: parse error before `int64_t'
> /usr/local/lib/java/jdk1.1//include/oobj.h:160: warning: no semicolon at end 
of struct or union
> /usr/local/lib/java/jdk1.1//include/oobj.h:161: warning: data definition has 
no type or storage class
> /usr/local/lib/java/jdk1.1//include/oobj.h:162: parse error before 
`ClassArrayOfLong'
> /usr/local/lib/java/jdk1.1//include/oobj.h:162: warning: data definition has 
no type or storage class
> 

[One solution provided by Robert Perry  This isnt the cleanest patch...]
--- typedefs_md.h       Fri Jan  1 15:30:40 1999
+++ typedefs_md.h.new   Fri Jan  1 15:29:27 1999
@@ -1,5 +1,5 @@
 /*
- * @(#)typedefs_md.h    1.32 97/06/25
+ * @(#)typedefs_md.h    1.31 97/01/23
  *
  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  *
@@ -17,7 +17,6 @@
  * THIS SOFTWARE OR ITS DERIVATIVES.  *
  * CopyrightVersion 1.1_beta
-
  *
  */

@@ -25,11 +24,6 @@
  * Solaris-dependent types for Green threads
  */

-/* sbb: Johan Vos, why isn't this #ifndef inside the solaris header guard? */
-#ifndef BITSPERCHAR
-#define BITSPERCHAR 8
-#endif
-
 #ifndef _SOLARIS_TYPES_MD_H_
 #define _SOLARIS_TYPES_MD_H_

@@ -37,57 +31,33 @@
 #include <sys/stat.h>
 #include "bool.h"

-#if defined(__alpha__)
-typedef unsigned long ptr_int;
-#define PTR_IS_64 1
-#define LONG_IS_64 1
-#else
+
 typedef unsigned int ptr_int;
 #define PTR_IS_32 1
-#endif

 /* don't redefine typedef's on Solaris 2.6 or Later */

-#if !defined(_ILP32) && !defined(_LP64)

-#ifndef _UINT64_T
-#define _UINT64_T
-#ifdef LONG_IS_64
-typedef unsigned long uint64_t;
-#else
-typedef unsigned long long uint64_t;

-#endif
-#define _UINT32_T
+typedef unsigned long long uint64_t;
 typedef unsigned int uint32_t;
-#if defined(__linux__)
 typedef unsigned int uint_t;
-#endif
-#endif

-#ifndef __BIT_TYPES_DEFINED__
-#ifdef (__i386__)
-/* that should get Linux, at least */
 #ifndef _INT64_T
 #define _INT64_T
-#ifdef LONG_IS_64
-typedef long int64_t;
-#else
 typedef long long int64_t;
-#endif
-#define _INT32_T
-typedef int int32_t;
-#if defined(__linux__)
-typdef int int_t;
-#endif
-#endif
-#endif /* i386 */
+
+/* typedef int int32_t; */
+
+typedef int int_t;
 #endif /* __BIT_TYPES_DEFINED__ */

 #endif  /* !defined(_ILP32) && !defined(_LP64) */

 #ifndef BITSPERCHAR
 #define BITSPERCHAR 8
+
+
 #endif

 /* use these macros when the compiler supports the long long type */
@@ -119,28 +89,12 @@
 #define IS_NAN(x) isnan(x)
 #endif

-
-/* On Intel these conversions have to be method calls and not typecasts.
-   See the win32 typedefs_md.h file */
-#if ((defined(i386) || defined (__i386)) && defined(__solaris__)) || 
defined(__powerpc__)
-
-extern int32_t float2l(float f);
-extern int32_t double2l(double d);
-extern int64_t float2ll(float f);
-extern int64_t double2ll(double d);
-
-#else /* not solaris x386 or linux powerpc*/
-
 #define float2l(f)      (f)
 #define double2l(f)     (f)
 #define float2ll(f)     ((int64_t) (f))
-
-#endif /* i386 */
-
-
 #define ll2float(a)     ((float) (a))
 #define ll2double(a)    ((double) (a))
+#define double2ll(f)    ((int64_t) (f))

 /* comparison operators */
 #define ll_ltz(ll)      ((ll)<0)
@@ -158,14 +112,8 @@

 extern void ll2str(int64_t a, char *s, char *limit);

-#if defined(ppc) || defined(__ppc__) || defined(__alpha__) || defined(__sparc__)
-#ifndef HAVE_ALIGNED_DOUBLES
+#if defined(ppc) || defined(__ppc__) || defined(__alpha__)
 #define HAVE_ALIGNED_DOUBLES
-#endif
-#ifndef HAVE_ALIGNED_LONGLONGS
 #define HAVE_ALIGNED_LONGLONGS
 #endif
-#endif
-
-#endif /* !_SOLARIS_TYPES_MD_H_ */

Reply via email to