diff options
author | Rob Landley <rob@landley.net> | 2005-08-13 03:10:29 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-08-13 03:10:29 +0000 |
commit | 866bad310fe448ddb605b77e8dd5557a4d863c3f (patch) | |
tree | 9014dda376a189885b729d89826dfead55588bb1 | |
parent | 5e1f2d429d91309aeb7253ba7ae5832333d3052a (diff) | |
download | busybox-w32-866bad310fe448ddb605b77e8dd5557a4d863c3f.tar.gz busybox-w32-866bad310fe448ddb605b77e8dd5557a4d863c3f.tar.bz2 busybox-w32-866bad310fe448ddb605b77e8dd5557a4d863c3f.zip |
And 10922.
Ick.
-rw-r--r-- | busybox/libbb/printf.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/busybox/libbb/printf.c b/busybox/libbb/printf.c index 1156da911..4451273ef 100644 --- a/busybox/libbb/printf.c +++ b/busybox/libbb/printf.c | |||
@@ -71,9 +71,18 @@ | |||
71 | #define SET_FERROR_UNLOCKED(S) ((S)->mode |= __MODE_ERR) | 71 | #define SET_FERROR_UNLOCKED(S) ((S)->mode |= __MODE_ERR) |
72 | 72 | ||
73 | # else | 73 | # else |
74 | #error unknown uClibc stdio implemenation! | 74 | # error unknown uClibc stdio implemenation! |
75 | # endif | 75 | # endif |
76 | 76 | ||
77 | #elif defined(__NEWLIB_H__) | ||
78 | /* I honestly don't know if there are different versions of stdio in | ||
79 | * newlibs history. Anyway, here's what's current. | ||
80 | * #define __sfeof(p) (((p)->_flags & __SEOF) != 0) | ||
81 | * #define __sferror(p) (((p)->_flags & __SERR) != 0) | ||
82 | * #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ||
83 | */ | ||
84 | # define SET_FERROR_UNLOCKED(S) ((S)->_flags |= __SERR) | ||
85 | |||
77 | #elif defined(__GLIBC__) | 86 | #elif defined(__GLIBC__) |
78 | 87 | ||
79 | # if defined(_STDIO_USES_IOSTREAM) | 88 | # if defined(_STDIO_USES_IOSTREAM) |
@@ -81,7 +90,7 @@ | |||
81 | * #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) | 90 | * #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) |
82 | * #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) | 91 | * #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) |
83 | */ | 92 | */ |
84 | #define SET_FERROR_UNLOCKED(S) ((S)->_flags |= _IO_ERR_SEEN) | 93 | # define SET_FERROR_UNLOCKED(S) ((S)->_flags |= _IO_ERR_SEEN) |
85 | 94 | ||
86 | # else | 95 | # else |
87 | /* Assume the older version of glibc which used a bitfield entry | 96 | /* Assume the older version of glibc which used a bitfield entry |
@@ -90,19 +99,10 @@ | |||
90 | * #define feof_unlocked(stream) ((stream)->__eof != 0) | 99 | * #define feof_unlocked(stream) ((stream)->__eof != 0) |
91 | * #define ferror_unlocked(stream) ((stream)->__error != 0) | 100 | * #define ferror_unlocked(stream) ((stream)->__error != 0) |
92 | */ | 101 | */ |
93 | #define SET_FERROR_UNLOCKED(S) ((S)->__error = 1) | 102 | # define SET_FERROR_UNLOCKED(S) ((S)->__error = 1) |
94 | 103 | ||
95 | # endif | 104 | # endif |
96 | 105 | ||
97 | #elif defined(__NEWLIB_H__) | ||
98 | /* I honestly don't know if there are different versions of stdio in | ||
99 | * newlibs history. Anyway, here's what's current. | ||
100 | * #define __sfeof(p) (((p)->_flags & __SEOF) != 0) | ||
101 | * #define __sferror(p) (((p)->_flags & __SERR) != 0) | ||
102 | * #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) | ||
103 | */ | ||
104 | #define SET_FERROR_UNLOCKED(S) ((S)->_flags |= __SERR) | ||
105 | |||
106 | #elif defined(__dietlibc__) | 106 | #elif defined(__dietlibc__) |
107 | /* | 107 | /* |
108 | * WARNING!!! dietlibc is quite buggy. WARNING!!! | 108 | * WARNING!!! dietlibc is quite buggy. WARNING!!! |
@@ -120,13 +120,13 @@ | |||
120 | * you can extract the information you need from dietstdio.h. See the | 120 | * you can extract the information you need from dietstdio.h. See the |
121 | * other library implementations for examples. | 121 | * other library implementations for examples. |
122 | */ | 122 | */ |
123 | #error dietlibc is currently not supported. Please see the commented source. | 123 | # error dietlibc is currently not supported. Please see the commented source. |
124 | 124 | ||
125 | #else /* some other lib */ | 125 | #else /* some other lib */ |
126 | /* Please see the comments for the above supported libraries for examples | 126 | /* Please see the comments for the above supported libraries for examples |
127 | * of what is required to support your stdio implementation. | 127 | * of what is required to support your stdio implementation. |
128 | */ | 128 | */ |
129 | #error Your stdio library is currently not supported. Please see the commented source. | 129 | # error Your stdio library is currently not supported. Please see the commented source. |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | #ifdef L_bb_vfprintf | 132 | #ifdef L_bb_vfprintf |