From 5f194380179f9edd4d04a71dd3eb4e3a0bb3b9b3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 15 Jul 2001 14:39:04 +0000 Subject: Include "unlocked-io.h", rather than hard-coding the HAVE_*_UNLOCKED macros. --- src/sys2.h | 61 ++----------------------------------------------------------- 1 file changed, 2 insertions(+), 59 deletions(-) (limited to 'src') diff --git a/src/sys2.h b/src/sys2.h index fee040a1b..e6ccc82c4 100644 --- a/src/sys2.h +++ b/src/sys2.h @@ -360,65 +360,8 @@ uid_t getuid (); # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) #endif -/* These are wrappers for functions/macros from GNU libc. - The standard I/O functions are thread-safe. These *_unlocked ones - are more efficient but not thread-safe. That they're not thread-safe - is fine since all these applications are single threaded. */ - -#if HAVE_CLEARERR_UNLOCKED -# undef clearerr -# define clearerr(S) clearerr_unlocked (S) -#endif - -#if HAVE_FEOF_UNLOCKED -# undef feof -# define feof(S) feof_unlocked (S) -#endif - -#if HAVE_FERROR_UNLOCKED -# undef ferror -# define ferror(S) ferror_unlocked (S) -#endif - -#if HAVE_FFLUSH_UNLOCKED -# undef fflush -# define fflush(S) fflush_unlocked (S) -#endif - -#if HAVE_FPUTC_UNLOCKED -# undef fputc -# define fputc(C, S) fputc_unlocked (C, S) -#endif - -#if HAVE_FREAD_UNLOCKED -# undef fread -# define fread(P, Z, N, S) fread_unlocked (P, Z, N, S) -#endif - -#if HAVE_FWRITE_UNLOCKED -# undef fwrite -# define fwrite(P, Z, N, S) fwrite_unlocked (P, Z, N, S) -#endif - -#if HAVE_GETC_UNLOCKED -# undef getc -# define getc(S) getc_unlocked (S) -#endif - -#if HAVE_GETCHAR_UNLOCKED -# undef getchar -# define getchar(S) getchar_unlocked (S) -#endif - -#if HAVE_PUTC_UNLOCKED -# undef putc -# define putc(C, S) putc_unlocked (C, S) -#endif - -#if HAVE_PUTCHAR_UNLOCKED -# undef putchar -# define putchar(C) putchar_unlocked (C) -#endif +/* Include automatically-generated macros for unlocked I/O. */ +#include "unlocked-io.h" #define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ -- cgit v1.2.3-54-g00ecf