1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
|
2000-09-21 Bruno Haible <haible@clisp.cons.org>
* libio.h: For glibc-2.2, set _IO_USER_LOCK to the value defined
in /usr/include/libio.h.
1999-12-13 Jakub Jelinek <jakub@redhat.com>
* libio.h (_IO_cookie_io_functions_t): Use _IO_off_t instead of
_IO_fpos_t.
(_IO_seekoff, _IO_seekpos): Likewise. Use _IO_off64_t instead of
_IO_fpos64_t.
* libioP.h (_IO_seekoff_t, _IO_seekpos_t, _IO_seek_t): Likewise.
(_IO_seekoff, _IO_seekpos): Likewise.
(_IO_default_seekoff, _IO_default_seekpos): Likewise.
(_IO_default_seek): Likewise.
(_IO_file_seekoff, _IO_file_seek, _IO_str_seekoff): Likewise.
* streambuf.h (streampos): Typedef to _IO_off_t resp. _IO_off64_t.
* parsestream.h (class parsebuf::pos_at_line_start): Change type
to _IO_off_t.
*** libio/libio.h.jj Mon Jun 29 20:06:26 1998
--- libio/libio.h Thu Sep 21 02:14:17 2000
***************
*** 163,168 ****
--- 163,171 ----
#ifdef _IO_MTSAFE_IO
# if defined __GLIBC__ && __GLIBC__ >= 2
# if __GLIBC_MINOR__ > 0
+ # if __GLIBC_MINOR__ >= 2
+ # define _IO_USER_LOCK 0x8000
+ # endif
# include <bits/stdio-lock.h>
# else
# include <stdio-lock.h>
***************
*** 277,283 ****
{
_IO_ssize_t (*read) __PMT ((struct _IO_FILE *, void *, _IO_ssize_t));
_IO_ssize_t (*write) __PMT ((struct _IO_FILE *, const void *, _IO_ssize_t));
! _IO_fpos_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int));
int (*close) __PMT ((struct _IO_FILE *));
} _IO_cookie_io_functions_t;
--- 280,286 ----
{
_IO_ssize_t (*read) __PMT ((struct _IO_FILE *, void *, _IO_ssize_t));
_IO_ssize_t (*write) __PMT ((struct _IO_FILE *, const void *, _IO_ssize_t));
! _IO_off_t (*seek) __PMT ((struct _IO_FILE *, _IO_off_t, int));
int (*close) __PMT ((struct _IO_FILE *));
} _IO_cookie_io_functions_t;
***************
*** 348,358 ****
extern _IO_size_t _IO_sgetn __P ((_IO_FILE *, void *, _IO_size_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
! extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int));
#else
! extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
#endif
extern void _IO_free_backup_area __P ((_IO_FILE *));
--- 351,361 ----
extern _IO_size_t _IO_sgetn __P ((_IO_FILE *, void *, _IO_size_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
! extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int));
#else
! extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern void _IO_free_backup_area __P ((_IO_FILE *));
*** libio/libioP.h.jj Mon May 17 18:58:56 1999
--- libio/libioP.h Mon May 15 16:14:00 2000
***************
*** 146,155 ****
It matches the streambuf::seekoff virtual function.
It is also used for the ANSI fseek function. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _IO_fpos64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF,
int DIR, int MODE));
#else
! typedef _IO_fpos_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF,
int DIR, int MODE));
#endif
#define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE)
--- 146,155 ----
It matches the streambuf::seekoff virtual function.
It is also used for the ANSI fseek function. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _IO_off64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF,
int DIR, int MODE));
#else
! typedef _IO_off_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off_t OFF,
int DIR, int MODE));
#endif
#define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE)
***************
*** 160,168 ****
It is also used for the ANSI fgetpos and fsetpos functions. */
/* The _IO_seek_cur and _IO_seek_end options are not allowed. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _IO_fpos64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_fpos64_t, int));
#else
! typedef _IO_fpos_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_fpos_t, int));
#endif
#define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS)
--- 160,168 ----
It is also used for the ANSI fgetpos and fsetpos functions. */
/* The _IO_seek_cur and _IO_seek_end options are not allowed. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _IO_off64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
#else
! typedef _IO_off_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off_t, int));
#endif
#define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS)
***************
*** 213,221 ****
It matches the streambuf::sys_seek virtual function, which is
specific to this implementation. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _IO_fpos64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
#else
! typedef _IO_fpos_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int));
#endif
#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE)
--- 213,221 ----
It matches the streambuf::sys_seek virtual function, which is
specific to this implementation. */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _IO_off64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
#else
! typedef _IO_off_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off_t, int));
#endif
#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE)
***************
*** 298,308 ****
/* Generic functions */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_fpos64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
! extern _IO_fpos64_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos64_t, int));
#else
! extern _IO_fpos_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_fpos_t _IO_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
#endif
extern void _IO_switch_to_main_get_area __P ((_IO_FILE *));
--- 298,308 ----
/* Generic functions */
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_off64_t _IO_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
! extern _IO_off64_t _IO_seekpos __P ((_IO_FILE *, _IO_off64_t, int));
#else
! extern _IO_off_t _IO_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_off_t _IO_seekpos __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern void _IO_switch_to_main_get_area __P ((_IO_FILE *));
***************
*** 340,361 ****
_IO_size_t));
extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_fpos64_t _IO_default_seekoff __P ((_IO_FILE *,
_IO_off64_t, int, int));
! extern _IO_fpos64_t _IO_default_seekpos __P ((_IO_FILE *,
! _IO_fpos64_t, int));
#else
! extern _IO_fpos_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_fpos_t _IO_default_seekpos __P ((_IO_FILE *, _IO_fpos_t, int));
#endif
extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *,
_IO_ssize_t));
extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t));
extern int _IO_default_stat __P ((_IO_FILE *, void *));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_fpos64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
! extern _IO_fpos_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern int _IO_default_sync __P ((_IO_FILE *));
#define _IO_default_close ((_IO_close_t) _IO_default_sync)
--- 340,361 ----
_IO_size_t));
extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *,
_IO_off64_t, int, int));
! extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *,
! _IO_off64_t, int));
#else
! extern _IO_off_t _IO_default_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_off_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *,
_IO_ssize_t));
extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t));
extern int _IO_default_stat __P ((_IO_FILE *, void *));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
! extern _IO_off_t _IO_default_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern int _IO_default_sync __P ((_IO_FILE *));
#define _IO_default_close ((_IO_close_t) _IO_default_sync)
***************
*** 389,399 ****
extern int _IO_file_doallocate __P ((_IO_FILE *));
extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_fpos64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
! extern _IO_fpos64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
! extern _IO_fpos_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_fpos_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
extern int _IO_file_stat __P ((_IO_FILE *, void *));
--- 389,399 ----
extern int _IO_file_doallocate __P ((_IO_FILE *));
extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_off64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
! extern _IO_off64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
#else
! extern _IO_off_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
! extern _IO_off_t _IO_file_seek __P ((_IO_FILE *, _IO_off_t, int));
#endif
extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
extern int _IO_file_stat __P ((_IO_FILE *, void *));
***************
*** 427,435 ****
extern int _IO_str_overflow __P ((_IO_FILE *, int));
extern int _IO_str_pbackfail __P ((_IO_FILE *, int));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_fpos64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
#else
! extern _IO_fpos_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
#endif
extern void _IO_str_finish __P ((_IO_FILE *, int));
--- 427,435 ----
extern int _IO_str_overflow __P ((_IO_FILE *, int));
extern int _IO_str_pbackfail __P ((_IO_FILE *, int));
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! extern _IO_off64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
#else
! extern _IO_off_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off_t, int, int));
#endif
extern void _IO_str_finish __P ((_IO_FILE *, int));
***************
*** 544,555 ****
where an _IO_fpos_t is a struct.
Note that _IO_off_t must be an integral type. */
! /* _IO_pos_BAD is an _IO_fpos_t value indicating error, unknown, or EOF. */
#ifndef _IO_pos_BAD
# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! # define _IO_pos_BAD ((_IO_fpos64_t) -1)
# else
! # define _IO_pos_BAD ((_IO_fpos_t) -1)
# endif
#endif
/* _IO_pos_as_off converts an _IO_fpos_t value to an _IO_off_t value. */
--- 544,555 ----
where an _IO_fpos_t is a struct.
Note that _IO_off_t must be an integral type. */
! /* _IO_pos_BAD is an _IO_off_t value indicating error, unknown, or EOF. */
#ifndef _IO_pos_BAD
# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! # define _IO_pos_BAD ((_IO_off64_t) -1)
# else
! # define _IO_pos_BAD ((_IO_off_t) -1)
# endif
#endif
/* _IO_pos_as_off converts an _IO_fpos_t value to an _IO_off_t value. */
*** libio/streambuf.h.jj Sun Aug 8 20:07:01 1999
--- libio/streambuf.h Mon May 15 16:04:27 2000
***************
*** 72,81 ****
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
typedef _IO_off64_t streamoff;
! typedef _IO_fpos64_t streampos;
#else
typedef _IO_off_t streamoff;
! typedef _IO_fpos_t streampos;
#endif
typedef _IO_ssize_t streamsize;
--- 72,81 ----
#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
typedef _IO_off64_t streamoff;
! typedef _IO_off64_t streampos;
#else
typedef _IO_off_t streamoff;
! typedef _IO_off_t streampos;
#endif
typedef _IO_ssize_t streamsize;
*** libio/parsestream.h.jj Thu Aug 21 18:58:20 1997
--- libio/parsestream.h Mon May 15 16:04:27 2000
***************
*** 42,48 ****
class parsebuf : public streambuf {
protected:
! _IO_fpos_t pos_at_line_start;
long _line_length;
unsigned long __line_number;
char *buf_start;
--- 42,48 ----
class parsebuf : public streambuf {
protected:
! _IO_off_t pos_at_line_start;
long _line_length;
unsigned long __line_number;
char *buf_start;
|