diff options
author | Jim Meyering <jim@meyering.net> | 2001-07-15 14:39:04 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2001-07-15 14:39:04 +0000 |
commit | 5f194380179f9edd4d04a71dd3eb4e3a0bb3b9b3 (patch) | |
tree | dd50a70a9e6114df7c817f1a2203e181d5ef20cf /src | |
parent | cedd6e358dee8827ce68ec2074001d182751950d (diff) | |
download | coreutils-5f194380179f9edd4d04a71dd3eb4e3a0bb3b9b3.tar.xz |
Include "unlocked-io.h", rather than hard-coding the HAVE_*_UNLOCKED macros.
Diffstat (limited to 'src')
-rw-r--r-- | src/sys2.h | 61 |
1 files changed, 2 insertions, 59 deletions
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 \ |