aboutsummaryrefslogtreecommitdiff
path: root/libraries/rxtx/im-20090910.patch
blob: 757843570f058df99ff650f1012e83f63cac9b42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
? 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)
 	{