1 |
786 |
skrzyp |
2009-08-20 Uwe Kindler
|
2 |
|
|
|
3 |
|
|
* cdl/stdio.cdl Added option CYGIMP_LIBC_STDIO_C99_SNPRINTF
|
4 |
|
|
for activation of C99 compliant snprintf() return value.
|
5 |
|
|
* src/output/vfnprintf.cxx: Added optional C99 compliant return
|
6 |
|
|
value calculation.
|
7 |
|
|
* tests/snprintf.c: New test for snprintf including C99
|
8 |
|
|
implementation.
|
9 |
|
|
|
10 |
|
|
2009-08-07 Jonathan Larmour
|
11 |
|
|
|
12 |
|
|
* src/common/vsnprintf.cxx (class Cyg_VsnprintfStream):
|
13 |
|
|
Remove destructor.
|
14 |
|
|
(vsnprintf): Apply null terminator correctly when truncated.
|
15 |
|
|
|
16 |
|
|
2009-02-16 Lars Povlsen
|
17 |
|
|
|
18 |
|
|
* include/stdio.h: Removed extra semicolon after scanf()
|
19 |
|
|
prototype.
|
20 |
|
|
|
21 |
|
|
2009-01-18 Jonathan Larmour
|
22 |
|
|
|
23 |
|
|
* src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): Fix silly
|
24 |
|
|
typo in last change.
|
25 |
|
|
|
26 |
|
|
2009-01-15 Jonathan Larmour
|
27 |
|
|
|
28 |
|
|
* src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): Ensure the
|
29 |
|
|
files table can't change. Thanks to Xiaochen Zhou for the detective
|
30 |
|
|
work.
|
31 |
|
|
|
32 |
|
|
2008-07-21 Guenter Ebermann
|
33 |
|
|
|
34 |
|
|
* src/common/fclose.cxx (fclose): Replace config-dependent use of
|
35 |
|
|
delete with free(), as the memory had been allocated with malloc.
|
36 |
|
|
|
37 |
|
|
2007-07-02 Gary Thomas
|
38 |
|
|
|
39 |
|
|
* src/output/vfnprintf.cxx: Add (char *) casts to make GCC/4.2.x happy.
|
40 |
|
|
|
41 |
|
|
2007-02-05 Sergei Organov
|
42 |
|
|
|
43 |
|
|
* src/output/vfnprintf.cxx (vfnprintf): while formatting integers
|
44 |
|
|
in decimal, convert the value to unsigned long from unsigned long
|
45 |
|
|
long before processing, unless we actually print long long
|
46 |
|
|
argument. This tremendously speeds-up the formatting.
|
47 |
|
|
|
48 |
|
|
2007-01-16 Sergei Organov
|
49 |
|
|
|
50 |
|
|
Speed-up [v]s[n]printf() functions by a factor of about 2+. In
|
51 |
|
|
particular, sprintf(s, "%s", "") becomes faster 2.8 times,
|
52 |
|
|
printing of every character -- 1.7 times, and, as a result, e.g.,
|
53 |
|
|
printing of a string of length 50 -- 2.2 times.
|
54 |
|
|
|
55 |
|
|
* include/stream.hxx (class Cyg_OutputStream): New ABC.
|
56 |
|
|
(class Cyg_StdioStream): inherit from Cyg_OutputStream; make
|
57 |
|
|
the destructor, write(), and get_error() virtual.
|
58 |
|
|
|
59 |
|
|
* src/output/vfnprintf.cxx (vfnprintf): Use ABC Cyg_OutputStream
|
60 |
|
|
instead of Cyg_StdioStream.
|
61 |
|
|
|
62 |
|
|
* src/common/vsnprintf.cxx (class Cyg_VsnprintfStream): New class
|
63 |
|
|
that specializes Cyg_OutputStream for output to a string.
|
64 |
|
|
(vsnprintf): Use Cyg_VsnprintfStream for printing to a string.
|
65 |
|
|
|
66 |
|
|
2006-12-22 Sergei Organov
|
67 |
|
|
|
68 |
|
|
* src/output/vfnprintf.cxx (vfnprintf): Speed-up formatting of
|
69 |
|
|
decimal integers by replacing modulo operation with multiply and
|
70 |
|
|
subtract.
|
71 |
|
|
|
72 |
|
|
2006-09-27 Jonathan Larmour
|
73 |
|
|
|
74 |
|
|
* include/stdio.h: Make fpos_t be signed to allow negative
|
75 |
|
|
SEEK_CUR offsets to fseek().
|
76 |
|
|
* include/stream.inl (set_position): If SEEK_CUR, then if
|
77 |
|
|
having to reconcile difference between position and underlying
|
78 |
|
|
file position, then requested seek position needs adjusting
|
79 |
|
|
for buffer size.
|
80 |
|
|
Both above reported and analysed by Ivan Djelic.
|
81 |
|
|
|
82 |
|
|
2006-09-26 Jonathan Larmour
|
83 |
|
|
|
84 |
|
|
* src/common/stream.cxx (read): Only update position after direct
|
85 |
|
|
reads from I/O system so it's updated by the correct number of
|
86 |
|
|
bytes.
|
87 |
|
|
(write): Reset underlying file position if there had been
|
88 |
|
|
stuff read from the file left in the buffer so the file positions
|
89 |
|
|
are inconsistent.
|
90 |
|
|
|
91 |
|
|
2005-07-22 Andrew Lunn
|
92 |
|
|
|
93 |
|
|
* src/common/fopen.cxx (fopen): Default the open mode to Read
|
94 |
|
|
until we have process the flags. Initialize the dev handle. These
|
95 |
|
|
keep the compiler happy.
|
96 |
|
|
|
97 |
|
|
2005-04-11 Jonathan Larmour
|
98 |
|
|
|
99 |
|
|
* src/common/stream.cxx (read): don't reference flags.buffering
|
100 |
|
|
when configured by CDL to be unbuffered.
|
101 |
|
|
|
102 |
|
|
2005-03-27 Andrew Lunn
|
103 |
|
|
|
104 |
|
|
* include/stdio.h: Added CYGBLD_ATTRIB_{PRINTF|SCANF}_FORMAT where
|
105 |
|
|
appropriate so the compiler does more checking.
|
106 |
|
|
|
107 |
|
|
2004-12-08 Daniel Neri
|
108 |
|
|
|
109 |
|
|
* cdl/stdio.cdl (CYGPKG_LIBC_STDIO_FILEIO): The FILEIO variant of
|
110 |
|
|
vsnprintf breaks if CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF is disabled.
|
111 |
|
|
|
112 |
|
|
2004-09-27 Jonathan Larmour
|
113 |
|
|
|
114 |
|
|
* cdl/stdio.cdl (CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS): New option,
|
115 |
|
|
to control whether or not fdopen()/fileno() are implemented.
|
116 |
|
|
Only build fopen/fclose if CYGPKG_LIBC_STDIO_OPEN.
|
117 |
|
|
|
118 |
|
|
* src/common/fclose.cxx: Can remove ifdef CYGPKG_LIBC_STDIO_OPEN since
|
119 |
|
|
file now isn't even built if not.
|
120 |
|
|
* src/common/fopen.cxx: Ditto. Also condition on
|
121 |
|
|
CYGFUN_LIBC_STDIO_OPEN_POSIX_FDFUNCS so decision is centralised in CDL.
|
122 |
|
|
|
123 |
|
|
2004-08-18 Jonathan Larmour
|
124 |
|
|
|
125 |
|
|
* cdl/stdio.cdl (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Only use
|
126 |
|
|
CYGDAT_IO_SERIAL_TTY_CONSOLE if set.
|
127 |
|
|
|
128 |
|
|
2004-08-18 Fredrik Hederstierna
|
129 |
|
|
2004-08-18 Jonathan Larmour
|
130 |
|
|
|
131 |
|
|
* src/input/vfscanf.cxx (vfscanf): Add long long and long double
|
132 |
|
|
support.
|
133 |
|
|
* cdl/stdio.cdl (CYGFUN_LIBC_STDIO_LONGLONG): Make it a new option.
|
134 |
|
|
|
135 |
|
|
2004-08-16 Oyvind Harboe
|
136 |
|
|
|
137 |
|
|
* src/common/stream.cxx (read): fixed performance problem with
|
138 |
|
|
unbuffered reads. Long unbuffered i/o read requests would cause
|
139 |
|
|
one roundtrip to the underlying file system for each byte, instead
|
140 |
|
|
of a single trip as intended.
|
141 |
|
|
|
142 |
|
|
2004-03-29 Kelvin Lawson
|
143 |
|
|
|
144 |
|
|
* src/common/fopen.cxx:
|
145 |
|
|
* src/common/stream.cxx:
|
146 |
|
|
* include/io.inl:
|
147 |
|
|
* include/stream.hxx:
|
148 |
|
|
Split CYGSTREAM_READWRITE into CYGSTREAM_READWRITE_CREATE and
|
149 |
|
|
CYGSTREAM_READWRITE_NOCREATE. This fixes fopen() with mode 'w+'
|
150 |
|
|
which previously did not allow file creation.
|
151 |
|
|
|
152 |
|
|
2004-03-27 Andrew Lunn
|
153 |
|
|
|
154 |
|
|
* include/stream.inl (set_position): Flush the output buffer
|
155 |
|
|
before seeking the underlying file otherwise the writes ends up in
|
156 |
|
|
the wrong location in the file.
|
157 |
|
|
|
158 |
|
|
2004-03-15 Jonathan Larmour
|
159 |
|
|
|
160 |
|
|
* src/common/fileops.cxx (tmpnam): Only close if open() succeded.
|
161 |
|
|
|
162 |
|
|
2004-03-12 Jonathan Larmour
|
163 |
|
|
|
164 |
|
|
* src/input/vfscanf.cxx (vfscanf): Silence warning.
|
165 |
|
|
|
166 |
|
|
* include/stdio.h:
|
167 |
|
|
Add file operation functions which weren't here before!
|
168 |
|
|
While I'm here, add __THROW everywhere and use __externC not externC.
|
169 |
|
|
|
170 |
|
|
* cdl/stdio.cdl: We implement stdio fileops in isoinfra now.
|
171 |
|
|
Also set header for that.
|
172 |
|
|
Build fileops.cxx.
|
173 |
|
|
L_tmpnam must be at least 4.
|
174 |
|
|
TMP_MAX must be at least 1, and ISO C says it should be >=25.
|
175 |
|
|
Add description for CYGPKG_LIBC_STDIO_FILEIO and move up from
|
176 |
|
|
bottom so it goes with others.
|
177 |
|
|
|
178 |
|
|
* src/common/fileops.cxx: New file. Implements rename(), remove(),
|
179 |
|
|
tmpnam() and tmpfile().
|
180 |
|
|
|
181 |
|
|
* src/common/fclose.cxx: Add throw specifiers to match stdio.h.
|
182 |
|
|
* src/common/feof.cxx: Ditto.
|
183 |
|
|
* src/common/fflush.cxx: Ditto.
|
184 |
|
|
* src/common/fopen.cxx: Ditto.
|
185 |
|
|
* src/common/freopen.cxx: Ditto.
|
186 |
|
|
* src/common/fseek.cxx: Ditto.
|
187 |
|
|
* src/common/setvbuf.cxx: Ditto.
|
188 |
|
|
* src/common/snprintf.cxx: Ditto.
|
189 |
|
|
* src/common/sprintf.cxx: Ditto.
|
190 |
|
|
* src/common/sscanf.cxx: Ditto.
|
191 |
|
|
* src/common/stdioinlines.cxx: Ditto.
|
192 |
|
|
* src/common/ungetc.cxx: Ditto.
|
193 |
|
|
* src/common/vsnprintf.cxx: Ditto.
|
194 |
|
|
* src/common/vsscanf.cxx: Ditto.
|
195 |
|
|
* src/input/fgetc.cxx: Ditto.
|
196 |
|
|
* src/input/fgets.cxx: Ditto.
|
197 |
|
|
* src/input/fread.cxx: Ditto.
|
198 |
|
|
* src/input/fscanf.cxx: Ditto.
|
199 |
|
|
* src/input/gets.cxx: Ditto.
|
200 |
|
|
* src/input/scanf.cxx: Ditto.
|
201 |
|
|
* src/input/vfscanf.cxx: Ditto.
|
202 |
|
|
* src/output/fnprintf.cxx: Ditto.
|
203 |
|
|
* src/output/fprintf.cxx: Ditto.
|
204 |
|
|
* src/output/fputc.cxx: Ditto.
|
205 |
|
|
* src/output/fputs.cxx: Ditto.
|
206 |
|
|
* src/output/fwrite.cxx: Ditto.
|
207 |
|
|
* src/output/printf.cxx: Ditto.
|
208 |
|
|
* src/output/vfnprintf.cxx: Ditto.
|
209 |
|
|
|
210 |
|
|
2004-02-17 Jonathan Larmour
|
211 |
|
|
|
212 |
|
|
* cdl/stdio.cdl (CYGSEM_LIBC_STDIO_THREAD_SAFE_STREAMS): Can
|
213 |
|
|
be inactive when no kernel.
|
214 |
|
|
* cdl/stdio.cdl: Implements file positioning functions in isoinfra.
|
215 |
|
|
|
216 |
|
|
2003-09-03 Thomas Koeller
|
217 |
|
|
|
218 |
|
|
* cdl/stdio.cdl: only require "/dev/haldiag" if actually using it.
|
219 |
|
|
|
220 |
|
|
2003-08-12 Scott Wilkinson
|
221 |
|
|
|
222 |
|
|
* src/common/fclose.cxx (fclose): fclose would seg-fault if passed
|
223 |
|
|
NULL FILE pointer. Now returns error. Also cleaned up some exit
|
224 |
|
|
paths to call Cyg_libc_stdio_files::unlock()
|
225 |
|
|
|
226 |
|
|
* src/common/fopen.cxx (fopen): Cleaned up some exit paths to call
|
227 |
|
|
Cyg_libc_stdio_files::unlock()
|
228 |
|
|
|
229 |
|
|
2003-06-10 Andrew Lunn
|
230 |
|
|
Knud Wöhler
|
231 |
|
|
|
232 |
|
|
* src/output/vfnprintf.cxx (SARG): Cast size_t to long. This seems
|
233 |
|
|
to stop gcc from producing wrong code for the plain int clause. The
|
234 |
|
|
wrong code causes negative numbers to be printed as positive because
|
235 |
|
|
the sign extend from 32 bits to 64 bits is wrong.
|
236 |
|
|
|
237 |
|
|
2003-03-06 Gary Thomas
|
238 |
|
|
|
239 |
|
|
* src/input/fread.cxx (fread): Simple EOF should not set error.
|
240 |
|
|
|
241 |
|
|
* tests/fileio.c: New file.
|
242 |
|
|
* cdl/stdio.cdl: Add new file I/O tests.
|
243 |
|
|
|
244 |
|
|
2003-02-24 Jonathan Larmour
|
245 |
|
|
|
246 |
|
|
* cdl/stdio.cdl: Fix doc link.
|
247 |
|
|
|
248 |
|
|
2003-02-15 Fabrice Gautier
|
249 |
|
|
|
250 |
|
|
* include/stdio.inl (setbuf): Don't supply size with _IONBF.
|
251 |
|
|
* src/common/stdioinlines.cxx (setbuf): Ditto.
|
252 |
|
|
|
253 |
|
|
2003-01-29 Jonathan Larmour
|
254 |
|
|
|
255 |
|
|
* src/output/vfnprintf.cxx: Add support for C99 'z' flag (size_t).
|
256 |
|
|
|
257 |
|
|
2002-09-02 Andrew Lunn
|
258 |
|
|
|
259 |
|
|
* include/stream.inl (set_position): Fixed typo in none buffered
|
260 |
|
|
case. Seek pos bytes, not whence bytes.
|
261 |
|
|
|
262 |
|
|
2002-05-17 Martin Buck
|
263 |
|
|
|
264 |
|
|
* include/stdio.h (fnprintf): Added printf-format-checking using
|
265 |
|
|
CYGBLD_ATTRIB_PRINTF_FORMAT, since gcc does it automatically only for
|
266 |
|
|
ISO C90 functions.
|
267 |
|
|
(snprintf) Likewise.
|
268 |
|
|
|
269 |
|
|
2002-04-24 Yoshinori Sato
|
270 |
|
|
|
271 |
|
|
* include/streambuf.inl (Cyg_StdioStreamBuffer constructor):
|
272 |
|
|
Don't set default args in func definition.
|
273 |
|
|
(set_buffer): Ditto.
|
274 |
|
|
|
275 |
|
|
2002-04-05 Jonathan Larmour
|
276 |
|
|
|
277 |
|
|
* src/input/fgetc.cxx (fgetc): Silence conversion warning.
|
278 |
|
|
|
279 |
|
|
2002-04-04 Jonathan Larmour
|
280 |
|
|
|
281 |
|
|
* src/common/fopen.cxx (fopen_inner): Allocate memory using malloc and
|
282 |
|
|
placement new, not default new.
|
283 |
|
|
|
284 |
|
|
* src/input/fgetc.cxx (fgetc): Don't set error on true EOF.
|
285 |
|
|
|
286 |
|
|
2002-04-04 Jurica Baricevic
|
287 |
|
|
|
288 |
|
|
* src/common/fclose.cxx (fclose): Use delete if we can.
|
289 |
|
|
|
290 |
|
|
2002-02-06 Jonathan Larmour
|
291 |
|
|
|
292 |
|
|
* src/input/fread.cxx (fread): when looping read into ptrc, not ptr!
|
293 |
|
|
|
294 |
|
|
2002-01-25 Jonathan Larmour
|
295 |
|
|
|
296 |
|
|
* include/stream.inl (set_position): Fix the seek backwards case again.
|
297 |
|
|
Doh!
|
298 |
|
|
|
299 |
|
|
2002-01-24 Jonathan Larmour
|
300 |
|
|
|
301 |
|
|
* include/stream.inl (set_position): Fix the posdiff == 0 case.
|
302 |
|
|
|
303 |
|
|
2002-01-24 Jesper Skov
|
304 |
|
|
|
305 |
|
|
* include/stream.inl (set_position): Check that posdiff is >0
|
306 |
|
|
before taking the code path that assumes so.
|
307 |
|
|
|
308 |
|
|
2002-01-17 Jonathan Larmour
|
309 |
|
|
|
310 |
|
|
* include/stream.inl (set_position): Use an off_t for bytesavail to
|
311 |
|
|
prevent warnings.
|
312 |
|
|
|
313 |
|
|
2001-12-05 Jonathan Larmour
|
314 |
|
|
|
315 |
|
|
* src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): Fix starvation
|
316 |
|
|
problem when waiting for threads to unlock of lower priority.
|
317 |
|
|
Fix for bug #57014.
|
318 |
|
|
|
319 |
|
|
2001-11-23 Jonathan Larmour
|
320 |
|
|
|
321 |
|
|
* cdl/stdio.cdl: Add dependency on stdlib string conversion functions
|
322 |
|
|
for *scanf.
|
323 |
|
|
|
324 |
|
|
2001-08-10 Robin Farine
|
325 |
|
|
|
326 |
|
|
* src/output/vfnprintf.cxx (cvt): Handles the cases of finite,
|
327 |
|
|
NaN and infinite numbers separately.
|
328 |
|
|
|
329 |
|
|
* src/common/stream.cxx (read): Read correct number of bytes when
|
330 |
|
|
a character has been "ungot".
|
331 |
|
|
|
332 |
|
|
2001-08-03 Jonathan Larmour
|
333 |
|
|
|
334 |
|
|
* include/streambuf.inl (~Cyg_StdioStreamBuffer): use correct configury
|
335 |
|
|
to decide when to call free.
|
336 |
|
|
|
337 |
|
|
2001-07-27 Jesper Skov
|
338 |
|
|
|
339 |
|
|
* src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): The check
|
340 |
|
|
for last operation being a read is only valid in buffered IO mode.
|
341 |
|
|
|
342 |
|
|
2001-07-20 Jonathan Larmour
|
343 |
|
|
|
344 |
|
|
* include/stream.inl (set_position): Take read buffer into account
|
345 |
|
|
when seeking. Thanks to jjtsai for the
|
346 |
|
|
help.
|
347 |
|
|
|
348 |
|
|
2001-07-12 Jonathan Larmour
|
349 |
|
|
|
350 |
|
|
* src/common/fflush.cxx (cyg_libc_stdio_flush_all_but): Don't
|
351 |
|
|
flush a stream that was last used for reading - it doesn't need it.
|
352 |
|
|
* include/stream.hxx: cyg_libc_stdio_flush_all_but needs to be a
|
353 |
|
|
friend of class Cyg_StdioStream to do the above.
|
354 |
|
|
|
355 |
|
|
2001-06-18 Jonathan Larmour
|
356 |
|
|
|
357 |
|
|
* src/input/fread.cxx (fread): Fix compilation problem with below
|
358 |
|
|
change.
|
359 |
|
|
|
360 |
|
|
2001-06-15 Rob Jansen
|
361 |
|
|
|
362 |
|
|
* src/input/fread.cxx (fread): Changed to read the requested amount
|
363 |
|
|
of data items instead of stopping on CYG_LIBC_STDIO_BUFSIZE boundaries.
|
364 |
|
|
|
365 |
|
|
2001-06-08 Jeff Johnston
|
366 |
|
|
|
367 |
|
|
* src/input/vfscanf.cxx (vfscanf)[CYGINT_LIBC_I18N_MB_REQUIRED]: Added
|
368 |
|
|
call to mbtowc_fn for current locale to process format string.
|
369 |
|
|
Also added variable definitions needed in this circumstance.
|
370 |
|
|
* src/output/vfnprintf.cxx (vfnprintf)[CYGINT_LIBC_I18N_MB_REQUIRED]: Ditto.
|
371 |
|
|
(vfnprintf): Changed non-multibyte path to simply use the current
|
372 |
|
|
character rather than call the C mbtowc function since only
|
373 |
|
|
single byte characters would be possible.
|
374 |
|
|
|
375 |
|
|
2001-03-19 Jonathan Larmour
|
376 |
|
|
|
377 |
|
|
* src/common/stream.cxx (refill_read_buffer): Flush all streams here...
|
378 |
|
|
(read): ...rather than here, or...
|
379 |
|
|
(read_byte): ...here.
|
380 |
|
|
This means less flushing, which improves performance.
|
381 |
|
|
|
382 |
|
|
* src/input/fgets.cxx: Add a reminder comment to improve this later.
|
383 |
|
|
* src/input/gets.cxx: Ditto.
|
384 |
|
|
|
385 |
|
|
|
386 |
|
|
2001-03-16 Jonathan Larmour
|
387 |
|
|
|
388 |
|
|
* include/stream.hxx (class Cyg_StdioStream): Improve member visibility.
|
389 |
|
|
|
390 |
|
|
* src/common/stream.cxx (refill_read_buffer): Ensure eof is set.
|
391 |
|
|
* src/common/feof.cxx: New file. Implements the long lost
|
392 |
|
|
feof(), ferror() and clearerr() functions which were MIA for
|
393 |
|
|
no good reason.
|
394 |
|
|
* cdl/stdio.cdl: Build it.
|
395 |
|
|
|
396 |
|
|
2001-03-15 Jonathan Larmour
|
397 |
|
|
|
398 |
|
|
* cdl/stdio.cdl (CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE): Default to
|
399 |
|
|
tty default console.
|
400 |
|
|
|
401 |
|
|
* src/input/fgets.cxx (fgets): Reimplement to work with EOF properly.
|
402 |
|
|
Add tracing.
|
403 |
|
|
* src/input/gets.cxx (gets): Ditto.
|
404 |
|
|
|
405 |
|
|
* include/io.hxx, include/io.inl, include/stream.hxx,
|
406 |
|
|
include/stream.inl, include/streambuf.hxx, include/streambuf.inl:
|
407 |
|
|
Silence warnings from recent compilers.
|
408 |
|
|
|
409 |
|
|
2001-02-01 Jonathan Larmour
|
410 |
|
|
|
411 |
|
|
* cdl/stdio.cdl (CYGPKG_LIBC_STDIO_OPEN): Implements
|
412 |
|
|
CYGINT_ISO_STDIO_POSIX_FDFUNCS ( fileno() and fdopen() ).
|
413 |
|
|
|
414 |
|
|
2000-11-01 Jonathan Larmour
|
415 |
|
|
|
416 |
|
|
* include/stdio.h: Make FILE array type larger to be more resistant
|
417 |
|
|
against small data sections.
|
418 |
|
|
Lose the cyg_libc_stdio_stdin/out/err definitions with macros for
|
419 |
|
|
stdin/stdout/err since it can cause problems with libgcc exception
|
420 |
|
|
code. Instead just make these extern FILE *s.
|
421 |
|
|
* src/common/stderr.cxx:
|
422 |
|
|
* src/common/stdin.cxx:
|
423 |
|
|
* src/common/stdout.cxx:
|
424 |
|
|
Define objects with init priority corresponding to order the fd's
|
425 |
|
|
should be allocated where applicable.
|
426 |
|
|
Define actual stdin, stdout, stderr externally visible constants to
|
427 |
|
|
point to the streams.
|
428 |
|
|
|
429 |
|
|
* cdl/stdio.cdl: Support CYGINT_ISO_STDIO_STREAMS interface
|
430 |
|
|
|
431 |
|
|
* src/common/fopen.cxx (fdopen): return f as intended
|
432 |
|
|
|
433 |
|
|
2000-10-23 Jesper Skov
|
434 |
|
|
|
435 |
|
|
* include/streambuf.inl: Adjust assertions to cope with buffers
|
436 |
|
|
generated by sprintf and similar non-bound-buffer calls.
|
437 |
|
|
|
438 |
|
|
2000-08-09 Jonathan Larmour
|
439 |
|
|
|
440 |
|
|
* include/io.inl: No need to include string.h
|
441 |
|
|
|
442 |
|
|
* cdl/stdio.cdl: Add some more requires statements
|
443 |
|
|
|
444 |
|
|
2000-08-07 Jonathan Larmour
|
445 |
|
|
|
446 |
|
|
* src/common/stream.cxx (Cyg_StdioStream::Cyg_StdioStream):
|
447 |
|
|
Only call io_buf members conditionally.
|
448 |
|
|
|
449 |
|
|
2000-08-03 Jonathan Larmour
|
450 |
|
|
|
451 |
|
|
* src/common/fseek.cxx: Include assertion and tracing support since
|
452 |
|
|
they are used.
|
453 |
|
|
|
454 |
|
|
2000-07-20 Nick Garnett
|
455 |
|
|
|
456 |
|
|
* include/stream.hxx (class Cyg_StdioStream): Added get_dev()
|
457 |
|
|
accessor member function to return underlying device handle.
|
458 |
|
|
|
459 |
|
|
* src/common/fopen.cxx: Added fdopen() and fileno(). Reorganized
|
460 |
|
|
fopen() so that code common with fdopen() is now in a separate
|
461 |
|
|
function.
|
462 |
|
|
|
463 |
|
|
* src/common/stdiosupp.cxx (Cyg_libc_stdio_find_filename): Removed
|
464 |
|
|
compiler warning.
|
465 |
|
|
|
466 |
|
|
2000-07-13 Nick Garnett
|
467 |
|
|
|
468 |
|
|
* cdl/stdio.cdl: Added common/fseek.cxx to compile list.
|
469 |
|
|
Reorganized options for stream buffering:
|
470 |
|
|
CYGSEM_LIBC_STDIO_DYNAMIC_SETVBUF now controls whether the user
|
471 |
|
|
can attach their own buffer to the stream.
|
472 |
|
|
CYGSEM_LIBC_STDIO_SETVBUF_MALLOC controls whether buffers can be
|
473 |
|
|
malloced or only statically defined.
|
474 |
|
|
Added CYGPKG_LIBC_STDIO_FILEIO option to control whether the STDIO
|
475 |
|
|
package uses the FILEIO package for all IO, or goes directly to
|
476 |
|
|
the device drivers as before.
|
477 |
|
|
|
478 |
|
|
* include/stdio.h: Added file positioning calls defined in section
|
479 |
|
|
7.9.9 of the standard.
|
480 |
|
|
|
481 |
|
|
* include/io.hxx:
|
482 |
|
|
* include/io.inl:
|
483 |
|
|
Added these files to define an abstraction layer for access to the
|
484 |
|
|
real device underlying an IO stream. Depending on
|
485 |
|
|
CYGPKG_LIBC_STDIO_FILEIO this either goes to the FILEIO package or
|
486 |
|
|
directly to the device drivers.
|
487 |
|
|
|
488 |
|
|
* include/stream.hxx:
|
489 |
|
|
Modifications to use io.hxx abstractions.
|
490 |
|
|
Added second constructor for creating a buffer-only stream.
|
491 |
|
|
Added initialize() function which contains most of the common
|
492 |
|
|
stream initialization code.
|
493 |
|
|
Added a close() member function.
|
494 |
|
|
|
495 |
|
|
* include/stream.inl:
|
496 |
|
|
Modifications to use io.hxx abstractions.
|
497 |
|
|
Moved most of the work of the destructor into close() member.
|
498 |
|
|
Added FILEIO version of set_position() member function.
|
499 |
|
|
|
500 |
|
|
* include/streambuf.hxx:
|
501 |
|
|
* include/streambuf.inl:
|
502 |
|
|
* src/common/streambuf.cxx:
|
503 |
|
|
Rearranged to match new buffering configuration options.
|
504 |
|
|
|
505 |
|
|
* src/common/stream.cxx:
|
506 |
|
|
Modifications to use io.hxx abstractions.
|
507 |
|
|
Added second constructor, and moved common initialization code to
|
508 |
|
|
initialize() member function.
|
509 |
|
|
Added code to make position member correctly track current file
|
510 |
|
|
position.
|
511 |
|
|
|
512 |
|
|
* src/common/fopen.cxx:
|
513 |
|
|
Fixed handling of write/append in process_mode().
|
514 |
|
|
Moved call of process_mode() to before call to cyg_stdio_open() so
|
515 |
|
|
that stream modes may be passed in.
|
516 |
|
|
Added code to detect an interactive stream and choose non-buffered
|
517 |
|
|
mode - fully buffered is now the default.
|
518 |
|
|
Added calls to cyg_stdio_close() where appropriate.
|
519 |
|
|
|
520 |
|
|
* src/output/vfnprintf.cxx: Removed FLUSH() macro and its
|
521 |
|
|
uses. Deciding to flush should be in the hands of the buffer code,
|
522 |
|
|
or the user calling fflush().
|
523 |
|
|
|
524 |
|
|
* src/common/vsscanf.cxx:
|
525 |
|
|
Added FILEIO variant of vsscanf(). This uses a precharged stream
|
526 |
|
|
object to emulate input.
|
527 |
|
|
|
528 |
|
|
* src/common/vsnprintf.cxx:
|
529 |
|
|
Added FILEIO variant of vsnprintf(). This uses the standard stream
|
530 |
|
|
object to print into the supplied buffer.
|
531 |
|
|
|
532 |
|
|
* src/common/fseek.cxx:
|
533 |
|
|
Added this file to implement file positioning functions.
|
534 |
|
|
|
535 |
|
|
* src/common/fclose.cxx (fclose):
|
536 |
|
|
Added call to Cyg_StdioStream::close().
|
537 |
|
|
|
538 |
|
|
* include/stdiosupp.hxx:
|
539 |
|
|
* src/common/stdiosupp.cxx:
|
540 |
|
|
Modified Cyg_libc_stdio_find_filename() to take mode, binary and
|
541 |
|
|
append arguments.
|
542 |
|
|
|
543 |
|
|
* src/common/stdin.cxx:
|
544 |
|
|
* src/common/stdout.cxx:
|
545 |
|
|
* src/common/stderr.cxx:
|
546 |
|
|
Modified calls to Cyg_libc_stdio_find_filename() to pass
|
547 |
|
|
appropriate values for mode, binary and append arguments.
|
548 |
|
|
|
549 |
|
|
2000-06-18 Jonathan Larmour
|
550 |
|
|
|
551 |
|
|
* src/common/vsscanf.cxx: Add NULL select entry to DEVIO_TABLE
|
552 |
|
|
* src/common/vsnprintf.cxx: Likewise
|
553 |
|
|
|
554 |
|
|
2000-05-25 Hugo Tyson
|
555 |
|
|
|
556 |
|
|
* include/stream.inl (set_error): If the error is EEOF, set
|
557 |
|
|
the EOF flag (flags.at_eof) so that clients know.
|
558 |
|
|
|
559 |
|
|
* src/input/fgetc.cxx (__fgetc):
|
560 |
|
|
* src/input/fgets.cxx (_fgets):
|
561 |
|
|
* src/input/fread.cxx (_fread): Correctly handle an error,
|
562 |
|
|
or EOF indication, from real_stream->refill_read_buffer().
|
563 |
|
|
|
564 |
|
|
2000-05-02 Jonathan Larmour
|
565 |
|
|
|
566 |
|
|
* New package
|
567 |
|
|
Separated original libc out into separate packages on functional
|
568 |
|
|
boundaries.
|
569 |
|
|
Header files are now managed by isoinfra package
|
570 |
|
|
Plenty of cleanups done, but no major functionality changes
|
571 |
|
|
|
572 |
|
|
//===========================================================================
|
573 |
|
|
// ####GPLCOPYRIGHTBEGIN####
|
574 |
|
|
// -------------------------------------------
|
575 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
576 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2009 Free Software Foundation, Inc.
|
577 |
|
|
//
|
578 |
|
|
// This program is free software; you can redistribute it and/or modify
|
579 |
|
|
// it under the terms of the GNU General Public License as published by
|
580 |
|
|
// the Free Software Foundation; either version 2 or (at your option) any
|
581 |
|
|
// later version.
|
582 |
|
|
//
|
583 |
|
|
// This program is distributed in the hope that it will be useful, but
|
584 |
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
585 |
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
586 |
|
|
// General Public License for more details.
|
587 |
|
|
//
|
588 |
|
|
// You should have received a copy of the GNU General Public License
|
589 |
|
|
// along with this program; if not, write to the
|
590 |
|
|
// Free Software Foundation, Inc., 51 Franklin Street,
|
591 |
|
|
// Fifth Floor, Boston, MA 02110-1301, USA.
|
592 |
|
|
// -------------------------------------------
|
593 |
|
|
// ####GPLCOPYRIGHTEND####
|
594 |
|
|
//===========================================================================
|