Gentoo Archives: gentoo-commits

From: "Ned Ludd (solar)" <solar@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/uclibc/0.9.30: 68_all_uClibc-0.9.29-fix-fget_putc.diff
Date: Tue, 23 Sep 2008 20:16:41
Message-Id: E1KiEJI-0001aq-U3@stork.gentoo.org
1 solar 08/09/23 20:16:36
2
3 Added: 68_all_uClibc-0.9.29-fix-fget_putc.diff
4 Log:
5 - And this *.diff file also
6
7 Revision Changes Path
8 1.1 src/patchsets/uclibc/0.9.30/68_all_uClibc-0.9.29-fix-fget_putc.diff
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.30/68_all_uClibc-0.9.29-fix-fget_putc.diff?rev=1.1&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.30/68_all_uClibc-0.9.29-fix-fget_putc.diff?rev=1.1&content-type=text/plain
12
13 Index: 68_all_uClibc-0.9.29-fix-fget_putc.diff
14 ===================================================================
15 diff -ur uClibc-0.9.29/libc/inet/rpc/rcmd.c uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c
16 --- uClibc-0.9.29/libc/inet/rpc/rcmd.c 2007-01-10 11:46:19.000000000 -0600
17 +++ uClibc-0.9.29-patched/libc/inet/rpc/rcmd.c 2007-05-09 18:05:21.638421151 -0500
18 @@ -126,7 +126,7 @@
19 libc_hidden_proto(listen)
20 libc_hidden_proto(sigsetmask)
21 libc_hidden_proto(getc_unlocked)
22 -libc_hidden_proto(__fgetc_unlocked)
23 +//libc_hidden_proto(fgetc_unlocked)
24 libc_hidden_proto(fopen)
25 libc_hidden_proto(fclose)
26 libc_hidden_proto(fprintf)
27 diff -ur uClibc-0.9.29/libc/inet/rpc/ruserpass.c uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c
28 --- uClibc-0.9.29/libc/inet/rpc/ruserpass.c 2006-03-23 05:14:16.000000000 -0600
29 +++ uClibc-0.9.29-patched/libc/inet/rpc/ruserpass.c 2007-05-09 18:05:21.638421151 -0500
30 @@ -63,7 +63,7 @@
31 libc_hidden_proto(fopen)
32 libc_hidden_proto(fclose)
33 libc_hidden_proto(getc_unlocked)
34 -libc_hidden_proto(__fgetc_unlocked)
35 +//libc_hidden_proto(__fgetc_unlocked)
36
37 #define _(X) (X)
38 /* #include "ftp_var.h" */
39 diff -ur uClibc-0.9.29/libc/misc/error/error.c uClibc-0.9.29-patched/libc/misc/error/error.c
40 --- uClibc-0.9.29/libc/misc/error/error.c 2006-05-04 09:44:13.000000000 -0500
41 +++ uClibc-0.9.29-patched/libc/misc/error/error.c 2007-05-09 18:05:21.646421810 -0500
42 @@ -30,11 +30,14 @@
43 libc_hidden_proto(strerror)
44 libc_hidden_proto(fprintf)
45 libc_hidden_proto(exit)
46 +//#undef putc
47 libc_hidden_proto(putc)
48 +libc_hidden_proto(fputc)
49 libc_hidden_proto(vfprintf)
50 libc_hidden_proto(fflush)
51 -libc_hidden_proto(fputc)
52 -libc_hidden_proto(__fputc_unlocked)
53 +//#ifdef __UCLIBC_HAS_STDIO_PUTC_MACRO__
54 +libc_hidden_proto(fputc_unlocked)
55 +//#endif
56
57 /* This variable is incremented each time `error' is called. */
58 unsigned int error_message_count = 0;
59 diff -ur uClibc-0.9.29/libc/misc/ttyent/getttyent.c uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c
60 --- uClibc-0.9.29/libc/misc/ttyent/getttyent.c 2006-12-07 17:24:02.000000000 -0600
61 +++ uClibc-0.9.29-patched/libc/misc/ttyent/getttyent.c 2007-05-09 18:05:21.646421810 -0500
62 @@ -44,8 +44,10 @@
63 libc_hidden_proto(__fsetlocking)
64 libc_hidden_proto(rewind)
65 libc_hidden_proto(fgets_unlocked)
66 +//#undef getc_unlocked
67 libc_hidden_proto(getc_unlocked)
68 -libc_hidden_proto(__fgetc_unlocked)
69 +//#undef fgetc_unlocked
70 +libc_hidden_proto(fgetc_unlocked)
71 libc_hidden_proto(fopen)
72 libc_hidden_proto(fclose)
73 libc_hidden_proto(abort)
74 diff -ur uClibc-0.9.29/libc/pwd_grp/pwd_grp.c uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c
75 --- uClibc-0.9.29/libc/pwd_grp/pwd_grp.c 2007-04-13 03:32:18.000000000 -0500
76 +++ uClibc-0.9.29-patched/libc/pwd_grp/pwd_grp.c 2007-05-09 18:05:21.638421151 -0500
77 @@ -43,11 +43,12 @@
78 libc_hidden_proto(strtoul)
79 libc_hidden_proto(rewind)
80 libc_hidden_proto(fgets_unlocked)
81 -libc_hidden_proto(__fputc_unlocked)
82 libc_hidden_proto(sprintf)
83 libc_hidden_proto(fopen)
84 libc_hidden_proto(fclose)
85 libc_hidden_proto(fprintf)
86 +//#undef fputc_unlocked
87 +libc_hidden_proto(fputc_unlocked)
88 #ifdef __UCLIBC_HAS_XLOCALE__
89 libc_hidden_proto(__ctype_b_loc)
90 #elif __UCLIBC_HAS_CTYPE_TABLES__
91 @@ -801,7 +802,7 @@
92
93 do {
94 if (!*m) {
95 - if (__fputc_unlocked('\n', f) >= 0) {
96 + if (fputc_unlocked('\n', f) >= 0) {
97 rv = 0;
98 }
99 break;
100 @@ -867,7 +868,7 @@
101 goto DO_UNLOCK;
102 }
103
104 - if (__fputc_unlocked('\n', stream) > 0) {
105 + if (fputc_unlocked('\n', stream) > 0) {
106 rv = 0;
107 }
108
109 diff -ur uClibc-0.9.29/libc/stdio/_scanf.c uClibc-0.9.29-patched/libc/stdio/_scanf.c
110 --- uClibc-0.9.29/libc/stdio/_scanf.c 2007-01-20 12:32:10.000000000 -0600
111 +++ uClibc-0.9.29-patched/libc/stdio/_scanf.c 2007-05-09 18:05:21.642421481 -0500
112 @@ -86,7 +86,8 @@
113 libc_hidden_proto(vsscanf)
114 libc_hidden_proto(fclose)
115 libc_hidden_proto(getc_unlocked)
116 -libc_hidden_proto(__fgetc_unlocked)
117 +//#undef fgetc_unlocked
118 +libc_hidden_proto(fgetc_unlocked)
119 #ifdef __UCLIBC_HAS_WCHAR__
120 libc_hidden_proto(wcslen)
121 libc_hidden_proto(vfwscanf)
122 diff -ur uClibc-0.9.29/libc/stdio/fgetc.c uClibc-0.9.29-patched/libc/stdio/fgetc.c
123 --- uClibc-0.9.29/libc/stdio/fgetc.c 2006-01-15 16:41:03.000000000 -0600
124 +++ uClibc-0.9.29-patched/libc/stdio/fgetc.c 2007-05-09 18:05:21.642421481 -0500
125 @@ -13,13 +13,13 @@
126 #undef getc
127 #undef getc_unlocked
128
129 -libc_hidden_proto(__fgetc_unlocked)
130 +libc_hidden_proto(fgetc_unlocked)
131
132 #ifdef __DO_UNLOCKED
133
134 libc_hidden_proto(fflush_unlocked)
135
136 -int __fgetc_unlocked(FILE *stream)
137 +int fgetc_unlocked(FILE *stream)
138 {
139 __STDIO_STREAM_VALIDATE(stream);
140
141 @@ -73,26 +73,22 @@
142
143 return EOF;
144 }
145 -libc_hidden_def(__fgetc_unlocked)
146 -
147 -libc_hidden_proto(fgetc_unlocked)
148 -strong_alias(__fgetc_unlocked,fgetc_unlocked)
149 libc_hidden_def(fgetc_unlocked)
150
151 //libc_hidden_proto(__getc_unlocked)
152 -//strong_alias(__fgetc_unlocked,__getc_unlocked)
153 +//strong_alias(fgetc_unlocked,__getc_unlocked)
154 //libc_hidden_def(__getc_unlocked)
155
156 libc_hidden_proto(getc_unlocked)
157 -strong_alias(__fgetc_unlocked,getc_unlocked)
158 +strong_alias(fgetc_unlocked,getc_unlocked)
159 libc_hidden_def(getc_unlocked)
160
161 #ifndef __UCLIBC_HAS_THREADS__
162 libc_hidden_proto(fgetc)
163 -strong_alias(__fgetc_unlocked,fgetc)
164 +strong_alias(fgetc_unlocked,fgetc)
165 libc_hidden_def(fgetc)
166
167 -strong_alias(__fgetc_unlocked,getc)
168 +strong_alias(fgetc_unlocked,getc)
169 #endif
170
171 #elif defined __UCLIBC_HAS_THREADS__
172 diff -ur uClibc-0.9.29/libc/stdio/fgets.c uClibc-0.9.29-patched/libc/stdio/fgets.c
173 --- uClibc-0.9.29/libc/stdio/fgets.c 2006-01-15 16:41:03.000000000 -0600
174 +++ uClibc-0.9.29-patched/libc/stdio/fgets.c 2007-05-09 18:05:21.638421151 -0500
175 @@ -10,8 +10,7 @@
176 libc_hidden_proto(fgets_unlocked)
177
178 #ifdef __DO_UNLOCKED
179 -
180 -libc_hidden_proto(__fgetc_unlocked)
181 +libc_hidden_proto(fgetc_unlocked)
182
183 char *fgets_unlocked(char *__restrict s, int n,
184 register FILE * __restrict stream)
185 @@ -38,7 +37,7 @@
186 break;
187 }
188 } else {
189 - if ((c = __fgetc_unlocked(stream)) == EOF) {
190 + if ((c = fgetc_unlocked(stream)) == EOF) {
191 if (__FERROR_UNLOCKED(stream)) {
192 goto ERROR;
193 }
194 diff -ur uClibc-0.9.29/libc/stdio/fputc.c uClibc-0.9.29-patched/libc/stdio/fputc.c
195 --- uClibc-0.9.29/libc/stdio/fputc.c 2007-04-14 12:03:18.000000000 -0500
196 +++ uClibc-0.9.29-patched/libc/stdio/fputc.c 2007-05-09 20:50:51.350629927 -0500
197 @@ -12,11 +12,11 @@
198 #undef putc
199 #undef putc_unlocked
200
201 -libc_hidden_proto(__fputc_unlocked)
202 +libc_hidden_proto(fputc_unlocked)
203
204 #ifdef __DO_UNLOCKED
205
206 -int __fputc_unlocked(int c, register FILE *stream)
207 +int fputc_unlocked(int c, register FILE *stream)
208 {
209 __STDIO_STREAM_VALIDATE(stream);
210
211 @@ -70,24 +70,24 @@
212 BAD:
213 return EOF;
214 }
215 -libc_hidden_def(__fputc_unlocked)
216 +libc_hidden_def(fputc_unlocked)
217
218 /* exposing these would be fundamentally *wrong*! fix you, instead! */
219 /* libc_hidden_proto(fputc_unlocked) */
220 -strong_alias(__fputc_unlocked,fputc_unlocked)
221 +/* strong_alias(__fputc_unlocked,fputc_unlocked) */
222 /* exposing these would be fundamentally *wrong*! fix you, instead! */
223 /* libc_hidden_def(fputc_unlocked) */
224
225 libc_hidden_proto(putc_unlocked)
226 -strong_alias(__fputc_unlocked,putc_unlocked)
227 +strong_alias(fputc_unlocked,putc_unlocked)
228 libc_hidden_def(putc_unlocked)
229 #ifndef __UCLIBC_HAS_THREADS__
230 libc_hidden_proto(fputc)
231 -strong_alias(__fputc_unlocked,fputc)
232 +strong_alias(fputc_unlocked,fputc)
233 libc_hidden_def(fputc)
234
235 libc_hidden_proto(putc)
236 -strong_alias(__fputc_unlocked,putc)
237 +strong_alias(fputc_unlocked,putc)
238 libc_hidden_def(putc)
239 #endif
240
241 diff -ur uClibc-0.9.29/libc/stdio/getchar.c uClibc-0.9.29-patched/libc/stdio/getchar.c
242 --- uClibc-0.9.29/libc/stdio/getchar.c 2006-12-19 22:30:25.000000000 -0600
243 +++ uClibc-0.9.29-patched/libc/stdio/getchar.c 2007-05-09 18:05:21.642421481 -0500
244 @@ -7,7 +7,8 @@
245
246 #include "_stdio.h"
247
248 -libc_hidden_proto(__fgetc_unlocked)
249 +//#undef fgetc_unlocked
250 +libc_hidden_proto(fgetc_unlocked)
251
252 #undef getchar
253 #ifdef __DO_UNLOCKED
254 diff -ur uClibc-0.9.29/libc/stdio/getdelim.c uClibc-0.9.29-patched/libc/stdio/getdelim.c
255 --- uClibc-0.9.29/libc/stdio/getdelim.c 2006-02-13 02:52:46.000000000 -0600
256 +++ uClibc-0.9.29-patched/libc/stdio/getdelim.c 2007-05-09 18:05:21.642421481 -0500
257 @@ -11,8 +11,8 @@
258 #include "_stdio.h"
259
260 libc_hidden_proto(getdelim)
261 -
262 -libc_hidden_proto(__fgetc_unlocked)
263 +//#undef fgetc_unlocked
264 +libc_hidden_proto(fgetc_unlocked)
265
266 /* Note: There is a defect in this function. (size_t vs ssize_t). */
267
268 diff -ur uClibc-0.9.29/libc/stdio/old_vfprintf.c uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c
269 --- uClibc-0.9.29/libc/stdio/old_vfprintf.c 2006-01-22 13:35:08.000000000 -0600
270 +++ uClibc-0.9.29-patched/libc/stdio/old_vfprintf.c 2007-05-09 18:05:21.642421481 -0500
271 @@ -149,7 +149,8 @@
272 libc_hidden_proto(strnlen)
273 libc_hidden_proto(memcpy)
274 libc_hidden_proto(putc_unlocked)
275 -libc_hidden_proto(__fputc_unlocked)
276 +//#undef fputc_unlocked
277 +libc_hidden_proto(fputc_unlocked)
278 libc_hidden_proto(__glibc_strerror_r)
279
280 /* #undef __UCLIBC_HAS_FLOATS__ */
281 diff -ur uClibc-0.9.29/libc/stdio/putchar.c uClibc-0.9.29-patched/libc/stdio/putchar.c
282 --- uClibc-0.9.29/libc/stdio/putchar.c 2006-01-13 18:58:03.000000000 -0600
283 +++ uClibc-0.9.29-patched/libc/stdio/putchar.c 2007-05-09 18:05:21.642421481 -0500
284 @@ -7,7 +7,8 @@
285
286 #include "_stdio.h"
287
288 -libc_hidden_proto(__fputc_unlocked)
289 +//#undef fputc_unlocked
290 +libc_hidden_proto(fputc_unlocked)
291
292 #undef putchar
293 #ifdef __DO_UNLOCKED
294 diff -ur uClibc-0.9.29/libc/stdio/puts.c uClibc-0.9.29-patched/libc/stdio/puts.c
295 --- uClibc-0.9.29/libc/stdio/puts.c 2006-01-13 18:58:03.000000000 -0600
296 +++ uClibc-0.9.29-patched/libc/stdio/puts.c 2007-05-09 18:05:21.642421481 -0500
297 @@ -7,7 +7,8 @@
298
299 #include "_stdio.h"
300
301 -libc_hidden_proto(__fputc_unlocked)
302 +//#undef fputc_unlocked
303 +libc_hidden_proto(fputc_unlocked)
304 libc_hidden_proto(fputs_unlocked)
305
306 int puts(register const char * __restrict s)
307 @@ -25,7 +26,7 @@
308 /* Note: Nonportable as fputs need only return nonnegative on success. */
309 if ((n = fputs_unlocked(s, stream)) != EOF) {
310 ++n;
311 - if (__fputc_unlocked('\n', stream) == EOF) {
312 + if (fputc_unlocked('\n', stream) == EOF) {
313 n = EOF;
314 }
315 }
316 diff -ur uClibc-0.9.29/libc/stdio/putwchar.c uClibc-0.9.29-patched/libc/stdio/putwchar.c
317 --- uClibc-0.9.29/libc/stdio/putwchar.c 2006-01-14 14:16:19.000000000 -0600
318 +++ uClibc-0.9.29-patched/libc/stdio/putwchar.c 2007-05-09 18:05:21.642421481 -0500
319 @@ -22,7 +22,8 @@
320
321 #elif defined __UCLIBC_HAS_THREADS__
322
323 -libc_hidden_proto(__fputc_unlocked)
324 +//#undef fputc_unlocked
325 +libc_hidden_proto(fputc_unlocked)
326 /* psm: should this be fputwc? */
327 libc_hidden_proto(fputc)
328
329 diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h
330 --- uClibc-0.9.29/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-01-28 07:16:58.000000000 -0600
331 +++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/bits/uClibc_stdio.h 2007-05-09 20:56:02.408110608 -0500
332 @@ -381,33 +381,29 @@
333 # define __FEOF(__stream) __FEOF_UNLOCKED(__stream)
334 #endif
335
336 -extern int __fgetc_unlocked(FILE *__stream);
337 -extern int __fputc_unlocked(int __c, FILE *__stream);
338 -
339 /* First define the default definitions.
340 They are overridden below as necessary. */
341 -#define __FGETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
342 +#define __FGETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream))
343 #define __FGETC(__stream) (fgetc)((__stream))
344 -#define __GETC_UNLOCKED_MACRO(__stream) (__fgetc_unlocked)((__stream))
345 -#define __GETC_UNLOCKED(__stream) (__fgetc_unlocked)((__stream))
346 +#define __GETC_UNLOCKED_MACRO(__stream) (fgetc_unlocked)((__stream))
347 +#define __GETC_UNLOCKED(__stream) (fgetc_unlocked)((__stream))
348 #define __GETC(__stream) (fgetc)((__stream))
349
350 -#define __FPUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream))
351 +#define __FPUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream))
352 #define __FPUTC(__c, __stream) (fputc)((__c),(__stream))
353 -#define __PUTC_UNLOCKED_MACRO(__c, __stream) (__fputc_unlocked)((__c),(__stream))
354 -#define __PUTC_UNLOCKED(__c, __stream) (__fputc_unlocked)((__c),(__stream))
355 +#define __PUTC_UNLOCKED_MACRO(__c, __stream) (fputc_unlocked)((__c),(__stream))
356 +#define __PUTC_UNLOCKED(__c, __stream) (fputc_unlocked)((__c),(__stream))
357 #define __PUTC(__c, __stream) (fputc)((__c),(__stream))
358
359
360 #ifdef __STDIO_GETC_MACRO
361 -
362 extern FILE *__stdin; /* For getchar() macro. */
363
364 # undef __GETC_UNLOCKED_MACRO
365 # define __GETC_UNLOCKED_MACRO(__stream) \
366 ( ((__stream)->__bufpos < (__stream)->__bufgetc_u) \
367 ? (*(__stream)->__bufpos++) \
368 - : __fgetc_unlocked(__stream) )
369 + : fgetc_unlocked(__stream) )
370
371 # if 0
372 /* Classic macro approach. getc{_unlocked} can have side effects. */
373 @@ -453,20 +449,17 @@
374 # endif
375 # endif
376
377 -#else
378 -
379 #endif /* __STDIO_GETC_MACRO */
380
381
382 #ifdef __STDIO_PUTC_MACRO
383 -
384 extern FILE *__stdout; /* For putchar() macro. */
385
386 # undef __PUTC_UNLOCKED_MACRO
387 # define __PUTC_UNLOCKED_MACRO(__c, __stream) \
388 ( ((__stream)->__bufpos < (__stream)->__bufputc_u) \
389 ? (*(__stream)->__bufpos++) = (__c) \
390 - : __fputc_unlocked((__c),(__stream)) )
391 + : (fputc_unlocked((__c),(__stream)) )
392
393 # if 0
394 /* Classic macro approach. putc{_unlocked} can have side effects.*/
395 @@ -489,7 +482,8 @@
396 }) )
397
398 # undef __PUTC_UNLOCKED
399 -# define __PUTC_UNLOCKED(__c, __stream) __FPUTC_UNLOCKED((__c), (__stream))
400 +# define __PUTC_UNLOCKED(__c, __stream) \
401 + __FPUTC_UNLOCKED((__c), (__stream))
402
403 # ifdef __UCLIBC_HAS_THREADS__
404 # undef __FPUTC
405 diff -ur uClibc-0.9.29/libc/unistd/getpass.c uClibc-0.9.29-patched/libc/unistd/getpass.c
406 --- uClibc-0.9.29/libc/unistd/getpass.c 2006-07-05 05:58:38.000000000 -0500
407 +++ uClibc-0.9.29-patched/libc/unistd/getpass.c 2007-05-09 18:05:21.642421481 -0500
408 @@ -36,7 +36,8 @@
409 libc_hidden_proto(fputs)
410 libc_hidden_proto(fputc)
411 libc_hidden_proto(putc)
412 -libc_hidden_proto(__fputc_unlocked)
413 +//#undef fputc_unlocked
414 +libc_hidden_proto(fputc_unlocked)
415
416 /* It is desirable to use this bit on systems that have it.
417 The only bit of terminal state we want to twiddle is echoing, which is