1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 #ifndef UNLOCKED_IO_H
21 # define UNLOCKED_IO_H 1
22
23
24
25
26
27
28
29
30
31
32
33
34
35 # if !_GL_CONFIG_H_INCLUDED
36 # error "Please include config.h first."
37 # endif
38
39 # include <stdio.h>
40
41 # if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked
42 # undef clearerr
43 # define clearerr(x) clearerr_unlocked (x)
44 # else
45 # define clearerr_unlocked(x) clearerr (x)
46 # endif
47
48 # if HAVE_DECL_FEOF_UNLOCKED || defined feof_unlocked
49 # undef feof
50 # define feof(x) feof_unlocked (x)
51 # else
52 # define feof_unlocked(x) feof (x)
53 # endif
54
55 # if HAVE_DECL_FERROR_UNLOCKED || defined ferror_unlocked
56 # undef ferror
57 # define ferror(x) ferror_unlocked (x)
58 # else
59 # define ferror_unlocked(x) ferror (x)
60 # endif
61
62 # if HAVE_DECL_FFLUSH_UNLOCKED || defined fflush_unlocked
63 # undef fflush
64 # define fflush(x) fflush_unlocked (x)
65 # else
66 # define fflush_unlocked(x) fflush (x)
67 # endif
68
69 # if HAVE_DECL_FGETS_UNLOCKED || defined fgets_unlocked
70 # undef fgets
71 # define fgets(x,y,z) fgets_unlocked (x,y,z)
72 # else
73 # define fgets_unlocked(x,y,z) fgets (x,y,z)
74 # endif
75
76 # if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked
77 # undef fputc
78 # define fputc(x,y) fputc_unlocked (x,y)
79 # else
80 # define fputc_unlocked(x,y) fputc (x,y)
81 # endif
82
83 # if HAVE_DECL_FPUTS_UNLOCKED || defined fputs_unlocked
84 # undef fputs
85 # define fputs(x,y) fputs_unlocked (x,y)
86 # else
87 # define fputs_unlocked(x,y) fputs (x,y)
88 # endif
89
90 # if HAVE_DECL_FREAD_UNLOCKED || defined fread_unlocked
91 # undef fread
92 # define fread(w,x,y,z) fread_unlocked (w,x,y,z)
93 # else
94 # define fread_unlocked(w,x,y,z) fread (w,x,y,z)
95 # endif
96
97 # if HAVE_DECL_FWRITE_UNLOCKED || defined fwrite_unlocked
98 # undef fwrite
99 # define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
100 # else
101 # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
102 # endif
103
104 # if HAVE_DECL_GETC_UNLOCKED || defined get_unlocked
105 # undef getc
106 # define getc(x) getc_unlocked (x)
107 # else
108 # define getc_unlocked(x) getc (x)
109 # endif
110
111 # if HAVE_DECL_GETCHAR_UNLOCKED || defined getchar_unlocked
112 # undef getchar
113 # define getchar() getchar_unlocked ()
114 # else
115 # define getchar_unlocked() getchar ()
116 # endif
117
118 # if HAVE_DECL_PUTC_UNLOCKED || defined putc_unlocked
119 # undef putc
120 # define putc(x,y) putc_unlocked (x,y)
121 # else
122 # define putc_unlocked(x,y) putc (x,y)
123 # endif
124
125 # if HAVE_DECL_PUTCHAR_UNLOCKED || defined putchar_unlocked
126 # undef putchar
127 # define putchar(x) putchar_unlocked (x)
128 # else
129 # define putchar_unlocked(x) putchar (x)
130 # endif
131
132 # undef flockfile
133 # define flockfile(x) ((void) 0)
134
135 # undef ftrylockfile
136 # define ftrylockfile(x) 0
137
138 # undef funlockfile
139 # define funlockfile(x) ((void) 0)
140
141 #endif