=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/include/stdio.h,v retrieving revision 1.37 retrieving revision 1.38 diff -c -r1.37 -r1.38 *** src/include/stdio.h 2009/10/22 01:23:16 1.37 --- src/include/stdio.h 2009/11/09 00:18:27 1.38 *************** *** 1,4 **** ! /* $OpenBSD: stdio.h,v 1.37 2009/10/22 01:23:16 guenther Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: stdio.h,v 1.38 2009/11/09 00:18:27 kurt Exp $ */ /* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ /*- *************** *** 157,162 **** --- 157,163 ---- #define __SOFF 0x1000 /* set iff _offset is in fact correct */ #define __SMOD 0x2000 /* true => fgetln modified _p text */ #define __SALC 0x4000 /* allocate string space dynamically */ + #define __SIGN 0x8000 /* ignore this file in _fwalk */ /* * The following three definitions are for ANSI C, which took them *************** *** 322,333 **** #endif __END_DECLS - #ifndef _POSIX_THREADS - # define flockfile(fp) /* nothing */ - # define ftrylockfile(fp) (0) - # define funlockfile(fp) /* nothing */ - #endif - #endif /* __BSD_VISIBLE || __POSIX_VISIBLE || __XPG_VISIBLE */ /* --- 323,328 ---- *************** *** 402,433 **** #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) #define __sfileno(p) ((p)->_file) ! #define feof(p) __sfeof(p) ! #define ferror(p) __sferror(p) ! #ifndef _POSIX_THREADS ! #define clearerr(p) __sclearerr(p) ! #endif #if __POSIX_VISIBLE ! #define fileno(p) __sfileno(p) #endif #ifndef lint ! #ifndef _POSIX_THREADS ! #define getc(fp) __sgetc(fp) ! #endif /* _POSIX_THREADS */ #define getc_unlocked(fp) __sgetc(fp) /* * The macro implementations of putc and putc_unlocked are not * fully POSIX compliant; they do not set errno on failure */ #if __BSD_VISIBLE - #ifndef _POSIX_THREADS - #define putc(x, fp) __sputc(x, fp) - #endif /* _POSIX_THREADS */ #define putc_unlocked(x, fp) __sputc(x, fp) #endif /* __BSD_VISIBLE */ #endif /* lint */ #define getchar() getc(stdin) --- 397,433 ---- #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) #define __sfileno(p) ((p)->_file) ! extern int __isthreaded; ! #define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p)) ! #define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p)) ! #define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p)) #if __POSIX_VISIBLE ! #define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p)) #endif + #define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp)) + + #if __BSD_VISIBLE + /* + * The macro implementations of putc and putc_unlocked are not + * fully POSIX compliant; they do not set errno on failure + */ + #define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp)) + #endif /* __BSD_VISIBLE */ + #ifndef lint ! #if __POSIX_VISIBLE >= 199506 #define getc_unlocked(fp) __sgetc(fp) /* * The macro implementations of putc and putc_unlocked are not * fully POSIX compliant; they do not set errno on failure */ #if __BSD_VISIBLE #define putc_unlocked(x, fp) __sputc(x, fp) #endif /* __BSD_VISIBLE */ + #endif /* __POSIX_VISIBLE >= 199506 */ #endif /* lint */ #define getchar() getc(stdin)