summaryrefslogtreecommitdiffstats
path: root/libraries/rxtx/im-20090910.patch
blob: 757843570f058df99ff650f1012e83f63cac9b42 (plain)
? im-20090910.patch
Index: I2CImp.c
===================================================================
RCS file: /var/cvs/cvsroot/rxtx-devel/src/Attic/I2CImp.c,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 I2CImp.c
--- I2CImp.c	26 Apr 2007 05:26:05 -0000	1.1.2.12
+++ I2CImp.c	10 Sep 2009 05:24:55 -0000
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
 |   RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
 |   RXTX is a native interface to serial ports in java.
-|   Copyright 1997-2007 by Trent Jarvi tjarvi@qbang.org and others who
+|   Copyright 1997-2009 by Trent Jarvi tjarvi@qbang.org and others who
 |   actually wrote it.  See individual source files for more information.
 |
 |   A copy of the LGPL v 2.1 may be found at
@@ -113,7 +113,9 @@ JNIEXPORT void JNICALL Java_gnu_io_I2CPo
 	)
 {
 #ifndef WIN32
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE) 
 	struct utsname name;
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 	/* This bit of code checks to see if there is a signal handler installed
 	   for SIGIO, and installs SIG_IGN if there is not.  This is necessary
 	   for the native threads jdk, but we don't want to do it with green
@@ -125,7 +127,7 @@ JNIEXPORT void JNICALL Java_gnu_io_I2CPo
 	sigaction( SIGIO, NULL, &handler );
 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
 #endif /* !__FreeBSD__ */
-#if defined(__linux__) 
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE) 
 	/* Lets let people who upgraded kernels know they may have problems */
 	if (uname (&name) == -1)
 	{
@@ -137,7 +139,7 @@ JNIEXPORT void JNICALL Java_gnu_io_I2CPo
 		fprintf(stderr, "\n\n\nRXTX WARNING:  This library was compiled to run with OS release %s and you are currently running OS release %s.  In some cases this can be a problem.  Try recompiling RXTX if you notice strange behavior.  If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release);
 		getchar();
 	}
-#endif /* __linux__ */
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 #endif /* WIN32 */
 }
 
Index: RS485Imp.c
===================================================================
RCS file: /var/cvs/cvsroot/rxtx-devel/src/Attic/RS485Imp.c,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 RS485Imp.c
--- RS485Imp.c	26 Apr 2007 05:26:05 -0000	1.1.2.12
+++ RS485Imp.c	10 Sep 2009 05:24:55 -0000
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
 |   RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
 |   RXTX is a native interface to serial ports in java.
-|   Copyright 1997-2007 by Trent Jarvi tjarvi@qbang.org and others who
+|   Copyright 1997-2009 by Trent Jarvi tjarvi@qbang.org and others who
 |   actually wrote it.  See individual source files for more information.
 |
 |   A copy of the LGPL v 2.1 may be found at
@@ -113,7 +113,9 @@ JNIEXPORT void JNICALL Java_gnu_io_RS485
 	)
 {
 #ifndef WIN32
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE) 
 	struct utsname name;
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 	/* This bit of code checks to see if there is a signal handler installed
 	   for SIGIO, and installs SIG_IGN if there is not.  This is necessary
 	   for the native threads jdk, but we don't want to do it with green
@@ -125,7 +127,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RS485
 	sigaction( SIGIO, NULL, &handler );
 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
 #endif /* !__FreeBSD__ */
-#if defined(__linux__) 
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE) 
 	/* Lets let people who upgraded kernels know they may have problems */
 	if (uname (&name) == -1)
 	{
@@ -137,7 +139,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RS485
 		fprintf(stderr, "\n\n\nRXTX WARNING:  This library was compiled to run with OS release %s and you are currently running OS release %s.  In some cases this can be a problem.  Try recompiling RXTX if you notice strange behavior.  If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release);
 		getchar();
 	}
-#endif /* __linux__ */
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 #endif /* WIN32 */
 }
 
Index: RawImp.c
===================================================================
RCS file: /var/cvs/cvsroot/rxtx-devel/src/Attic/RawImp.c,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 RawImp.c
--- RawImp.c	18 Nov 2007 22:32:42 -0000	1.1.2.12
+++ RawImp.c	10 Sep 2009 05:24:55 -0000
@@ -6,7 +6,7 @@
 /*-------------------------------------------------------------------------
 |   RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
 |   RXTX is a native interface to serial ports in java.
-|   Copyright 1997-2007 by Trent Jarvi tjarvi@qbang.org and others who
+|   Copyright 1997-2009 by Trent Jarvi tjarvi@qbang.org and others who
 |   actually wrote it.  See individual source files for more information.
 |
 |   A copy of the LGPL v 2.1 may be found at
@@ -258,7 +258,9 @@ JNIEXPORT void JNICALL Java_gnu_io_RawPo
 	)
 {
 #ifndef WIN32
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE) 
 	struct utsname name;
+#endif /* DEBUG && __linux__ && UTS_RELEASE */	
 	/* This bit of code checks to see if there is a signal handler installed
 	   for SIGIO, and installs SIG_IGN if there is not.  This is necessary
 	   for the native threads jdk, but we don't want to do it with green
@@ -270,7 +272,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RawPo
 	sigaction( SIGIO, NULL, &handler );
 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
 #endif /* !__FreeBSD__ */
-#if defined(__linux__) 
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE) 
 	/* Lets let people who upgraded kernels know they may have problems */
 	if (uname (&name) == -1)
 	{
@@ -282,7 +284,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RawPo
 		fprintf(stderr, "\n\n\nRXTX WARNING:  This library was compiled to run with OS release %s and you are currently running OS release %s.  In some cases this can be a problem.  Try recompiling RXTX if you notice strange behavior.  If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release);
 		getchar();
 	}
-#endif /* __linux__ */
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 #endif /* WIN32 */
 }
 
Index: SerialImp.c
===================================================================
RCS file: /var/cvs/cvsroot/rxtx-devel/src/SerialImp.c,v
retrieving revision 1.46.2.204
diff -u -p -r1.46.2.204 SerialImp.c
--- SerialImp.c	10 Sep 2009 05:04:21 -0000	1.46.2.204
+++ SerialImp.c	10 Sep 2009 05:24:56 -0000
@@ -279,10 +279,10 @@ JNIEXPORT void JNICALL RXTXPort(Initiali
 	jclass jclazz
 	)
 {
-#if defined DEBUG && defined(__linux__)
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE)
 	struct utsname name;
 	char message[80];
-#endif /* DEBUG && __linux__ */
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 	/* This bit of code checks to see if there is a signal handler installed
 	   for SIGIO, and installs SIG_IGN if there is not.  This is necessary
 	   for the native threads jdk, but we don't want to do it with green
@@ -318,7 +318,7 @@ JNIEXPORT void JNICALL RXTXPort(Initiali
 #if DEBUG_TIMING
 	gettimeofday(&seloop, NULL);
 #endif /* DEBUG_TIMING */
-#if defined(DEBUG) && defined(__linux__)
+#if defined(DEBUG) && defined(__linux__) && defined(UTS_RELEASE)
 	/* Lets let people who upgraded kernels know they may have problems */
 	if (uname (&name) == -1)
 	{
@@ -334,7 +334,7 @@ JNIEXPORT void JNICALL RXTXPort(Initiali
 		getchar();
 	}
 	LEAVE( "RXTXPort:Initialize" );
-#endif /* DEBUG && __linux__ */
+#endif /* DEBUG && __linux__ && UTS_RELEASE */
 }
 
 /*----------------------------------------------------------
Index: SerialImp.cpp
===================================================================
RCS file: /var/cvs/cvsroot/rxtx-devel/src/SerialImp.cpp,v
retrieving revision 1.1.2.10
diff -u -p -r1.1.2.10 SerialImp.cpp
--- SerialImp.cpp	26 Apr 2007 05:26:06 -0000	1.1.2.10
+++ SerialImp.cpp	10 Sep 2009 05:24:57 -0000
@@ -1,7 +1,7 @@
 /*-------------------------------------------------------------------------
 |   RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
 |   RXTX is a native interface to serial ports in java.
-|   Copyright 1997-2007 by Trent Jarvi tjarvi@qbang.org and others who
+|   Copyright 1997-2009 by Trent Jarvi tjarvi@qbang.org and others who
 |   actually wrote it.  See individual source files for more information.
 |
 |   A copy of the LGPL v 2.1 may be found at
@@ -126,7 +126,7 @@ JNIEXPORT void JNICALL RXTXPort(Initiali
 
 #ifndef WIN32
 #ifndef __BEOS__
-#ifdef DEBUG
+#if defined(DEBUG) && defined (UTS_RELEASE)
 	struct utsname name;
 #endif
 	/* This bit of code checks to see if there is a signal handler installed
@@ -140,7 +140,7 @@ JNIEXPORT void JNICALL RXTXPort(Initiali
 	sigaction( SIGIO, NULL, &handler );
 	if( !handler.sa_handler ) signal( SIGIO, SIG_IGN );
 #endif /* !__FreeBSD__ */
-#ifdef DEBUG
+#if defined(DEBUG) && defined (UTS_RELEASE)
 	/* Lets let people who upgraded kernels know they may have problems */
 	if (uname (&name) == -1)
 	{