Rev 6099 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6099 | Rev 6536 | ||
---|---|---|---|
Line 126... | Line 126... | ||
126 | #define L_tmpnam __L_tmpnam__ |
126 | #define L_tmpnam __L_tmpnam__ |
127 | #else |
127 | #else |
128 | #define L_tmpnam FILENAME_MAX |
128 | #define L_tmpnam FILENAME_MAX |
129 | #endif |
129 | #endif |
Line 130... | Line 130... | ||
130 | 130 | ||
131 | #ifndef __STRICT_ANSI__ |
131 | #if __BSD_VISIBLE || __XSI_VISIBLE |
132 | #define P_tmpdir "/tmp" |
132 | #define P_tmpdir "/tmp" |
Line 133... | Line 133... | ||
133 | #endif |
133 | #endif |
134 | 134 | ||
Line 228... | Line 228... | ||
228 | int _EXFUN(rename, (const char *, const char *)); |
228 | int _EXFUN(rename, (const char *, const char *)); |
229 | #ifdef _COMPILING_NEWLIB |
229 | #ifdef _COMPILING_NEWLIB |
230 | int _EXFUN(_rename, (const char *, const char *)); |
230 | int _EXFUN(_rename, (const char *, const char *)); |
231 | #endif |
231 | #endif |
232 | #endif |
232 | #endif |
233 | #if !defined(__STRICT_ANSI__) || defined(__USE_XOPEN2K) |
233 | #if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112 |
234 | #ifdef _COMPILING_NEWLIB |
234 | #ifdef _COMPILING_NEWLIB |
235 | int _EXFUN(fseeko, (FILE *, _off_t, int)); |
235 | int _EXFUN(fseeko, (FILE *, _off_t, int)); |
236 | _off_t _EXFUN(ftello, ( FILE *)); |
236 | _off_t _EXFUN(ftello, ( FILE *)); |
237 | #else |
237 | #else |
238 | int _EXFUN(fseeko, (FILE *, off_t, int)); |
238 | int _EXFUN(fseeko, (FILE *, off_t, int)); |
Line 240... | Line 240... | ||
240 | #endif |
240 | #endif |
241 | #endif |
241 | #endif |
242 | #if __GNU_VISIBLE |
242 | #if __GNU_VISIBLE |
243 | int _EXFUN(fcloseall, (_VOID)); |
243 | int _EXFUN(fcloseall, (_VOID)); |
244 | #endif |
244 | #endif |
245 | #if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L) |
- | |
246 | #ifndef _REENT_ONLY |
245 | #ifndef _REENT_ONLY |
- | 246 | #if __ISO_C_VISIBLE >= 1999 |
|
- | 247 | int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) |
|
- | 248 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
|
- | 249 | int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) |
|
- | 250 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
|
- | 251 | int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) |
|
- | 252 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
|
- | 253 | int _EXFUN(vscanf, (const char *, __VALIST) |
|
- | 254 | _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
|
- | 255 | int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) |
|
- | 256 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
|
- | 257 | #endif |
|
- | 258 | #if __GNU_VISIBLE |
|
- | 259 | int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) |
|
- | 260 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
|
- | 261 | int _EXFUN(vasprintf, (char **, const char *, __VALIST) |
|
- | 262 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
|
- | 263 | #endif |
|
- | 264 | #if __MISC_VISIBLE /* Newlib-specific */ |
|
247 | int _EXFUN(asiprintf, (char **, const char *, ...) |
265 | int _EXFUN(asiprintf, (char **, const char *, ...) |
248 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
266 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
249 | char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...) |
267 | char * _EXFUN(asniprintf, (char *, size_t *, const char *, ...) |
250 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
268 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
251 | char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...) |
269 | char * _EXFUN(asnprintf, (char *__restrict, size_t *__restrict, const char *__restrict, ...) |
252 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
270 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
253 | int _EXFUN(asprintf, (char **__restrict, const char *__restrict, ...) |
- | |
254 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
- | |
255 | #ifndef diprintf |
271 | #ifndef diprintf |
256 | int _EXFUN(diprintf, (int, const char *, ...) |
272 | int _EXFUN(diprintf, (int, const char *, ...) |
257 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
273 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
258 | #endif |
274 | #endif |
259 | int _EXFUN(fiprintf, (FILE *, const char *, ...) |
275 | int _EXFUN(fiprintf, (FILE *, const char *, ...) |
Line 266... | Line 282... | ||
266 | _ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); |
282 | _ATTRIBUTE ((__format__ (__scanf__, 1, 2)))); |
267 | int _EXFUN(siprintf, (char *, const char *, ...) |
283 | int _EXFUN(siprintf, (char *, const char *, ...) |
268 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
284 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
269 | int _EXFUN(siscanf, (const char *, const char *, ...) |
285 | int _EXFUN(siscanf, (const char *, const char *, ...) |
270 | _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); |
286 | _ATTRIBUTE ((__format__ (__scanf__, 2, 3)))); |
271 | int _EXFUN(snprintf, (char *__restrict, size_t, const char *__restrict, ...) |
- | |
272 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
- | |
273 | int _EXFUN(sniprintf, (char *, size_t, const char *, ...) |
287 | int _EXFUN(sniprintf, (char *, size_t, const char *, ...) |
274 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
288 | _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); |
275 | int _EXFUN(vasiprintf, (char **, const char *, __VALIST) |
289 | int _EXFUN(vasiprintf, (char **, const char *, __VALIST) |
276 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
290 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
277 | char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST) |
291 | char * _EXFUN(vasniprintf, (char *, size_t *, const char *, __VALIST) |
278 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
292 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
279 | char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST) |
293 | char * _EXFUN(vasnprintf, (char *, size_t *, const char *, __VALIST) |
280 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
294 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
281 | int _EXFUN(vasprintf, (char **, const char *, __VALIST) |
- | |
282 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
- | |
283 | int _EXFUN(vdiprintf, (int, const char *, __VALIST) |
295 | int _EXFUN(vdiprintf, (int, const char *, __VALIST) |
284 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
296 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
285 | int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST) |
297 | int _EXFUN(vfiprintf, (FILE *, const char *, __VALIST) |
286 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
298 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
287 | int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST) |
299 | int _EXFUN(vfiscanf, (FILE *, const char *, __VALIST) |
288 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
300 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
289 | int _EXFUN(vfscanf, (FILE *__restrict, const char *__restrict, __VALIST) |
- | |
290 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
- | |
291 | int _EXFUN(viprintf, (const char *, __VALIST) |
301 | int _EXFUN(viprintf, (const char *, __VALIST) |
292 | _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); |
302 | _ATTRIBUTE ((__format__ (__printf__, 1, 0)))); |
293 | int _EXFUN(viscanf, (const char *, __VALIST) |
303 | int _EXFUN(viscanf, (const char *, __VALIST) |
294 | _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
304 | _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
295 | int _EXFUN(vscanf, (const char *, __VALIST) |
- | |
296 | _ATTRIBUTE ((__format__ (__scanf__, 1, 0)))); |
- | |
297 | int _EXFUN(vsiprintf, (char *, const char *, __VALIST) |
305 | int _EXFUN(vsiprintf, (char *, const char *, __VALIST) |
298 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
306 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
299 | int _EXFUN(vsiscanf, (const char *, const char *, __VALIST) |
307 | int _EXFUN(vsiscanf, (const char *, const char *, __VALIST) |
300 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
308 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
301 | int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) |
309 | int _EXFUN(vsniprintf, (char *, size_t, const char *, __VALIST) |
302 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
310 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
303 | int _EXFUN(vsnprintf, (char *__restrict, size_t, const char *__restrict, __VALIST) |
- | |
304 | _ATTRIBUTE ((__format__ (__printf__, 3, 0)))); |
- | |
305 | int _EXFUN(vsscanf, (const char *__restrict, const char *__restrict, __VALIST) |
- | |
306 | _ATTRIBUTE ((__format__ (__scanf__, 2, 0)))); |
311 | #endif /* __MISC_VISIBLE */ |
307 | #endif /* !_REENT_ONLY */ |
312 | #endif /* !_REENT_ONLY */ |
308 | #endif /* !__STRICT_ANSI__ */ |
- | |
Line 309... | Line 313... | ||
309 | 313 | ||
310 | /* |
314 | /* |
311 | * Routines in POSIX 1003.1:2001. |
315 | * Routines in POSIX 1003.1:2001. |
Line 312... | Line 316... | ||
312 | */ |
316 | */ |
313 | 317 | ||
314 | #ifndef __STRICT_ANSI__ |
318 | #if __POSIX_VISIBLE |
315 | #ifndef _REENT_ONLY |
319 | #ifndef _REENT_ONLY |
316 | FILE * _EXFUN(fdopen, (int, const char *)); |
320 | FILE * _EXFUN(fdopen, (int, const char *)); |
- | 321 | #endif |
|
317 | #endif |
322 | int _EXFUN(fileno, (FILE *)); |
318 | int _EXFUN(fileno, (FILE *)); |
323 | #endif |
319 | int _EXFUN(getw, (FILE *)); |
324 | #if __MISC_VISIBLE || __POSIX_VISIBLE >= 199209 |
- | 325 | int _EXFUN(pclose, (FILE *)); |
|
- | 326 | FILE * _EXFUN(popen, (const char *, const char *)); |
|
320 | int _EXFUN(pclose, (FILE *)); |
327 | #endif |
321 | FILE * _EXFUN(popen, (const char *, const char *)); |
328 | |
322 | int _EXFUN(putw, (int, FILE *)); |
329 | #if __BSD_VISIBLE |
- | 330 | void _EXFUN(setbuffer, (FILE *, char *, int)); |
|
- | 331 | int _EXFUN(setlinebuf, (FILE *)); |
|
- | 332 | #endif |
|
- | 333 | ||
- | 334 | #if __MISC_VISIBLE || (__XSI_VISIBLE && __POSIX_VISIBLE < 200112) |
|
- | 335 | int _EXFUN(getw, (FILE *)); |
|
- | 336 | int _EXFUN(putw, (int, FILE *)); |
|
323 | void _EXFUN(setbuffer, (FILE *, char *, int)); |
337 | #endif |
324 | int _EXFUN(setlinebuf, (FILE *)); |
338 | #if __MISC_VISIBLE || __POSIX_VISIBLE |
325 | int _EXFUN(getc_unlocked, (FILE *)); |
339 | int _EXFUN(getc_unlocked, (FILE *)); |
326 | int _EXFUN(getchar_unlocked, (void)); |
340 | int _EXFUN(getchar_unlocked, (void)); |
327 | void _EXFUN(flockfile, (FILE *)); |
341 | void _EXFUN(flockfile, (FILE *)); |
328 | int _EXFUN(ftrylockfile, (FILE *)); |
342 | int _EXFUN(ftrylockfile, (FILE *)); |
329 | void _EXFUN(funlockfile, (FILE *)); |
343 | void _EXFUN(funlockfile, (FILE *)); |
330 | int _EXFUN(putc_unlocked, (int, FILE *)); |
344 | int _EXFUN(putc_unlocked, (int, FILE *)); |
Line 331... | Line 345... | ||
331 | int _EXFUN(putchar_unlocked, (int)); |
345 | int _EXFUN(putchar_unlocked, (int)); |
332 | #endif /* ! __STRICT_ANSI__ */ |
346 | #endif |
333 | 347 | ||
Line 334... | Line 348... | ||
334 | /* |
348 | /* |
335 | * Routines in POSIX 1003.1:200x. |
349 | * Routines in POSIX 1003.1:200x. |
336 | */ |
350 | */ |
337 | 351 | ||
338 | #ifndef __STRICT_ANSI__ |
352 | #if __POSIX_VISIBLE >= 200809 |
339 | # ifndef _REENT_ONLY |
353 | # ifndef _REENT_ONLY |
340 | # ifndef dprintf |
354 | # ifndef dprintf |
341 | int _EXFUN(dprintf, (int, const char *__restrict, ...) |
355 | int _EXFUN(dprintf, (int, const char *__restrict, ...) |
342 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
356 | _ATTRIBUTE ((__format__ (__printf__, 2, 3)))); |
343 | # endif |
357 | # endif |
344 | FILE * _EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict)); |
- | |
345 | /* getdelim - see __getdelim for now */ |
- | |
346 | /* getline - see __getline for now */ |
- | |
347 | FILE * _EXFUN(open_memstream, (char **, size_t *)); |
358 | FILE * _EXFUN(fmemopen, (void *__restrict, size_t, const char *__restrict)); |
348 | #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809 |
359 | /* getdelim - see __getdelim for now */ |
349 | int _EXFUN(renameat, (int, const char *, int, const char *)); |
360 | /* getline - see __getline for now */ |
350 | #endif |
361 | FILE * _EXFUN(open_memstream, (char **, size_t *)); |
- | 362 | int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST) |
|
- | 363 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
|
- | 364 | # endif |
|
Line 351... | Line 365... | ||
351 | int _EXFUN(vdprintf, (int, const char *__restrict, __VALIST) |
365 | #endif |
352 | _ATTRIBUTE ((__format__ (__printf__, 2, 0)))); |
366 | #if __ATFILE_VISIBLE |
353 | # endif |
367 | int _EXFUN(renameat, (int, const char *, int, const char *)); |
Line 493... | Line 507... | ||
493 | 507 | ||
494 | int _EXFUN(fpurge, (FILE *)); |
508 | int _EXFUN(fpurge, (FILE *)); |
495 | ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); |
509 | ssize_t _EXFUN(__getdelim, (char **, size_t *, int, FILE *)); |
Line 496... | Line 510... | ||
496 | ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); |
510 | ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); |
497 | 511 | ||
498 | #if __BSD_VISIBLE |
512 | #if __MISC_VISIBLE |
499 | void _EXFUN(clearerr_unlocked, (FILE *)); |
513 | void _EXFUN(clearerr_unlocked, (FILE *)); |
500 | int _EXFUN(feof_unlocked, (FILE *)); |
514 | int _EXFUN(feof_unlocked, (FILE *)); |
501 | int _EXFUN(ferror_unlocked, (FILE *)); |
515 | int _EXFUN(ferror_unlocked, (FILE *)); |
Line 543... | Line 557... | ||
543 | 557 | ||
544 | /* |
558 | /* |
545 | * Stdio function-access interface. |
559 | * Stdio function-access interface. |
Line 546... | Line 560... | ||
546 | */ |
560 | */ |
547 | 561 | ||
548 | #ifndef __STRICT_ANSI__ |
562 | #if __BSD_VISIBLE |
549 | # ifdef __LARGE64_FILES |
563 | # ifdef __LARGE64_FILES |
550 | FILE *_EXFUN(funopen,(const _PTR __cookie, |
564 | FILE *_EXFUN(funopen,(const _PTR __cookie, |
551 | int (*__readfn)(_PTR __c, char *__buf, |
565 | int (*__readfn)(_PTR __c, char *__buf, |
Line 580... | Line 594... | ||
580 | 594 | ||
581 | # define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ |
595 | # define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ |
582 | (fpos_t (*)())0, (int (*)())0) |
596 | (fpos_t (*)())0, (int (*)())0) |
583 | # define fwopen(__cookie, __fn) funopen(__cookie, (int (*)())0, __fn, \ |
597 | # define fwopen(__cookie, __fn) funopen(__cookie, (int (*)())0, __fn, \ |
- | 598 | (fpos_t (*)())0, (int (*)())0) |
|
Line -... | Line 599... | ||
- | 599 | #endif /* __BSD_VISIBLE */ |
|
584 | (fpos_t (*)())0, (int (*)())0) |
600 | |
585 | 601 | #if __GNU_VISIBLE |
|
586 | typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n); |
602 | typedef ssize_t cookie_read_function_t(void *__cookie, char *__buf, size_t __n); |
587 | typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf, |
603 | typedef ssize_t cookie_write_function_t(void *__cookie, const char *__buf, |
588 | size_t __n); |
604 | size_t __n); |
Line 604... | Line 620... | ||
604 | } cookie_io_functions_t; |
620 | } cookie_io_functions_t; |
605 | FILE *_EXFUN(fopencookie,(void *__cookie, |
621 | FILE *_EXFUN(fopencookie,(void *__cookie, |
606 | const char *__mode, cookie_io_functions_t __functions)); |
622 | const char *__mode, cookie_io_functions_t __functions)); |
607 | FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, |
623 | FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, |
608 | const char *__mode, cookie_io_functions_t __functions)); |
624 | const char *__mode, cookie_io_functions_t __functions)); |
609 | #endif /* ! __STRICT_ANSI__ */ |
625 | #endif /* __GNU_VISIBLE */ |
Line 610... | Line 626... | ||
610 | 626 | ||
611 | #ifndef __CUSTOM_FILE_IO__ |
627 | #ifndef __CUSTOM_FILE_IO__ |
612 | /* |
628 | /* |
613 | * The __sfoo macros are here so that we can |
629 | * The __sfoo macros are here so that we can |
Line 643... | Line 659... | ||
643 | } |
659 | } |
644 | #else |
660 | #else |
645 | #define __sgetc_r(__ptr, __p) __sgetc_raw_r(__ptr, __p) |
661 | #define __sgetc_r(__ptr, __p) __sgetc_raw_r(__ptr, __p) |
646 | #endif |
662 | #endif |
Line 647... | Line 663... | ||
647 | 663 | ||
648 | #ifdef _never /* __GNUC__ */ |
- | |
649 | /* If this inline is actually used, then systems using coff debugging |
- | |
650 | info get hopelessly confused. 21sept93 rich@cygnus.com. */ |
664 | #ifdef __GNUC__ |
- | 665 | _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { |
|
- | 666 | #ifdef __SCLE |
|
- | 667 | if ((_p->_flags & __SCLE) && _c == '\n') |
|
- | 668 | __sputc_r (_ptr, '\r', _p); |
|
651 | _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { |
669 | #endif |
652 | if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) |
670 | if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) |
653 | return (*_p->_p++ = _c); |
671 | return (*_p->_p++ = _c); |
654 | else |
672 | else |
655 | return (__swbuf_r(_ptr, _c, _p)); |
673 | return (__swbuf_r(_ptr, _c, _p)); |
Line 684... | Line 702... | ||
684 | #ifndef _REENT_SMALL |
702 | #ifndef _REENT_SMALL |
685 | #define feof(p) __sfeof(p) |
703 | #define feof(p) __sfeof(p) |
686 | #define ferror(p) __sferror(p) |
704 | #define ferror(p) __sferror(p) |
687 | #define clearerr(p) __sclearerr(p) |
705 | #define clearerr(p) __sclearerr(p) |
Line 688... | Line 706... | ||
688 | 706 | ||
689 | #if __BSD_VISIBLE |
707 | #if __MISC_VISIBLE |
690 | #define feof_unlocked(p) __sfeof(p) |
708 | #define feof_unlocked(p) __sfeof(p) |
691 | #define ferror_unlocked(p) __sferror(p) |
709 | #define ferror_unlocked(p) __sferror(p) |
692 | #define clearerr_unlocked(p) __sclearerr(p) |
710 | #define clearerr_unlocked(p) __sclearerr(p) |
693 | #endif /* __BSD_VISIBLE */ |
711 | #endif /* __MISC_VISIBLE */ |
Line 694... | Line 712... | ||
694 | #endif /* _REENT_SMALL */ |
712 | #endif /* _REENT_SMALL */ |
695 | 713 | ||
696 | #if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */ |
714 | #if 0 /* __POSIX_VISIBLE - FIXME: must initialize stdio first, use fn */ |
Line 697... | Line 715... | ||
697 | #define fileno(p) __sfileno(p) |
715 | #define fileno(p) __sfileno(p) |
698 | #endif |
716 | #endif |
699 | 717 | ||
700 | #ifndef __CYGWIN__ |
718 | #ifndef __CYGWIN__ |
701 | #ifndef lint |
719 | #ifndef lint |
702 | #define getc(fp) __sgetc_r(_REENT, fp) |
720 | #define getc(fp) __sgetc_r(_REENT, fp) |
Line 703... | Line 721... | ||
703 | #define putc(x, fp) __sputc_r(_REENT, x, fp) |
721 | #define putc(x, fp) __sputc_r(_REENT, x, fp) |
704 | #endif /* lint */ |
722 | #endif /* lint */ |
705 | #endif /* __CYGWIN__ */ |
723 | #endif /* __CYGWIN__ */ |
706 | 724 | ||
- | 725 | #if __MISC_VISIBLE |
|
Line -... | Line 726... | ||
- | 726 | /* fast always-buffered version, true iff error */ |
|
707 | #ifndef __STRICT_ANSI__ |
727 | #define fast_putc(x,p) (--(p)->_w < 0 ? \ |
708 | /* fast always-buffered version, true iff error */ |
728 | __swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0)) |
709 | #define fast_putc(x,p) (--(p)->_w < 0 ? \ |
729 | #endif |
710 | __swbuf_r(_REENT, (int)(x), p) == EOF : (*(p)->_p = (x), (p)->_p++, 0)) |
730 | |
711 | 731 | #if __XSI_VISIBLE |
|
Line 718... | Line 738... | ||
718 | #endif /* !__CUSTOM_FILE_IO__ */ |
738 | #endif /* !__CUSTOM_FILE_IO__ */ |
Line 719... | Line 739... | ||
719 | 739 | ||
720 | #define getchar() getc(stdin) |
740 | #define getchar() getc(stdin) |
Line 721... | Line 741... | ||
721 | #define putchar(x) putc(x, stdout) |
741 | #define putchar(x) putc(x, stdout) |
722 | 742 | ||
723 | #ifndef __STRICT_ANSI__ |
743 | #if __MISC_VISIBLE || __POSIX_VISIBLE |
724 | #define getchar_unlocked() getc_unlocked(stdin) |
744 | #define getchar_unlocked() getc_unlocked(stdin) |
Line 725... | Line 745... | ||
725 | #define putchar_unlocked(x) putc_unlocked(x, stdout) |
745 | #define putchar_unlocked(x) putc_unlocked(x, stdout) |