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 # include <stdio.h>
35
36 # if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked
37 # undef clearerr
38 # define clearerr(x) clearerr_unlocked (x)
39 # else
40 # define clearerr_unlocked(x) clearerr (x)
41 # endif
42
43 # if HAVE_DECL_FEOF_UNLOCKED || defined feof_unlocked
44 # undef feof
45 # define feof(x) feof_unlocked (x)
46 # else
47 # define feof_unlocked(x) feof (x)
48 # endif
49
50 # if HAVE_DECL_FERROR_UNLOCKED || defined ferror_unlocked
51 # undef ferror
52 # define ferror(x) ferror_unlocked (x)
53 # else
54 # define ferror_unlocked(x) ferror (x)
55 # endif
56
57 # if HAVE_DECL_FFLUSH_UNLOCKED || defined fflush_unlocked
58 # undef fflush
59 # define fflush(x) fflush_unlocked (x)
60 # else
61 # define fflush_unlocked(x) fflush (x)
62 # endif
63
64 # if HAVE_DECL_FGETS_UNLOCKED || defined fgets_unlocked
65 # undef fgets
66 # define fgets(x,y,z) fgets_unlocked (x,y,z)
67 # else
68 # define fgets_unlocked(x,y,z) fgets (x,y,z)
69 # endif
70
71 # if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked
72 # undef fputc
73 # define fputc(x,y) fputc_unlocked (x,y)
74 # else
75 # define fputc_unlocked(x,y) fputc (x,y)
76 # endif
77
78 # if HAVE_DECL_FPUTS_UNLOCKED || defined fputs_unlocked
79 # undef fputs
80 # define fputs(x,y) fputs_unlocked (x,y)
81 # else
82 # define fputs_unlocked(x,y) fputs (x,y)
83 # endif
84
85 # if HAVE_DECL_FREAD_UNLOCKED || defined fread_unlocked
86 # undef fread
87 # define fread(w,x,y,z) fread_unlocked (w,x,y,z)
88 # else
89 # define fread_unlocked(w,x,y,z) fread (w,x,y,z)
90 # endif
91
92 # if HAVE_DECL_FWRITE_UNLOCKED || defined fwrite_unlocked
93 # undef fwrite
94 # define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
95 # else
96 # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
97 # endif
98
99 # if HAVE_DECL_GETC_UNLOCKED || defined get_unlocked
100 # undef getc
101 # define getc(x) getc_unlocked (x)
102 # else
103 # define getc_unlocked(x) getc (x)
104 # endif
105
106 # if HAVE_DECL_GETCHAR_UNLOCKED || defined getchar_unlocked
107 # undef getchar
108 # define getchar() getchar_unlocked ()
109 # else
110 # define getchar_unlocked() getchar ()
111 # endif
112
113 # if HAVE_DECL_PUTC_UNLOCKED || defined putc_unlocked
114 # undef putc
115 # define putc(x,y) putc_unlocked (x,y)
116 # else
117 # define putc_unlocked(x,y) putc (x,y)
118 # endif
119
120 # if HAVE_DECL_PUTCHAR_UNLOCKED || defined putchar_unlocked
121 # undef putchar
122 # define putchar(x) putchar_unlocked (x)
123 # else
124 # define putchar_unlocked(x) putchar (x)
125 # endif
126
127 # undef flockfile
128 # define flockfile(x) ((void) 0)
129
130 # undef ftrylockfile
131 # define ftrylockfile(x) 0
132
133 # undef funlockfile
134 # define funlockfile(x) ((void) 0)
135
136 #endif