Commit | Line | Data |
---|---|---|
760ac839 LW |
1 | #ifndef H_PERLIO |
2 | #define H_PERLIO 1 | |
3 | ||
f2d19c81 | 4 | /* Clean up (or at least document) the various possible #defines. |
5 | This section attempts to match the 5.003_03 Configure variables | |
6 | onto the 5.003_02 header file values. | |
7 | I can't figure out where USE_STDIO was supposed to be set. | |
8 | --AD | |
9 | */ | |
10 | #ifndef USE_PERLIO | |
11 | # define PERLIO_IS_STDIO | |
760ac839 | 12 | #endif |
f2d19c81 | 13 | |
14 | /* Below is the 5.003_02 stuff. */ | |
15 | #ifdef USE_STDIO | |
16 | # ifndef PERLIO_IS_STDIO | |
17 | # define PERLIO_IS_STDIO | |
18 | # endif | |
760ac839 LW |
19 | #else |
20 | extern void PerlIO_init _((void)); | |
21 | #endif | |
22 | ||
23 | #include "perlsdio.h" | |
24 | ||
25 | #ifndef PERLIO_IS_STDIO | |
26 | #ifdef USE_SFIO | |
27 | #include "perlsfio.h" | |
28 | #endif /* USE_SFIO */ | |
29 | #endif /* PERLIO_IS_STDIO */ | |
30 | ||
31 | #ifndef EOF | |
32 | #define EOF (-1) | |
33 | #endif | |
34 | ||
35 | /* This is to catch case with no stdio */ | |
36 | #ifndef BUFSIZ | |
37 | #define BUFSIZ 1024 | |
38 | #endif | |
39 | ||
40 | #ifndef SEEK_SET | |
41 | #define SEEK_SET 0 | |
42 | #endif | |
43 | ||
44 | #ifndef SEEK_CUR | |
45 | #define SEEK_CUR 1 | |
46 | #endif | |
47 | ||
48 | #ifndef SEEK_END | |
49 | #define SEEK_END 2 | |
50 | #endif | |
51 | ||
52 | #ifndef PerlIO | |
53 | struct _PerlIO; | |
54 | #define PerlIO struct _PerlIO | |
55 | #endif /* No PerlIO */ | |
56 | ||
57 | #ifndef Fpos_t | |
58 | #define Fpos_t long | |
59 | #endif | |
60 | ||
61 | #ifndef NEXT30_NO_ATTRIBUTE | |
62 | #ifndef HASATTRIBUTE /* disable GNU-cc attribute checking? */ | |
63 | #ifdef __attribute__ /* Avoid possible redefinition errors */ | |
64 | #undef __attribute__ | |
65 | #endif | |
66 | #define __attribute__(attr) | |
f2d19c81 | 67 | #endif |
760ac839 LW |
68 | #endif |
69 | ||
70 | #ifndef PerlIO_stdoutf | |
71 | extern int PerlIO_stdoutf _((const char *,...)) | |
72 | __attribute__((format (printf, 1, 2))); | |
73 | #endif | |
74 | #ifndef PerlIO_puts | |
75 | extern int PerlIO_puts _((PerlIO *,const char *)); | |
76 | #endif | |
77 | #ifndef PerlIO_open | |
78 | extern PerlIO * PerlIO_open _((const char *,const char *)); | |
79 | #endif | |
80 | #ifndef PerlIO_close | |
81 | extern int PerlIO_close _((PerlIO *)); | |
82 | #endif | |
83 | #ifndef PerlIO_eof | |
84 | extern int PerlIO_eof _((PerlIO *)); | |
85 | #endif | |
86 | #ifndef PerlIO_error | |
87 | extern int PerlIO_error _((PerlIO *)); | |
88 | #endif | |
89 | #ifndef PerlIO_clearerr | |
90 | extern void PerlIO_clearerr _((PerlIO *)); | |
91 | #endif | |
92 | #ifndef PerlIO_getc | |
93 | extern int PerlIO_getc _((PerlIO *)); | |
94 | #endif | |
95 | #ifndef PerlIO_putc | |
96 | extern int PerlIO_putc _((PerlIO *,int)); | |
97 | #endif | |
98 | #ifndef PerlIO_flush | |
99 | extern int PerlIO_flush _((PerlIO *)); | |
100 | #endif | |
101 | #ifndef PerlIO_ungetc | |
102 | extern int PerlIO_ungetc _((PerlIO *,int)); | |
103 | #endif | |
104 | #ifndef PerlIO_fileno | |
105 | extern int PerlIO_fileno _((PerlIO *)); | |
106 | #endif | |
107 | #ifndef PerlIO_fdopen | |
108 | extern PerlIO * PerlIO_fdopen _((int, const char *)); | |
109 | #endif | |
110 | #ifndef PerlIO_importFILE | |
111 | extern PerlIO * PerlIO_importFILE _((FILE *,int)); | |
112 | #endif | |
113 | #ifndef PerlIO_exportFILE | |
114 | extern FILE * PerlIO_exportFILE _((PerlIO *,int)); | |
115 | #endif | |
116 | #ifndef PerlIO_findFILE | |
117 | extern FILE * PerlIO_findFILE _((PerlIO *)); | |
118 | #endif | |
119 | #ifndef PerlIO_releaseFILE | |
120 | extern void PerlIO_releaseFILE _((PerlIO *,FILE *)); | |
121 | #endif | |
122 | #ifndef PerlIO_read | |
f2d19c81 | 123 | extern int PerlIO_read _((PerlIO *,void *,size_t)); |
760ac839 LW |
124 | #endif |
125 | #ifndef PerlIO_write | |
f2d19c81 | 126 | extern int PerlIO_write _((PerlIO *,const void *,size_t)); |
760ac839 LW |
127 | #endif |
128 | #ifndef PerlIO_setlinebuf | |
f2d19c81 | 129 | extern void PerlIO_setlinebuf _((PerlIO *)); |
760ac839 LW |
130 | #endif |
131 | #ifndef PerlIO_printf | |
132 | extern int PerlIO_printf _((PerlIO *, const char *,...)) | |
f2d19c81 | 133 | __attribute__((format (printf, 2, 3))); |
760ac839 LW |
134 | #endif |
135 | #ifndef PerlIO_sprintf | |
136 | extern int PerlIO_sprintf _((char *, int, const char *,...)) | |
f2d19c81 | 137 | __attribute__((format (printf, 3, 4))); |
760ac839 LW |
138 | #endif |
139 | #ifndef PerlIO_vprintf | |
f2d19c81 | 140 | extern int PerlIO_vprintf _((PerlIO *, const char *, va_list)); |
760ac839 LW |
141 | #endif |
142 | #ifndef PerlIO_tell | |
143 | extern long PerlIO_tell _((PerlIO *)); | |
144 | #endif | |
145 | #ifndef PerlIO_seek | |
146 | extern int PerlIO_seek _((PerlIO *,off_t,int)); | |
147 | #endif | |
148 | #ifndef PerlIO_rewind | |
149 | extern void PerlIO_rewind _((PerlIO *)); | |
150 | #endif | |
151 | #ifndef PerlIO_has_base | |
f2d19c81 | 152 | extern int PerlIO_has_base _((PerlIO *)); |
760ac839 LW |
153 | #endif |
154 | #ifndef PerlIO_has_cntptr | |
f2d19c81 | 155 | extern int PerlIO_has_cntptr _((PerlIO *)); |
760ac839 LW |
156 | #endif |
157 | #ifndef PerlIO_fast_gets | |
f2d19c81 | 158 | extern int PerlIO_fast_gets _((PerlIO *)); |
760ac839 LW |
159 | #endif |
160 | #ifndef PerlIO_canset_cnt | |
f2d19c81 | 161 | extern int PerlIO_canset_cnt _((PerlIO *)); |
760ac839 LW |
162 | #endif |
163 | #ifndef PerlIO_get_ptr | |
888911fc | 164 | extern STDCHAR * PerlIO_get_ptr _((PerlIO *)); |
760ac839 LW |
165 | #endif |
166 | #ifndef PerlIO_get_cnt | |
f2d19c81 | 167 | extern int PerlIO_get_cnt _((PerlIO *)); |
760ac839 LW |
168 | #endif |
169 | #ifndef PerlIO_set_cnt | |
f2d19c81 | 170 | extern void PerlIO_set_cnt _((PerlIO *,int)); |
760ac839 LW |
171 | #endif |
172 | #ifndef PerlIO_set_ptrcnt | |
888911fc | 173 | extern void PerlIO_set_ptrcnt _((PerlIO *,STDCHAR *,int)); |
760ac839 LW |
174 | #endif |
175 | #ifndef PerlIO_get_base | |
888911fc | 176 | extern STDCHAR * PerlIO_get_base _((PerlIO *)); |
760ac839 LW |
177 | #endif |
178 | #ifndef PerlIO_get_bufsiz | |
f2d19c81 | 179 | extern int PerlIO_get_bufsiz _((PerlIO *)); |
760ac839 LW |
180 | #endif |
181 | #ifndef PerlIO_tmpfile | |
182 | extern PerlIO * PerlIO_tmpfile _((void)); | |
183 | #endif | |
184 | #ifndef PerlIO_stdin | |
185 | extern PerlIO * PerlIO_stdin _((void)); | |
186 | #endif | |
187 | #ifndef PerlIO_stdout | |
188 | extern PerlIO * PerlIO_stdout _((void)); | |
189 | #endif | |
190 | #ifndef PerlIO_stderr | |
191 | extern PerlIO * PerlIO_stderr _((void)); | |
192 | #endif | |
193 | #ifndef PerlIO_getpos | |
194 | extern int PerlIO_getpos _((PerlIO *,Fpos_t *)); | |
195 | #endif | |
196 | #ifndef PerlIO_setpos | |
197 | extern int PerlIO_setpos _((PerlIO *,const Fpos_t *)); | |
f2d19c81 | 198 | #endif |
760ac839 | 199 | #endif /* Include guard */ |