home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libgxx / libg++-2.5 / libg++-2.5.3l.2.diff
Encoding:
Text File  |  1994-02-26  |  126.8 KB  |  3,759 lines

  1. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/include/ChangeLog libg++-2.5.3linux.2/include/ChangeLog
  2. *** libg++-2.5.3/include/ChangeLog    Mon Nov 29 10:47:24 1993
  3. --- libg++-2.5.3linux.2/include/ChangeLog    Mon Dec 20 08:54:21 1993
  4. ***************
  5. *** 1,3 ****
  6. --- 1,7 ----
  7. + Sat Dec 11 09:11:55 1993  H.J. Lu (hlu@nighthawk)
  8. +     * sys/cdefs.h: new file.
  9.   Mon Nov 29 10:43:57 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
  10.   
  11.       * dis-asm.h (enum dis_insn_tyupe): Remove non-ANSI trailing comma.
  12. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/include/sys/cdefs.h libg++-2.5.3linux.2/include/sys/cdefs.h
  13. *** libg++-2.5.3/include/sys/cdefs.h    Wed Dec 31 19:00:00 1969
  14. --- libg++-2.5.3linux.2/include/sys/cdefs.h    Thu Jan 27 17:43:46 1994
  15. ***************
  16. *** 0 ****
  17. --- 1,143 ----
  18. + /* Copyright (C) 1992, 1993 Free Software Foundation, Inc.
  19. + This file is part of the GNU C Library.
  20. + The GNU C Library is free software; you can redistribute it and/or
  21. + modify it under the terms of the GNU Library General Public License as
  22. + published by the Free Software Foundation; either version 2 of the
  23. + License, or (at your option) any later version.
  24. + The GNU C Library is distributed in the hope that it will be useful,
  25. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  26. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  27. + Library General Public License for more details.
  28. + You should have received a copy of the GNU Library General Public
  29. + License along with the GNU C Library; see the file COPYING.LIB.  If
  30. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  31. + Cambridge, MA 02139, USA.  */
  32. + #ifndef    _SYS_CDEFS_H
  33. + #define    _SYS_CDEFS_H    1
  34. + #ifdef __GNU_LIBRARY__
  35. + #include <features.h>
  36. + #endif
  37. + #ifdef    __GNUC__
  38. + #define    __P(args)    args    /* GCC can always grok prototypes.  */
  39. + #define    __DOTS        , ...
  40. + /* Figure out how to declare functions that (1) depend only on their
  41. +    parameters and have no side effects, or (2) don't return.  */
  42. + #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__cplusplus)
  43. +   /* Old GCC way. */
  44. + #ifndef    __CONSTVALUE
  45. + #define    __CONSTVALUE    __const__
  46. + #define    __CONSTVALUE2
  47. + #endif
  48. + #ifndef    __NORETURN
  49. + #define    __NORETURN    __volatile__
  50. + #define    __NORETURN2
  51. + #endif
  52. + #else
  53. +   /* New GCC way. */
  54. + #ifndef    __CONSTVALUE
  55. + #define    __CONSTVALUE
  56. + #if defined(const) || !defined(__STDC__)
  57. + #define    __CONSTVALUE2    /* We don't want empty __attribute__ (()). */
  58. + #else
  59. + #define    __CONSTVALUE2    __attribute__ ((const))
  60. + #endif
  61. + #endif
  62. + #ifndef    __NORETURN
  63. + #define    __NORETURN
  64. + #ifdef noreturn
  65. + #define    __NORETURN2    /* We don't want empty __attribute__ (()). */
  66. + #else
  67. + #define    __NORETURN2    __attribute__ ((noreturn))
  68. + #endif
  69. + #endif
  70. + #endif
  71. + #else    /* Not GCC.  */
  72. + #define    __inline        /* No inline functions.  */
  73. + #define    __CONSTVALUE        /* No idempotent functions.  */
  74. + #define    __CONSTVALUE2
  75. + #define    __NORETURN        /* No functions-of-no-return.  */
  76. + #define    __NORETURN2
  77. + #if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
  78. + #define    __P(args)    args
  79. + #define    __const        const
  80. + #define    __signed    signed
  81. + #define    __volatile    volatile
  82. + #define    __DOTS        , ...
  83. + #else    /* Not ANSI C or C++.  */
  84. + #define    __P(args)    ()    /* No prototypes.  */
  85. + #define    __const            /* No ANSI C keywords.  */
  86. + #define    __signed
  87. + #define    __volatile
  88. + #define    __DOTS
  89. + #endif    /* ANSI C or C++.  */
  90. + #endif    /* GCC.  */
  91. + #if __GNUC__ < 2
  92. + /* In GCC version 2, (__extension__ EXPR) will not complain
  93. +    about GCC extensions used in EXPR under -ansi or -pedantic.  */
  94. + #define    __extension__
  95. + #endif
  96. + /* For these things, GCC behaves the ANSI way normally,
  97. +    and the non-ANSI way under -traditional.  */
  98. + #if defined (__STDC__) && __STDC__
  99. + #define    __CONCAT(x,y)    x ## y
  100. + #define    __STRING(x)    #x
  101. + /* This is not a typedef so `const __ptr_t' does the right thing.  */
  102. + #define __ptr_t void *
  103. + typedef long double __long_double_t;
  104. + #else
  105. + #define    __CONCAT(x,y)    x/**/y
  106. + #define    __STRING(x)    "x"
  107. + #define __ptr_t char *
  108. + typedef double __long_double_t;
  109. + #endif
  110. + /* The BSD header files use the ANSI keywords unmodified.  (This means that
  111. +    old programs may lose if they use the new keywords as identifiers.)  We
  112. +    define them to their __ versions, which are taken care of above.  */
  113. + #ifdef    __USE_BSD
  114. + /* __attribute__ uses const. */
  115. + #if 0
  116. + #define    const        __const
  117. + #endif
  118. + #define    signed        __signed
  119. + #define    volatile    __volatile
  120. + #endif
  121. + /* C++ needs to know that types and declarations are C, not C++.  */
  122. + #ifdef    __cplusplus
  123. + #define    __BEGIN_DECLS    extern "C" {
  124. + #define    __END_DECLS    }
  125. + #else
  126. + #define    __BEGIN_DECLS
  127. + #define    __END_DECLS
  128. + #endif
  129. + #endif     /* sys/cdefs.h */
  130. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libg++/src/BitSet.h libg++-2.5.3linux.2/libg++/src/BitSet.h
  131. *** libg++-2.5.3/libg++/src/BitSet.h    Fri May 28 20:07:26 1993
  132. --- libg++-2.5.3linux.2/libg++/src/BitSet.h    Thu Jan 27 22:10:28 1994
  133. ***************
  134. *** 59,66 ****
  135.                        BitSetBit(BitSet* v, int p);
  136.                        BitSetBit(const BitSetBit& b);
  137.                       ~BitSetBit();
  138. !                      operator int();
  139.     int                operator = (int b);
  140.   };
  141.   
  142.   class BitSet
  143. --- 59,67 ----
  144.                        BitSetBit(BitSet* v, int p);
  145.                        BitSetBit(const BitSetBit& b);
  146.                       ~BitSetBit();
  147. !                      operator int() const;
  148.     int                operator = (int b);
  149. +   int                operator = (const BitSetBit& b);
  150.   };
  151.   
  152.   class BitSet
  153. ***************
  154. *** 342,348 ****
  155.   
  156.   inline BitSetBit::~BitSetBit() {}
  157.   
  158. ! inline BitSetBit::operator int()
  159.   {
  160.     return src->test(pos);
  161.   }
  162. --- 343,349 ----
  163.   
  164.   inline BitSetBit::~BitSetBit() {}
  165.   
  166. ! inline BitSetBit::operator int() const
  167.   {
  168.     return src->test(pos);
  169.   }
  170. ***************
  171. *** 350,355 ****
  172. --- 351,363 ----
  173.   inline int BitSetBit::operator = (int b)
  174.   {
  175.     if (b) src->set(pos); else src->clear(pos); return b;
  176. + }
  177. + inline int BitSetBit::operator = (const BitSetBit& b)
  178. + {
  179. +   int i = (int)b;
  180. +   *this = i;
  181. +   return i;
  182.   }
  183.   
  184.   inline BitSetBit BitSet::operator [] (int i)
  185. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libg++/src/ChangeLog libg++-2.5.3linux.2/libg++/src/ChangeLog
  186. *** libg++-2.5.3/libg++/src/ChangeLog    Wed Dec 22 06:39:54 1993
  187. --- libg++-2.5.3linux.2/libg++/src/ChangeLog    Thu Jan 27 16:48:04 1994
  188. ***************
  189. *** 1,3 ****
  190. --- 1,8 ----
  191. + Wed Dec 29 22:52:43 1993  Mike Stump  (mrs@cygnus.com)
  192. +     * BitSet.h (BitSetBit): Add int operator = (const BitSetBit& b),
  193. +     because the default op= would have the wrong semantics.
  194.   Mon Dec  6 14:14:52 1993  Per Bothner  (bothner@kalessin.cygnus.com)
  195.   
  196.       * math-68881.h:  Removed.
  197. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libiberty/ChangeLog libg++-2.5.3linux.2/libiberty/ChangeLog
  198. *** libg++-2.5.3/libiberty/ChangeLog    Wed Dec 22 06:39:56 1993
  199. --- libg++-2.5.3linux.2/libiberty/ChangeLog    Mon Dec 20 09:11:01 1993
  200. ***************
  201. *** 1,3 ****
  202. --- 1,9 ----
  203. + Mon Dec 20 09:10:46 1993  H.J. Lu  (hjl@nighthawk)
  204. +     * functions.def: add strsignal.
  205. +     * strsignal.c: add ifdef NEED_strsignal.
  206.   Fri Dec 17 12:26:07 1993  Kung Hsu  (kung@cirdan.cygnus.com)
  207.   
  208.       * cplus-dem.c (demangle_arm_pt): New function.  Common code
  209. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libiberty/functions.def libg++-2.5.3linux.2/libiberty/functions.def
  210. *** libg++-2.5.3/libiberty/functions.def    Fri Nov 26 16:55:10 1993
  211. --- libg++-2.5.3linux.2/libiberty/functions.def    Mon Dec 20 08:54:22 1993
  212. ***************
  213. *** 60,63 ****
  214. --- 60,64 ----
  215.      if they are not found. */
  216.   
  217.   DEFFUNC(strerror, char*, (), NOTHING)
  218. + DEFFUNC(strsignal, char*, (), NOTHING)
  219.   DEFFUNC(psignal, void, (signo, message), unsigned signo AND char *message)
  220. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libiberty/strsignal.c libg++-2.5.3linux.2/libiberty/strsignal.c
  221. *** libg++-2.5.3/libiberty/strsignal.c    Sat Nov 27 15:18:59 1993
  222. --- libg++-2.5.3linux.2/libiberty/strsignal.c    Mon Dec 20 08:54:23 1993
  223. ***************
  224. *** 388,393 ****
  225. --- 388,395 ----
  226.   }
  227.   
  228.   
  229. + #ifdef NEED_strsignal
  230.   /*
  231.   
  232.   NAME
  233. ***************
  234. *** 454,459 ****
  235. --- 456,462 ----
  236.     return (msg);
  237.   }
  238.   
  239. + #endif
  240.   
  241.   /*
  242.   
  243. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ChangeLog libg++-2.5.3linux.2/libio/ChangeLog
  244. *** libg++-2.5.3/libio/ChangeLog    Wed Dec 22 06:39:57 1993
  245. --- libg++-2.5.3linux.2/libio/ChangeLog    Tue Feb 22 14:38:26 1994
  246. ***************
  247. *** 1,3 ****
  248. --- 1,222 ----
  249. + Mon Feb 21 13:18:20 1994  H.J. Lu  (hjl@jalod)
  250. +     * libio.h (_IO_PENDING_OUTPUT_COUNT(_fp)): return the
  251. +       pending output count in _fp.
  252. + Mon Feb 14 23:48:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
  253. +     * isgetline.cc (istream& istream::getline(char* buf, int len,
  254. +       char delim)): tentative fix. may change in furure.
  255. + Sun Feb 13 22:32:31 1994  H.J. Lu  (hjl@jalod)
  256. +     * libioP.h (CHECK_FILE): fix typos for _OLD_IO_MAGIC.
  257. +     * iofread.c (CHECK_FILE):
  258. +     * iofwrite.c (CHECK_FILE): return 0 if fp is invalid.
  259. + Fri Feb 11 11:08:01 1994  SBPM Marc GINGOLD <marc@david.saclay.cea.fr>
  260. +     * iovfprintf.c (helper_vfprintf): add
  261. +       hp->_IO_file_flags = _IO_MAGIC|(_IO_IS_FILEBUF+_IO_NO_READS);
  262. + Mon Jan 31 09:28:34 1994  H.J. Lu  (hjl@jalod)
  263. +     * fileops.c (_IO_file_underflow): remove the errno == 0
  264. +       testing introduced on Jan. 30.
  265. + Sun Jan 30 12:25:09 1994  H.J. Lu  (hjl@jalod)
  266. +     * fileops.c (_IO_file_underflow): set the EOF flag
  267. +       if errno from read is 0, EAGAIN or EWOULDBLOCK.
  268. +     * cleanup.c: check HAVE_GNU_LD instead of __linux__.
  269. + Sat Jan 29 23:16:14 1994  H.J. Lu  (hjl@jalod)
  270. +     * fileops.c (_IO_do_write):
  271. +       (_IO_file_underflow):
  272. +       (_IO_file_xsputn):
  273. +       (_IO_default_xsgetn): change "_IO_size_t count" to
  274. +       "_IO_ssize_t count".
  275. + Sat Jan 29 06:52:27 1994  H.J. Lu  (hjl@jalod)
  276. +     * fileops.c (_IO_file_fopen):
  277. +       (_IO_file_attach): don't return NULL if errno == ESPIPE while
  278. +       seek failes.
  279. + Thu Jan 20 13:48:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
  280. +     If no characters are read by fgets, ANSI C doesn't allow '\0' to
  281. +     be written to the buffer, but it is requried by ANSI C++
  282. +     for istream::get and istream::getline.  Both use _IO_getline ...
  283. +     * iogetline.c (_IO_getline):  Don't write a '\0' at the end
  284. +     of the read data.  The input buffer length does not include
  285. +     space for a '\0'.
  286. +     * iofgets.c, iogets.c:  Change appropriately.
  287. +     Also check for _IO_ERR_SEEN, as required by ANSI.
  288. +     * isgetline.cc:  Update accordingly.
  289. + Tue Jan 18 10:08:01 1993  H.J. Lu  (hjl@jalod)
  290. +     * libioP.h: modify CHECK_FILE(FILE,RET) to check
  291. +       _IO_MAGIC_MASK.
  292. +     * iofclose.c: don't clear fp->_IO_file_flags. malloc/free will
  293. +       modify it.
  294. + Tue Jan  4 01:32:28 1993  H.J. Lu  (hjl@jalod)
  295. +     * genops.c (_IO_default_xsputn):
  296. +       (_IO_default_xsgetn):
  297. +     * ioignore.c: change "_IO_size_t count" to
  298. +       "_IO_ssize_t count".
  299. +     * iogetline.c: change "_IO_size_t len" to
  300. +       "_IO_ssize_t len".
  301. + Sat Jan  1 21:13:59 1993  H.J. Lu  (hjl@jalod)
  302. +     * libioP.h: add CHECK_FILE(FILE,RET).
  303. +     * iofclose.c:
  304. +     * iofflush.c:
  305. +     * iofgetpos.c:
  306. +     * iofgets.c:
  307. +     * iofprintf.c:
  308. +     * iofputs.c:
  309. +     * iofread.c:
  310. +     * iofscanf.c:
  311. +     * iofsetpos.c:
  312. +     * ioftell.c:
  313. +     * iofwrite.c:
  314. +     * iosetbuffer.c:
  315. +     * iosetvbuf.c:
  316. +     * ioungetc.c: check fp with CHECK_FILE(FILE,RET).
  317. + Wed Dec 29 20:59:17 1993  H.J. Lu  (hjl@jalod)
  318. +     * libio.h (_IO_putc): add parentheses for "_ch".
  319. + Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@jalod)
  320. +     * libio.h: include <sys/cdefs.h>. change const to __const.
  321. +     * iovfscanf.c: enforce the sequence of the conversion
  322. +       specification.
  323. +     * genops.c:
  324. +     * iopopen.c:
  325. +     * iofopen.c:
  326. +     * iofclose.c: don't include <stdlib.h> which is included
  327. +       in "libioP.h".
  328. +     * iopopen.c (_IO_proc_close) : check if fp is on the list
  329. +       before close it.
  330. +     * libioP.h: define CLOSED_FILEBUF_FLAGS as the one used to be
  331. +       in fileops.c.
  332. +     * fileops.c: remove the definition of CLOSED_FILEBUF_FLAGS,
  333. +       which is in libioP.h now.
  334. +     * fileops.c (_IO_file_fopen):
  335. +     * iofdopen.c (_IO_fdopen):
  336. +     * iopopen.c (_IO_proc_open): _flags |= CLOSED_FILEBUF_FLAGS
  337. +       before setting _flags.
  338. +     * iovfprintf.c:
  339. +     * cleanup.c:
  340. +     * ioperror.c:
  341. +     * iovfprintf.c:
  342. +     * iovfscanf.c:
  343. +     * strfile.h:
  344. +     * libioP.h:
  345. +     * libio.h:
  346. +     * iolibio.h: replace __PARAMS with __P to be compatible with
  347. +       the GNU C library.
  348. +     * iofopen.c (_IO_fopen): don't check fp == NULL after
  349. +       IO_file_init(&fp->_file).
  350. +     * filedoalloc.c: include <unistd.h>.
  351. +     * iolibio.h: check and define _IOLIBIO_H.
  352. +     * config.shared: add $(LIBIO_CONFIG_FLAGS) to rules.
  353. +     * libioP.h: include _LIBIO_CONFIG_H if defined.
  354. +       include <stdlb.h> if __STDC__ is defined.
  355. +     * config/linux.mt: new files. define
  356. +       LIBIO_CONFIG_FLAGS=-D_LIBIO_CONFIG_H=\"config/linux.h\" -I./stdio
  357. +     * config/linux.h: new file for linux.
  358. +     * iofdopen.c (_IO_fdopen ()): call fcntl () to set up
  359. +       the currect status flag from the flag passing from
  360. +       fdopen ().
  361. +     * fileops.c (_IO_file_attach ()): seek to the current R/W pointer.
  362. +     * floatconv.c (_IO_strtod ()): make "+" and "-" as error.
  363. +     * libioP.h (_IO_ignore):
  364. +       (_IO_least_marker):
  365. +       (_IO_switch_to_main_get_are):
  366. +       (_IO_switch_to_backup_are): 
  367. +       (_IO_syn):
  368. +       (_IO_get_column):
  369. +       (_IO_set_column):
  370. +       (_IO_str_finish):
  371. +       (IO_nobackup_pbackfail): new declaration.
  372. +       (_IO_flush_all):
  373. +       (_IO_flush_all_linebuffered): use ___P((void));
  374. +     * iolibio.h (_IO_fscanf):
  375. +       (_IO_printf):
  376. +       (_IO_vfscanf):      
  377. +       (_IO_fread): new declaration.
  378. +     * cleanup.c: for linux, comment out "function_alias" and use
  379. +       text_set_element instead.
  380. +     * libio.h: define _IO_uid_t and _IO_HAVE_ST_BLKSIZE
  381. +       as _G_xxxxxxxx.
  382. +     * iomanip.h (template<class TP> class iapp):
  383. +       change ostream to istream.
  384. +     * libioP.h:
  385. +     * cleanup.c:
  386. +     * filedoalloc.c: ifdef out _IO_cleanup_registration_needed
  387. +       stuff for Linux. it is handled in cleanup.c.
  388. +     * configure.in (CLEAN): add tmp-params.h, dummy.C,
  389. +       dummy.o, dummy.c, dummy.out, TMP and a.out.
  390. +       add
  391. +         *linux*)         my_target=linux;;
  392. +       to case "${target}" in. Also remove all libio object files
  393. +       for Linux since they are in libc.a.
  394. +     * iostrerror.c: do nothing if __linux__ is defined.
  395. +     * ioperror.c: add a new version for __linux__. may be 
  396. +       used with glibc.
  397. +     * libioP.h: add _IO_gen_tempname ().
  398. +     * iotempname.c: new file for _IO_gen_tempname (). It is
  399. +       used for the temporary filename functions.
  400. +     * Makefile.in: add iotempname.o.
  401. +     * ioprims.c: #include <unistd.h>. do nothing if
  402. +       __linux__ is defined. also glibc?
  403.   Mon Dec 20 00:31:21 1993  Per Bothner  (bothner@kalessin.cygnus.com)
  404.   
  405.       * config.shared (CXXINCLUDES):  Fix quoting of $(NOSTDINC).
  406. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/Makefile.in libg++-2.5.3linux.2/libio/Makefile.in
  407. *** libg++-2.5.3/libio/Makefile.in    Wed Dec 22 06:39:58 1993
  408. --- libg++-2.5.3linux.2/libio/Makefile.in    Thu Jan 27 17:40:38 1994
  409. ***************
  410. *** 17,24 ****
  411.   
  412.   srcdir = .
  413.   VERSION = 0.63
  414. - #### package, host, target, and site dependent Makefile fragments come in here.
  415. - ##
  416.   
  417.   INSTALLDIR = $(libdir)
  418.   
  419. --- 17,22 ----
  420. ***************
  421. *** 27,33 ****
  422.     iovfscanf.o ioignore.o iopadn.o \
  423.     iofgetpos.o iofread.o iofscanf.o \
  424.     iofsetpos.o iogetline.o \
  425. !   ioprintf.o ioseekoff.o ioseekpos.o \
  426.     outfloat.o stdfiles.o strops.o iofclose.o iopopen.o ioungetc.o
  427.   
  428.   # These emulate stdio functionality, but with a different name (_IO_ungetc
  429. --- 25,31 ----
  430.     iovfscanf.o ioignore.o iopadn.o \
  431.     iofgetpos.o iofread.o iofscanf.o \
  432.     iofsetpos.o iogetline.o \
  433. !   ioprintf.o ioseekoff.o ioseekpos.o $(EXTRA_OBJECTS) \
  434.     outfloat.o stdfiles.o strops.o iofclose.o iopopen.o ioungetc.o
  435.   
  436.   # These emulate stdio functionality, but with a different name (_IO_ungetc
  437. ***************
  438. *** 48,53 ****
  439. --- 46,54 ----
  440.   # They need to be changed to use name-space-clean (e.g. __read) versions
  441.   # for each specific libc.
  442.   OSPRIM_OBJECTS = ioprims.o iostrerror.o cleanup.o
  443. + #### package, host, target, and site dependent Makefile fragments come in here.
  444. + ##
  445.   
  446.   LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(OSPRIM_OBJECTS)
  447.   LIBIO_OBJECTS = $(IO_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS)
  448. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/NEWS libg++-2.5.3linux.2/libio/NEWS
  449. *** libg++-2.5.3/libio/NEWS    Wed Dec 22 06:39:58 1993
  450. --- libg++-2.5.3linux.2/libio/NEWS    Thu Jan 20 17:49:27 1994
  451. ***************
  452. *** 1,3 ****
  453. --- 1,5 ----
  454. + * _IO_getline and streambuf::sgetline no longer write a '\0' at the end.
  455.   *** Major changes in libio version 0.63 (released with libg++ 2.5.3):
  456.   
  457.   * There is a g++ bug that causes inconsistent name mangling for the
  458. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/cleanup.c libg++-2.5.3linux.2/libio/cleanup.c
  459. *** libg++-2.5.3/libio/cleanup.c    Tue Oct 12 02:28:18 1993
  460. --- libg++-2.5.3linux.2/libio/cleanup.c    Sun Jan 30 14:16:02 1994
  461. ***************
  462. *** 1,8 ****
  463.   #include "libioP.h"
  464.   #if _G_HAVE_ATEXIT
  465.   #include <stdlib.h>
  466.   
  467. ! typedef void (*voidfunc) _PARAMS((void));
  468.   
  469.   static void _IO_register_cleanup ()
  470.   {
  471. --- 1,29 ----
  472.   #include "libioP.h"
  473. + #ifdef HAVE_GNU_LD
  474. + #include "stdio.h"
  475. + #include <unistd.h>
  476. + #include <ansidecl.h>
  477. + #include <gnu-stabs.h>
  478. + #if 1
  479. + function_alias(_cleanup, _IO_flush_all, void, (),
  480. +         DEFUN_VOID(_cleanup))
  481. + #else
  482. + /* We don't want this since we are building the shared library.
  483. +  * We want the shared library selfcontained. __libc_atexit will
  484. +  * ruin it unless we take exit () out of the shared library.
  485. +  */
  486. + text_set_element(__libc_atexit, _IO_flush_all);
  487. + #endif
  488. + #else
  489.   #if _G_HAVE_ATEXIT
  490.   #include <stdlib.h>
  491.   
  492. ! typedef void (*voidfunc) __P((void));
  493.   
  494.   static void _IO_register_cleanup ()
  495.   {
  496. ***************
  497. *** 12,14 ****
  498. --- 33,37 ----
  499.   
  500.   void (*_IO_cleanup_registration_needed)() = _IO_register_cleanup;
  501.   #endif /* _G_HAVE_ATEXIT */
  502. + #endif
  503. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/config/linux.h libg++-2.5.3linux.2/libio/config/linux.h
  504. *** libg++-2.5.3/libio/config/linux.h    Wed Dec 31 19:00:00 1969
  505. --- libg++-2.5.3linux.2/libio/config/linux.h    Mon Dec 20 08:54:24 1993
  506. ***************
  507. *** 0 ****
  508. --- 1,29 ----
  509. + #ifndef _CONFIG_LINUX_H
  510. + #define  _CONFIG_LINUX_H
  511. + #undef _STDIO_USES_IOSTREAM
  512. + #define _STDIO_USES_IOSTREAM     1
  513. + #undef _IO_HAVE_ST_BLKSIZE
  514. + #define _IO_HAVE_ST_BLKSIZE    1
  515. + #define _IO_open    __open
  516. + #define _IO_close    __close
  517. + #define    _IO_fork    __fork
  518. + #define    _IO_fcntl    __fcntl
  519. + #define _IO__exit    _exit
  520. + #define _IO_read    __read
  521. + #define _IO_write    __write
  522. + #define _IO_lseek    __lseek
  523. + #define    _IO_getdtablesize    __getdtablesize
  524. + #define _IO_pipe    __pipe
  525. + #define _IO_dup2    __dup2
  526. + #define _IO_execl    execl
  527. + #define _IO_waitpid    __waitpid
  528. + #define _IO_stat        __stat
  529. + #define _IO_getpid      __getpid
  530. + #define _IO_geteuid     __geteuid
  531. + #define _IO_getegid     __getegid
  532. + #define _IO_fstat    __fstat
  533. + #endif /* _CONFIG_LINUX_H */
  534. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/config/linux.mt libg++-2.5.3linux.2/libio/config/linux.mt
  535. *** libg++-2.5.3/libio/config/linux.mt    Wed Dec 31 19:00:00 1969
  536. --- libg++-2.5.3linux.2/libio/config/linux.mt    Mon Dec 20 08:54:24 1993
  537. ***************
  538. *** 0 ****
  539. --- 1,3 ----
  540. + # Linux defines those system dependent macros in libio/config/linux.h.
  541. + LIBIO_CONFIG_FLAGS=-D_LIBIO_CONFIG_H=\"config/linux.h\" -I./stdio
  542. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/config.shared libg++-2.5.3linux.2/libio/config.shared
  543. *** libg++-2.5.3/libio/config.shared    Wed Dec 22 06:39:58 1993
  544. --- libg++-2.5.3linux.2/libio/config.shared    Thu Jan 27 21:59:39 1994
  545. ***************
  546. *** 181,187 ****
  547.   if test -n "${CXXINCLUDES}" ; then
  548.     echo "CXXINCLUDES = ${CXXINCLUDES}" '$(XTRAFLAGS)'
  549.   elif test "${DOING_LIBGXX}" = "true" ; then
  550. !   echo 'CXXINCLUDES = $(NOSTDINC)'" -I. -I${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}src"' $(WRAP_C_INCLUDES) $(XTRAFLAGS)'
  551.   fi
  552.   if test -n "${CINCLUDES}" ; then
  553.     echo "CINCLUDES = ${CINCLUDES}" '$(XTRAFLAGS)'
  554. --- 181,187 ----
  555.   if test -n "${CXXINCLUDES}" ; then
  556.     echo "CXXINCLUDES = ${CXXINCLUDES}" '$(XTRAFLAGS)'
  557.   elif test "${DOING_LIBGXX}" = "true" ; then
  558. !   echo 'CXXINCLUDES = $(NOSTDINC)'" -I. -I${TO_TOPDIR}libio"' -I$(srcdir) -I$(srcdir)/'"${TOLIBGXX}"'$(IO_DIR) -I$(srcdir)/'"${TOLIBGXX}src -I${TO_TOPDIR}include"' $(WRAP_C_INCLUDES) $(XTRAFLAGS)'
  559.   fi
  560.   if test -n "${CINCLUDES}" ; then
  561.     echo "CINCLUDES = ${CINCLUDES}" '$(XTRAFLAGS)'
  562. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/configure.in libg++-2.5.3linux.2/libio/configure.in
  563. *** libg++-2.5.3/libio/configure.in    Thu Oct 14 17:57:54 1993
  564. --- libg++-2.5.3linux.2/libio/configure.in    Fri Jan 28 12:59:27 1994
  565. ***************
  566. *** 11,18 ****
  567. --- 11,36 ----
  568.   
  569.   # per-target:
  570.   
  571. + : >${package_makefile_frag}
  572.   case "${target}" in
  573.     *-*-hpux*)       my_target=hpux ;;
  574. +   *linux*)
  575. +      my_target=linux
  576. + cat > ${package_makefile_frag} <<!EOF!
  577. + # Linux has them in libc.a.
  578. + IO_OBJECTS=
  579. + # Linux has them in libc.a.
  580. + STDIO_WRAP_OBJECTS=
  581. + # Linux has them in libc.a.
  582. + OSPRIM_OBJECTS=
  583. + EXTRA_OBJECTS = iotempname.o
  584. + !EOF!
  585. +     ;;
  586.     *-*-sco3.2v4*)   my_target=sco4 ;;
  587.     *-*-isc*)        my_target=isc ;;
  588.     *-*-*)           my_target=${target_cpu}
  589. ***************
  590. *** 24,35 ****
  591.   
  592.   TO_TOPDIR=../
  593.   ALL='_G_config.h libio.a libiostream.a $(OSPRIM_OBJECTS)'
  594. ! CINCLUDES='-I. -I$(srcdir)'
  595. ! CXXINCLUDES='-I. -I$(srcdir)'
  596.   MOSTLYCLEAN='*.o core iostream.list'
  597. ! CLEAN='_G_config.h *.a'
  598.   INFO_FILES=iostream
  599. ! (. ${srcdir}/config.shared) >${package_makefile_frag}
  600.   
  601.   # post-target:
  602.   
  603. --- 42,53 ----
  604.   
  605.   TO_TOPDIR=../
  606.   ALL='_G_config.h libio.a libiostream.a $(OSPRIM_OBJECTS)'
  607. ! CINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../include'
  608. ! CXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../include'
  609.   MOSTLYCLEAN='*.o core iostream.list'
  610. ! CLEAN='tmp-params.h dummy.C dummy.o dummy.c dummy.out TMP a.out _G_config.h *.a'
  611.   INFO_FILES=iostream
  612. ! (. ${srcdir}/config.shared) >>${package_makefile_frag}
  613.   
  614.   # post-target:
  615.   
  616. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/filedoalloc.c libg++-2.5.3linux.2/libio/filedoalloc.c
  617. *** libg++-2.5.3/libio/filedoalloc.c    Wed Dec 22 06:39:58 1993
  618. --- libg++-2.5.3linux.2/libio/filedoalloc.c    Fri Jan 28 15:58:25 1994
  619. ***************
  620. *** 43,56 ****
  621. --- 43,59 ----
  622.   
  623.   #define _POSIX_SOURCE
  624.   #include "libioP.h"
  625. + #include <unistd.h>
  626.   #include <sys/types.h>
  627.   #include <sys/stat.h>
  628.   
  629. + #ifndef __linux__
  630.   /* If this function pointer is non-zero, we should call it.
  631.      It's supposed to make sure _IO_flush_all gets called on exit.
  632.      We call it from _IO_file_doallocate, since that is likely
  633.      to get called by any program that does buffered I/O. */
  634.   void (*_IO_cleanup_registration_needed)();
  635. + #endif
  636.   
  637.   /*
  638.    * Allocate a file buffer, or switch to unbuffered I/O.
  639. ***************
  640. *** 69,77 ****
  641.     register char *p;
  642.     struct stat st;
  643.   
  644.     if (_IO_cleanup_registration_needed)
  645.       (*_IO_cleanup_registration_needed)();
  646. !   
  647.     if (fp->_fileno < 0 || fp->_jumps->__stat(fp, &st) < 0)
  648.       {
  649.         couldbetty = 0;
  650. --- 72,82 ----
  651.     register char *p;
  652.     struct stat st;
  653.   
  654. + #ifndef __linux__
  655.     if (_IO_cleanup_registration_needed)
  656.       (*_IO_cleanup_registration_needed)();
  657. ! #endif
  658.     if (fp->_fileno < 0 || fp->_jumps->__stat(fp, &st) < 0)
  659.       {
  660.         couldbetty = 0;
  661. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/fileops.c libg++-2.5.3linux.2/libio/fileops.c
  662. *** libg++-2.5.3/libio/fileops.c    Fri Dec  3 02:23:20 1993
  663. --- libg++-2.5.3linux.2/libio/fileops.c    Mon Jan 31 09:26:09 1994
  664. ***************
  665. *** 79,88 ****
  666.      If a filebuf is unbuffered(), the _shortbuf[1] is used as the buffer.
  667.   */
  668.   
  669. - #define CLOSED_FILEBUF_FLAGS \
  670. -   (_IO_IS_FILEBUF+_IO_NO_READS+_IO_NO_WRITES+_IO_TIED_PUT_GET)
  671.   void
  672.   _IO_file_init(fp)
  673.        register _IO_FILE *fp;
  674. --- 79,84 ----
  675. ***************
  676. *** 109,115 ****
  677.     _IO_unsave_markers(fp);
  678.   
  679.     status = fp->_jumps->__close(fp);
  680. !   
  681.     /* Free buffer. */
  682.     _IO_setb(fp, NULL, NULL, 0);
  683.     _IO_setg(fp, NULL, NULL, NULL);
  684. --- 105,111 ----
  685.     _IO_unsave_markers(fp);
  686.   
  687.     status = fp->_jumps->__close(fp);
  688.     /* Free buffer. */
  689.     _IO_setb(fp, NULL, NULL, 0);
  690.     _IO_setg(fp, NULL, NULL, NULL);
  691. ***************
  692. *** 170,179 ****
  693.     if (fdesc < 0)
  694.       return NULL;
  695.     fp->_fileno = fdesc;
  696.     fp->_IO_file_flags = 
  697.       _IO_mask_flags(fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
  698.     if (read_write & _IO_IS_APPENDING)
  699. !     if (fp->_jumps->__seekoff(fp, (_IO_off_t)0, _IO_seek_end) == _IO_pos_BAD)
  700.         return NULL;
  701.     _IO_link_in(fp);
  702.     return fp;
  703. --- 166,177 ----
  704.     if (fdesc < 0)
  705.       return NULL;
  706.     fp->_fileno = fdesc;
  707. +   fp->_IO_file_flags |= CLOSED_FILEBUF_FLAGS;
  708.     fp->_IO_file_flags = 
  709.       _IO_mask_flags(fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
  710.     if (read_write & _IO_IS_APPENDING)
  711. !     if (fp->_jumps->__seekoff(fp, (_IO_off_t)0, _IO_seek_end)
  712. !     == _IO_pos_BAD && errno != ESPIPE)
  713.         return NULL;
  714.     _IO_link_in(fp);
  715.     return fp;
  716. ***************
  717. *** 184,194 ****
  718. --- 182,209 ----
  719.        _IO_FILE *fp;
  720.        int fd;
  721.   {
  722. + #if 1
  723. +   struct stat st;
  724. + #endif
  725.     if (_IO_file_is_open(fp))
  726.       return NULL;
  727.     fp->_fileno = fd;
  728.     fp->_flags &= ~(_IO_NO_READS+_IO_NO_WRITES);
  729. + #if 1
  730. +   /* Get the current position of the file. */
  731. +   if (fp->_jumps->__stat(fp, &st) == 0 && S_ISREG(st.st_mode))
  732. +   {
  733. +     fp->_offset = _IO_pos_BAD;
  734. +     if (fp->_jumps->__seekoff(fp, (_IO_off_t) 0, _IO_seek_cur)
  735. +          == _IO_pos_BAD && errno != ESPIPE)
  736. +     return NULL;
  737. +   }
  738. + #else
  739.     fp->_offset = _IO_pos_BAD;
  740. + #endif
  741.     return fp;
  742.   }
  743.   
  744. ***************
  745. *** 214,220 ****
  746.        const char* data;
  747.        _IO_size_t to_do;
  748.   {
  749. !   _IO_size_t count;
  750.     if (to_do == 0)
  751.       return 0;
  752.     if (fp->_flags & _IO_IS_APPENDING)
  753. --- 229,235 ----
  754.        const char* data;
  755.        _IO_size_t to_do;
  756.   {
  757. !   _IO_ssize_t count;
  758.     if (to_do == 0)
  759.       return 0;
  760.     if (fp->_flags & _IO_IS_APPENDING)
  761. ***************
  762. *** 245,251 ****
  763.   _IO_file_underflow(fp)
  764.        register _IO_FILE *fp;
  765.   {
  766. !   _IO_size_t count;
  767.   #if 0
  768.     /* SysV does not make this test; take it out for compatibility */
  769.     if (fp->_flags & _IO_EOF_SEEN)
  770. --- 260,266 ----
  771.   _IO_file_underflow(fp)
  772.        register _IO_FILE *fp;
  773.   {
  774. !   _IO_ssize_t count;
  775.   #if 0
  776.     /* SysV does not make this test; take it out for compatibility */
  777.     if (fp->_flags & _IO_EOF_SEEN)
  778. ***************
  779. *** 271,280 ****
  780. --- 286,326 ----
  781.                    fp->_IO_buf_end - fp->_IO_buf_base);
  782.     if (count <= 0)
  783.       {
  784. + #if 1
  785. +       /* errno may be changed by the signal handler. when we see
  786. +        * errno == 0, we assume the signal is benign :-(.
  787. +        *
  788. +        * We don't need it any more. H.J.
  789. +        */
  790. + #if 1
  791. + #define    CHECK_ZERO_ERRNO
  792. + #else
  793. + #define    CHECK_ZERO_ERRNO    || errno == 0
  794. + #endif
  795. + #ifdef EAGAIN
  796. + #if defined(EWOULDBLOCK) && EWOULDBLOCK != EAGAIN
  797. +       if (count == 0 CHECK_ZERO_ERRNO || errno == EAGAIN
  798. +     || errno == EWOULDBLOCK)
  799. + #else
  800. +       if (count == 0 CHECK_ZERO_ERRNO || errno == EAGAIN)
  801. + #endif
  802. + #else
  803. + #ifdef EWOULDBLOCK
  804. +       if (count == 0 CHECK_ZERO_ERRNO || errno == EWOULDBLOCK)
  805. + #else
  806. +       if (count == 0 CHECK_ZERO_ERRNO)
  807. + #endif
  808. + #endif
  809. +     fp->_flags |= _IO_EOF_SEEN;
  810. +       else
  811. +         fp->_flags |= _IO_ERR_SEEN;
  812. +       count = 0;
  813. + #else
  814.         if (count == 0)
  815.       fp->_flags |= _IO_EOF_SEEN;
  816.         else
  817.       fp->_flags |= _IO_ERR_SEEN, count = 0;
  818. + #endif
  819.     }
  820.     fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
  821.     fp->_IO_read_end = fp->_IO_buf_base + count;
  822. ***************
  823. *** 575,581 ****
  824.     register const char *s = data;
  825.     _IO_size_t to_do = n;
  826.     int must_flush = 0;
  827. !   _IO_size_t count;
  828.   
  829.     if (n <= 0)
  830.       return 0;
  831. --- 621,627 ----
  832.     register const char *s = data;
  833.     _IO_size_t to_do = n;
  834.     int must_flush = 0;
  835. !   _IO_ssize_t count;
  836.   
  837.     if (n <= 0)
  838.       return 0;
  839. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/floatconv.c libg++-2.5.3linux.2/libio/floatconv.c
  840. *** libg++-2.5.3/libio/floatconv.c    Fri Nov 26 21:58:45 1993
  841. --- libg++-2.5.3linux.2/libio/floatconv.c    Mon Dec 20 08:54:25 1993
  842. ***************
  843. *** 1111,1116 ****
  844. --- 1111,1118 ----
  845.                                   goto break2;
  846.                           /* no break */
  847.                   case 0:
  848. +             /* "+" and "-" should be reported as an error? */
  849. +             sign = 0;
  850.               s = s00;
  851.                           goto ret;
  852.                   case '\t':
  853. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/genops.c libg++-2.5.3linux.2/libio/genops.c
  854. *** libg++-2.5.3/libio/genops.c    Wed Dec 22 06:39:59 1993
  855. --- libg++-2.5.3linux.2/libio/genops.c    Tue Jan 18 11:23:36 1994
  856. ***************
  857. *** 25,31 ****
  858.   /* Generic or default I/O operations. */
  859.   
  860.   #include "libioP.h"
  861. - #include <stdlib.h>
  862.   #include <string.h>
  863.   
  864.   void _IO_un_link(fp)
  865. --- 25,30 ----
  866. ***************
  867. *** 283,289 ****
  868.       return 0;
  869.     for (;;)
  870.       {
  871. !       _IO_size_t count = f->_IO_write_end - f->_IO_write_ptr; /* Space available. */
  872.         if (count > 0)
  873.       {
  874.         if (count > more)
  875. --- 282,288 ----
  876.       return 0;
  877.     for (;;)
  878.       {
  879. !       _IO_ssize_t count = f->_IO_write_end - f->_IO_write_ptr; /* Space available. */
  880.         if (count > 0)
  881.       {
  882.         if (count > more)
  883. ***************
  884. *** 332,338 ****
  885.     register char *s = data;
  886.     for (;;)
  887.       {
  888. !       _IO_size_t count = fp->_IO_read_end - fp->_IO_read_ptr; /* Data available. */
  889.         if (count > 0)
  890.       {
  891.         if (count > more)
  892. --- 331,337 ----
  893.     register char *s = data;
  894.     for (;;)
  895.       {
  896. !       _IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr; /* Data available. */
  897.         if (count > 0)
  898.       {
  899.         if (count > more)
  900. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofclose.c libg++-2.5.3linux.2/libio/iofclose.c
  901. *** libg++-2.5.3/libio/iofclose.c    Fri Dec  3 02:23:21 1993
  902. --- libg++-2.5.3linux.2/libio/iofclose.c    Sun Feb 13 22:29:51 1994
  903. ***************
  904. *** 23,35 ****
  905.   the executable file might be covered by the GNU General Public License. */
  906.   
  907.   #include "libioP.h"
  908. - #include <stdlib.h>
  909.   
  910.   int
  911.   _IO_fclose(fp)
  912.        register _IO_FILE *fp;
  913.   {
  914.     int status = 0;
  915.     COERCE_FILE(fp);
  916.     if (fp->_IO_file_flags & _IO_IS_FILEBUF)
  917.       status = _IO_file_close_it(fp);
  918. --- 23,35 ----
  919.   the executable file might be covered by the GNU General Public License. */
  920.   
  921.   #include "libioP.h"
  922.   
  923.   int
  924.   _IO_fclose(fp)
  925.        register _IO_FILE *fp;
  926.   {
  927.     int status = 0;
  928. +   CHECK_FILE(fp, EOF);
  929.     COERCE_FILE(fp);
  930.     if (fp->_IO_file_flags & _IO_IS_FILEBUF)
  931.       status = _IO_file_close_it(fp);
  932. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofdopen.c libg++-2.5.3linux.2/libio/iofdopen.c
  933. *** libg++-2.5.3/libio/iofdopen.c    Fri Nov 26 21:58:48 1993
  934. --- libg++-2.5.3linux.2/libio/iofdopen.c    Mon Dec 20 08:54:26 1993
  935. ***************
  936. *** 23,28 ****
  937. --- 23,33 ----
  938.   the executable file might be covered by the GNU General Public License. */
  939.   
  940.   #include "libioP.h"
  941. + #include <fcntl.h>
  942. + #ifndef _IO_fcntl
  943. + #define _IO_fcntl fcntl
  944. + #endif
  945.   
  946.   _IO_FILE *
  947.   _IO_fdopen (fd, mode)
  948. ***************
  949. *** 30,35 ****
  950. --- 35,42 ----
  951.        const char *mode;
  952.   {
  953.     int read_write;
  954. +   int posix_mode = 0;
  955. +   int status_flag;
  956.     struct _IO_FILE_plus *fp;
  957.   
  958.     switch (*mode++)
  959. ***************
  960. *** 41,46 ****
  961. --- 48,54 ----
  962.         read_write = _IO_NO_READS;
  963.         break;
  964.       case 'a':
  965. +       posix_mode = O_APPEND;
  966.         read_write = _IO_NO_READS|_IO_IS_APPENDING;
  967.         break;
  968.       default:
  969. ***************
  970. *** 65,75 ****
  971. --- 73,107 ----
  972.         free (fp);
  973.         return NULL;
  974.       }
  975. +   fp->_file._flags |= CLOSED_FILEBUF_FLAGS;
  976.     fp->_file._flags &= ~_IO_DELETE_DONT_CLOSE;
  977.   
  978.     fp->_file._IO_file_flags = 
  979.       _IO_mask_flags(&fp->_file, read_write,
  980.              _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
  981.   
  982. + #ifdef F_GETFL
  983. +   status_flag = _IO_fcntl (fp->_file._fileno, F_GETFL);
  984. +   if (status_flag == -1)
  985. +   {
  986. +     _IO_un_link(&fp->_file);
  987. +     free (fp);
  988. +     return NULL;
  989. +   }
  990. +   /* check if we need to change the status flag. */
  991. +   if ((status_flag & O_APPEND) != posix_mode)
  992. +   {
  993. +     /* Set new status flag. */
  994. +     status_flag = (status_flag & ~O_APPEND) | posix_mode;
  995. +     if (_IO_fcntl (fp->_file._fileno, F_SETFL, status_flag) == -1)
  996. +     {
  997. +       _IO_un_link(&fp->_file);
  998. +       free (fp);
  999. +       return NULL;
  1000. +     }
  1001. +   }
  1002. + #else
  1003. + #error "I don't know what you have for F_GETFL."
  1004. + #endif
  1005.     return (_IO_FILE*)fp;
  1006.   }
  1007. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofflush.c libg++-2.5.3linux.2/libio/iofflush.c
  1008. *** libg++-2.5.3/libio/iofflush.c    Fri Aug 20 04:18:06 1993
  1009. --- libg++-2.5.3linux.2/libio/iofflush.c    Sun Feb 13 22:30:10 1994
  1010. ***************
  1011. *** 32,37 ****
  1012. --- 32,38 ----
  1013.       return _IO_flush_all();
  1014.     else
  1015.       {
  1016. +       CHECK_FILE(fp, EOF);
  1017.         COERCE_FILE(fp);
  1018.         return fp->_jumps->__sync(fp) ? EOF : 0;
  1019.       }
  1020. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofgetpos.c libg++-2.5.3linux.2/libio/iofgetpos.c
  1021. *** libg++-2.5.3/libio/iofgetpos.c    Mon Sep 27 17:46:25 1993
  1022. --- libg++-2.5.3linux.2/libio/iofgetpos.c    Sun Feb 13 22:30:23 1994
  1023. ***************
  1024. *** 32,37 ****
  1025. --- 32,38 ----
  1026.        _IO_fpos_t *posp;
  1027.   {
  1028.     _IO_fpos_t pos;
  1029. +   CHECK_FILE(fp, EOF);
  1030.     COERCE_FILE(fp);
  1031.     pos = _IO_seekoff(fp, 0, _IO_seek_cur|_IO_seek_not_in|_IO_seek_not_out);
  1032.     if (pos == _IO_pos_BAD)
  1033. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofgets.c libg++-2.5.3linux.2/libio/iofgets.c
  1034. *** libg++-2.5.3/libio/iofgets.c    Fri Aug 20 04:18:07 1993
  1035. --- libg++-2.5.3linux.2/libio/iofgets.c    Mon Feb 14 09:52:18 1994
  1036. ***************
  1037. *** 30,39 ****
  1038.        int n;
  1039.        _IO_FILE* fp;
  1040.   {
  1041. !   long count;
  1042.     COERCE_FILE(fp);
  1043. !   count = _IO_getline(fp, buf, n, '\n', 1);
  1044. !   if (count <= 0)
  1045.       return NULL;
  1046.     return buf;
  1047.   }
  1048. --- 30,43 ----
  1049.        int n;
  1050.        _IO_FILE* fp;
  1051.   {
  1052. !   _IO_size_t count;
  1053. !   CHECK_FILE(fp, NULL);
  1054.     COERCE_FILE(fp);
  1055. !   if (n <= 0)
  1056.       return NULL;
  1057. +   count = _IO_getline(fp, buf, n - 1, '\n', 1);
  1058. +   if (count == 0 || (fp->_IO_file_flags & _IO_ERR_SEEN))
  1059. +     return NULL;
  1060. +   buf[count] = 0;
  1061.     return buf;
  1062.   }
  1063. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofopen.c libg++-2.5.3linux.2/libio/iofopen.c
  1064. *** libg++-2.5.3/libio/iofopen.c    Fri Nov 26 17:01:56 1993
  1065. --- libg++-2.5.3linux.2/libio/iofopen.c    Mon Dec 20 08:54:27 1993
  1066. ***************
  1067. *** 23,29 ****
  1068.   the executable file might be covered by the GNU General Public License. */
  1069.   
  1070.   #include "libioP.h"
  1071. - #include <stdlib.h>
  1072.   
  1073.   _IO_FILE *
  1074.   _IO_fopen (filename, mode)
  1075. --- 23,28 ----
  1076. ***************
  1077. *** 37,44 ****
  1078.     _IO_init(&fp->_file, 0);
  1079.     fp->_file._jumps = &_IO_file_jumps;
  1080.     _IO_file_init(&fp->_file);
  1081. -   if (fp == NULL)
  1082. -     return NULL;
  1083.     fp->_vtable = NULL;
  1084.     if (_IO_file_fopen(&fp->_file, filename, mode) != NULL)
  1085.           return (_IO_FILE*)fp;
  1086. --- 36,41 ----
  1087. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofprintf.c libg++-2.5.3linux.2/libio/iofprintf.c
  1088. *** libg++-2.5.3/libio/iofprintf.c    Tue Oct  5 13:39:41 1993
  1089. --- libg++-2.5.3linux.2/libio/iofprintf.c    Mon Feb 14 09:59:35 1994
  1090. ***************
  1091. *** 40,45 ****
  1092. --- 40,46 ----
  1093.   {
  1094.     int ret;
  1095.     va_list args;
  1096. +   CHECK_FILE(fp, -1);
  1097.     COERCE_FILE(fp);
  1098.     _IO_va_start(args, format);
  1099.     ret = _IO_vfprintf(fp, format, args);
  1100. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofputs.c libg++-2.5.3linux.2/libio/iofputs.c
  1101. *** libg++-2.5.3/libio/iofputs.c    Fri Nov 26 17:01:57 1993
  1102. --- libg++-2.5.3linux.2/libio/iofputs.c    Mon Feb 14 09:59:47 1994
  1103. ***************
  1104. *** 30,35 ****
  1105. --- 30,36 ----
  1106.        _IO_FILE *fp;
  1107.   {
  1108.     _IO_size_t len = strlen(str);
  1109. +   CHECK_FILE(fp, EOF);
  1110.     COERCE_FILE(fp);
  1111.     if (_IO_sputn(fp, str, len) != len)
  1112.       return EOF;
  1113. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofread.c libg++-2.5.3linux.2/libio/iofread.c
  1114. *** libg++-2.5.3/libio/iofread.c    Wed Dec 22 06:39:59 1993
  1115. --- libg++-2.5.3linux.2/libio/iofread.c    Mon Feb 14 10:09:53 1994
  1116. ***************
  1117. *** 33,38 ****
  1118. --- 33,39 ----
  1119.   {
  1120.     _IO_size_t bytes_requested = size*count;
  1121.     _IO_size_t bytes_read;
  1122. +   CHECK_FILE(fp, 0);
  1123.     COERCE_FILE(fp);
  1124.     if (bytes_requested == 0)
  1125.       return 0;
  1126. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofscanf.c libg++-2.5.3linux.2/libio/iofscanf.c
  1127. *** libg++-2.5.3/libio/iofscanf.c    Wed Nov  3 14:59:49 1993
  1128. --- libg++-2.5.3linux.2/libio/iofscanf.c    Mon Feb 14 10:02:22 1994
  1129. ***************
  1130. *** 40,45 ****
  1131. --- 40,46 ----
  1132.   {
  1133.     int ret;
  1134.     va_list args;
  1135. +   CHECK_FILE(fp, EOF);
  1136.     COERCE_FILE(fp);
  1137.     _IO_va_start(args, format);
  1138.     ret = _IO_vfscanf(fp, format, args, NULL);
  1139. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofsetpos.c libg++-2.5.3linux.2/libio/iofsetpos.c
  1140. *** libg++-2.5.3/libio/iofsetpos.c    Wed Dec 22 06:40:00 1993
  1141. --- libg++-2.5.3linux.2/libio/iofsetpos.c    Sun Feb 13 22:31:02 1994
  1142. ***************
  1143. *** 30,35 ****
  1144. --- 30,36 ----
  1145.        _IO_FILE* fp;
  1146.        const _IO_fpos_t *posp;
  1147.   {
  1148. +   CHECK_FILE(fp, EOF);
  1149.     COERCE_FILE(fp);
  1150.     if (_IO_seekpos(fp, *posp, 0) == _IO_pos_BAD)
  1151.       {
  1152. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioftell.c libg++-2.5.3linux.2/libio/ioftell.c
  1153. *** libg++-2.5.3/libio/ioftell.c    Fri Aug 20 04:18:11 1993
  1154. --- libg++-2.5.3linux.2/libio/ioftell.c    Sun Feb 13 22:26:42 1994
  1155. ***************
  1156. *** 31,36 ****
  1157. --- 31,37 ----
  1158.        _IO_FILE* fp;
  1159.   {
  1160.     _IO_pos_t pos;
  1161. +   CHECK_FILE(fp, -1L);
  1162.     COERCE_FILE(fp);
  1163.     pos = _IO_seekoff(fp, 0, _IO_seek_cur|_IO_seek_not_in|_IO_seek_not_out);
  1164.     if (pos == _IO_pos_BAD)
  1165. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iofwrite.c libg++-2.5.3linux.2/libio/iofwrite.c
  1166. *** libg++-2.5.3/libio/iofwrite.c    Wed Dec 22 06:40:00 1993
  1167. --- libg++-2.5.3linux.2/libio/iofwrite.c    Mon Feb 14 10:10:02 1994
  1168. ***************
  1169. *** 33,38 ****
  1170. --- 33,39 ----
  1171.   {
  1172.     _IO_size_t request = size*count;
  1173.     _IO_size_t written;
  1174. +   CHECK_FILE(fp, 0);
  1175.     COERCE_FILE(fp);
  1176.     if (request == 0)
  1177.       return 0;
  1178. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iogetline.c libg++-2.5.3linux.2/libio/iogetline.c
  1179. *** libg++-2.5.3/libio/iogetline.c    Mon Nov 15 16:32:49 1993
  1180. --- libg++-2.5.3linux.2/libio/iogetline.c    Thu Jan 27 16:50:06 1994
  1181. ***************
  1182. *** 28,34 ****
  1183.   /* Algorithm based on that used by Berkeley pre-4.4 fgets implementation.
  1184.   
  1185.      Read chars into buf (of size n), until delim is seen.
  1186. !    Return number of chars read (at most n-1).
  1187.      If extract_delim < 0, leave delimiter unread.
  1188.      If extract_delim > 0, insert delim in output. */
  1189.   
  1190. --- 28,35 ----
  1191.   /* Algorithm based on that used by Berkeley pre-4.4 fgets implementation.
  1192.   
  1193.      Read chars into buf (of size n), until delim is seen.
  1194. !    Return number of chars read (at most n).
  1195. !    Does not put a terminating '\0' in buf.
  1196.      If extract_delim < 0, leave delimiter unread.
  1197.      If extract_delim > 0, insert delim in output. */
  1198.   
  1199. ***************
  1200. *** 41,52 ****
  1201.        int extract_delim;
  1202.   {
  1203.     register char *ptr = buf;
  1204. -   if (n <= 0)
  1205. -     return EOF;
  1206. -   n--; /* Leave space for final '\0'. */
  1207.     do
  1208.       {
  1209. !       _IO_size_t len = fp->_IO_read_end - fp->_IO_read_ptr;
  1210.         char *t;
  1211.         if (len <= 0)
  1212.       if (__underflow(fp) == EOF)
  1213. --- 42,50 ----
  1214.        int extract_delim;
  1215.   {
  1216.     register char *ptr = buf;
  1217.     do
  1218.       {
  1219. !       _IO_ssize_t len = fp->_IO_read_end - fp->_IO_read_ptr;
  1220.         char *t;
  1221.         if (len <= 0)
  1222.       if (__underflow(fp) == EOF)
  1223. ***************
  1224. *** 63,74 ****
  1225.         if (extract_delim >= 0)
  1226.           {
  1227.             t++;
  1228. -           old_len++;
  1229.             if (extract_delim > 0)
  1230.           len++;
  1231.           }
  1232.         memcpy((void*)ptr, (void*)fp->_IO_read_ptr, len);
  1233. -       ptr[len] = 0;
  1234.         fp->_IO_read_ptr = t;
  1235.         return old_len + len;
  1236.       }
  1237. --- 61,70 ----
  1238. ***************
  1239. *** 77,82 ****
  1240.         ptr += len;
  1241.         n -= len;
  1242.       } while (n != 0);
  1243. -   *ptr = 0;
  1244.     return ptr - buf;
  1245.   }
  1246. --- 73,77 ----
  1247. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iogets.c libg++-2.5.3linux.2/libio/iogets.c
  1248. *** libg++-2.5.3/libio/iogets.c    Mon Sep 27 17:46:27 1993
  1249. --- libg++-2.5.3linux.2/libio/iogets.c    Thu Jan 27 16:50:06 1994
  1250. ***************
  1251. *** 29,36 ****
  1252.   _IO_gets(buf)
  1253.        char* buf;
  1254.   {
  1255. !   long count = _IO_getline(_IO_stdin, buf, INT_MAX, '\n', 0);
  1256. !   if (count <= 0)
  1257.       return NULL;
  1258.     return buf;
  1259.   }
  1260. --- 29,48 ----
  1261.   _IO_gets(buf)
  1262.        char* buf;
  1263.   {
  1264. !   _IO_size_t count;
  1265. !   int ch = _IO_getc (_IO_stdin);
  1266. !   if (ch == EOF)
  1267.       return NULL;
  1268. +   if (ch == '\n')
  1269. +     count = 0;
  1270. +   else
  1271. +     {
  1272. +       buf[0] = (char)ch;
  1273. +       count = _IO_getline(_IO_stdin, buf + 1, INT_MAX, '\n', 0) + 1;
  1274. +       if (_IO_stdin->_IO_file_flags & _IO_ERR_SEEN)
  1275. +     return NULL;
  1276. +     }
  1277. +   buf[count] = 0;
  1278.     return buf;
  1279.   }
  1280. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioignore.c libg++-2.5.3linux.2/libio/ioignore.c
  1281. *** libg++-2.5.3/libio/ioignore.c    Wed Nov  3 14:59:53 1993
  1282. --- libg++-2.5.3linux.2/libio/ioignore.c    Tue Jan 18 11:23:36 1994
  1283. ***************
  1284. *** 32,38 ****
  1285.     register _IO_size_t more = n;
  1286.     for (;;)
  1287.       {
  1288. !       _IO_size_t count = fp->_IO_read_end - fp->_IO_read_ptr;
  1289.         if (count > 0)
  1290.       {
  1291.         if (count > more)
  1292. --- 32,38 ----
  1293.     register _IO_size_t more = n;
  1294.     for (;;)
  1295.       {
  1296. !       _IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr;
  1297.         if (count > 0)
  1298.       {
  1299.         if (count > more)
  1300. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iolibio.h libg++-2.5.3linux.2/libio/iolibio.h
  1301. *** libg++-2.5.3/libio/iolibio.h    Fri Nov 26 21:58:50 1993
  1302. --- libg++-2.5.3linux.2/libio/iolibio.h    Mon Dec 20 08:54:27 1993
  1303. ***************
  1304. *** 1,31 ****
  1305.   #include "libio.h"
  1306.   
  1307.   /* These emulate stdio functionality, but with a different name
  1308.      (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
  1309.   
  1310. ! extern int _IO_fclose _PARAMS((_IO_FILE*));
  1311. ! extern _IO_FILE *_IO_fdopen _PARAMS((int, const char*));
  1312. ! extern int _IO_fflush _PARAMS((_IO_FILE*));
  1313. ! extern int _IO_fgetpos _PARAMS((_IO_FILE*, _IO_fpos_t*));
  1314. ! extern char* _IO_fgets _PARAMS((char*, int, _IO_FILE*));
  1315. ! extern _IO_FILE *_IO_fopen _PARAMS((const char*, const char*));
  1316. ! extern int _IO_fprintf _PARAMS((_IO_FILE*, const char*, ...));
  1317. ! extern int _IO_fputs _PARAMS((const char*, _IO_FILE*));
  1318. ! extern int _IO_fsetpos _PARAMS((_IO_FILE*, const _IO_fpos_t *));
  1319. ! extern long int _IO_ftell _PARAMS((_IO_FILE*));
  1320. ! extern _IO_size_t _IO_fwrite _PARAMS((const void*,
  1321.                         _IO_size_t, _IO_size_t, _IO_FILE*));
  1322. ! extern char* _IO_gets _PARAMS((char*));
  1323. ! extern void _IO_perror _PARAMS((const char*));
  1324. ! extern int _IO_puts _PARAMS((const char*));
  1325. ! extern int _IO_scanf _PARAMS((const char*, ...));
  1326. ! extern void _IO_setbuffer _PARAMS((_IO_FILE *, char*, _IO_size_t));
  1327. ! extern int _IO_setvbuf _PARAMS((_IO_FILE*, char*, int, _IO_size_t));
  1328. ! extern int _IO_sscanf _PARAMS((const char*, const char*, ...));
  1329. ! extern int _IO_sprintf _PARAMS((char *, const char*, ...));
  1330. ! extern int _IO_ungetc _PARAMS((int, _IO_FILE*));
  1331. ! extern int _IO_vsscanf _PARAMS((const char *, const char *, _IO_va_list));
  1332. ! extern int _IO_vsprintf _PARAMS((char*, const char*, _IO_va_list));
  1333.   #ifndef _IO_pos_BAD
  1334.   #define _IO_pos_BAD ((_IO_fpos_t)(-1))
  1335.   #endif
  1336. --- 1,40 ----
  1337. + #ifndef _IOLIBIO_H
  1338. + #define _IOLIBIO_H
  1339.   #include "libio.h"
  1340.   
  1341.   /* These emulate stdio functionality, but with a different name
  1342.      (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
  1343.   
  1344. ! extern int _IO_fclose __P((_IO_FILE*));
  1345. ! extern _IO_FILE *_IO_fdopen __P((int, const char*));
  1346. ! extern int _IO_fflush __P((_IO_FILE*));
  1347. ! extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*));
  1348. ! extern char* _IO_fgets __P((char*, int, _IO_FILE*));
  1349. ! extern _IO_FILE *_IO_fopen __P((const char*, const char*));
  1350. ! extern int _IO_fprintf __P((_IO_FILE*, const char*, ...));
  1351. ! extern int _IO_fputs __P((const char*, _IO_FILE*));
  1352. ! extern _IO_size_t _IO_fread __P((void *,
  1353. !                       _IO_size_t, _IO_size_t, _IO_FILE*));
  1354. ! extern int _IO_fscanf __P((_IO_FILE *, const char *, ...));
  1355. ! extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *));
  1356. ! extern long int _IO_ftell __P((_IO_FILE*));
  1357. ! extern _IO_size_t _IO_fwrite __P((const void*,
  1358.                         _IO_size_t, _IO_size_t, _IO_FILE*));
  1359. ! extern char* _IO_gets __P((char*));
  1360. ! extern void _IO_perror __P((const char*));
  1361. ! extern int _IO_printf  __P((const char *, ...));
  1362. ! extern int _IO_puts __P((const char*));
  1363. ! extern int _IO_scanf __P((const char*, ...));
  1364. ! extern void _IO_setbuffer __P((_IO_FILE *, char*, _IO_size_t));
  1365. ! extern int _IO_setvbuf __P((_IO_FILE*, char*, int, _IO_size_t));
  1366. ! extern int _IO_sscanf __P((const char*, const char*, ...));
  1367. ! extern int _IO_sprintf __P((char *, const char*, ...));
  1368. ! extern int _IO_ungetc __P((int, _IO_FILE*));
  1369. ! extern int _IO_vfscanf __P((_IO_FILE *, const char *, _IO_va_list,
  1370. !                 int *__errp));
  1371. ! extern int _IO_vsscanf __P((const char *, const char *, _IO_va_list));
  1372. ! extern int _IO_vsprintf __P((char*, const char*, _IO_va_list));
  1373.   #ifndef _IO_pos_BAD
  1374.   #define _IO_pos_BAD ((_IO_fpos_t)(-1))
  1375.   #endif
  1376. ***************
  1377. *** 39,46 ****
  1378.   #define _IO_freopen(FILENAME, MODE, FP) \
  1379.     (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE))
  1380.   #define _IO_fileno(FP) ((FP)->_fileno)
  1381. ! extern _IO_FILE* _IO_popen _PARAMS((const char*, const char*));
  1382.   #define _IO_pclose _IO_fclose
  1383.   #define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
  1384.   #define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
  1385.   
  1386. --- 48,56 ----
  1387.   #define _IO_freopen(FILENAME, MODE, FP) \
  1388.     (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE))
  1389.   #define _IO_fileno(FP) ((FP)->_fileno)
  1390. ! extern _IO_FILE* _IO_popen __P((const char*, const char*));
  1391.   #define _IO_pclose _IO_fclose
  1392.   #define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
  1393.   #define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
  1394.   
  1395. + #endif /* _IOLIBIO_H */
  1396. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iomanip.h libg++-2.5.3linux.2/libio/iomanip.h
  1397. *** libg++-2.5.3/libio/iomanip.h    Fri Oct 22 00:54:27 1993
  1398. --- libg++-2.5.3linux.2/libio/iomanip.h    Mon Dec 20 08:54:28 1993
  1399. ***************
  1400. *** 82,88 ****
  1401.   template<class TP> class iapp {
  1402.       istream& (*_f)(istream&, TP);
  1403.   public: 
  1404. !     iapp(ostream& (*f)(istream&,TP)) : _f(f) {}
  1405.       //
  1406.       imanip<TP> operator()(TP a)
  1407.          { return imanip<TP>(_f, a); }
  1408. --- 82,88 ----
  1409.   template<class TP> class iapp {
  1410.       istream& (*_f)(istream&, TP);
  1411.   public: 
  1412. !     iapp(istream& (*f)(istream&,TP)) : _f(f) {}
  1413.       //
  1414.       imanip<TP> operator()(TP a)
  1415.          { return imanip<TP>(_f, a); }
  1416. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioperror.c libg++-2.5.3linux.2/libio/ioperror.c
  1417. *** libg++-2.5.3/libio/ioperror.c    Tue Oct  5 22:12:50 1993
  1418. --- libg++-2.5.3linux.2/libio/ioperror.c    Mon Dec 20 08:54:28 1993
  1419. ***************
  1420. *** 1,12 ****
  1421.   #include "libioP.h"
  1422.   #include <errno.h>
  1423. - #include <string.h>
  1424.   #ifndef errno
  1425.   extern int errno;
  1426.   #endif
  1427.   
  1428.   #ifndef _IO_strerror
  1429. ! extern char* _IO_strerror _PARAMS((int));
  1430.   #endif
  1431.   
  1432.   void
  1433. --- 1,58 ----
  1434. + /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  1435. + This file is part of the GNU C Library.
  1436. + The GNU C Library is free software; you can redistribute it and/or
  1437. + modify it under the terms of the GNU Library General Public License as
  1438. + published by the Free Software Foundation; either version 2 of the
  1439. + License, or (at your option) any later version.
  1440. + The GNU C Library is distributed in the hope that it will be useful,
  1441. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1442. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1443. + Library General Public License for more details.
  1444. + You should have received a copy of the GNU Library General Public
  1445. + License along with the GNU C Library; see the file COPYING.LIB.  If
  1446. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  1447. + Cambridge, MA 02139, USA.  */
  1448. + #include <ansidecl.h>
  1449.   #include "libioP.h"
  1450.   #include <errno.h>
  1451.   #ifndef errno
  1452.   extern int errno;
  1453.   #endif
  1454.   
  1455. + /* Also glibc? */
  1456. + #ifdef __linux__
  1457. + /* Print a line on stderr consisting of the text in S, a colon, a space,
  1458. +    a message describing the meaning of the contents of `errno' and a newline.
  1459. +    If S is NULL or "", the colon and space are omitted.  */
  1460. + void
  1461. + DEFUN(_IO_perror, (s), register CONST char *s)
  1462. + {
  1463. +   int errnum = errno;
  1464. +   CONST char *colon;
  1465. +   if (s == NULL || *s == '\0')
  1466. +     s = colon = "";
  1467. +   else
  1468. +     colon = ": ";
  1469. +   if (errnum >= 0 && errnum < _sys_nerr)
  1470. +     (void) _IO_fprintf(_IO_stderr, "%s%s%s\n", s, colon, _sys_errlist[errnum]);
  1471. +   else
  1472. +     (void) _IO_fprintf(_IO_stderr, "%s%sUnknown error %d\n", s, colon, errnum);
  1473. + }
  1474. + #else
  1475. + #include <string.h>
  1476.   #ifndef _IO_strerror
  1477. ! extern char* _IO_strerror __P((int));
  1478.   #endif
  1479.   
  1480.   void
  1481. ***************
  1482. *** 20,22 ****
  1483. --- 66,70 ----
  1484.   
  1485.     _IO_fprintf (_IO_stderr, "%s\n", error ? error : "");
  1486.   }
  1487. + #endif
  1488. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iopopen.c libg++-2.5.3linux.2/libio/iopopen.c
  1489. *** libg++-2.5.3/libio/iopopen.c    Fri Nov 26 18:50:41 1993
  1490. --- libg++-2.5.3linux.2/libio/iopopen.c    Mon Dec 20 08:54:28 1993
  1491. ***************
  1492. *** 29,38 ****
  1493.   #if _IO_HAVE_SYS_WAIT
  1494.   #include <signal.h>
  1495.   #include <unistd.h>
  1496. - #ifdef __STDC__
  1497. - /* This is now provided by gcc's fixproto. */
  1498. - #include <stdlib.h>
  1499. - #endif
  1500.   #include <errno.h>
  1501.   #ifndef errno
  1502.   extern int errno;
  1503. --- 29,34 ----
  1504. ***************
  1505. *** 139,144 ****
  1506. --- 135,141 ----
  1507.     ((_IO_proc_file*)fp)->_next = proc_file_chain;
  1508.     proc_file_chain = (_IO_proc_file*)fp;
  1509.   
  1510. +   fp->_IO_file_flags |= CLOSED_FILEBUF_FLAGS;
  1511.     fp->_IO_file_flags
  1512.       = read_or_write | (fp->_IO_file_flags & ~(_IO_NO_READS|_IO_NO_WRITES));
  1513.     return fp;
  1514. ***************
  1515. *** 175,194 ****
  1516.     int wstatus;
  1517.     _IO_proc_file **ptr = &proc_file_chain;
  1518.     _IO_pid_t wait_pid;
  1519. !   int status = _IO_close(_IO_fileno(fp));
  1520.   
  1521.     /* Unlink from proc_file_chain. */
  1522. !   for ( ; *ptr != NULL; ptr = &(*ptr)->_next)
  1523.       {
  1524. !       if (*ptr == (_IO_proc_file*)fp)
  1525. !     {
  1526. !       *ptr = (*ptr)->_next;
  1527. !       break;
  1528. !     }
  1529.       }
  1530.   
  1531. !   if (status < 0)
  1532. !     return status;
  1533.     /* POSIX.2 Rationale:  "Some historical implementations either block
  1534.        or ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting
  1535.        for the child process to terminate.  Since this behavior is not
  1536. --- 172,192 ----
  1537.     int wstatus;
  1538.     _IO_proc_file **ptr = &proc_file_chain;
  1539.     _IO_pid_t wait_pid;
  1540. !   int status = -1;
  1541.   
  1542.     /* Unlink from proc_file_chain. */
  1543. !   for (; *ptr; ptr = &((*ptr)->_next))
  1544. !   {
  1545. !     if (*ptr == (_IO_proc_file*)fp)
  1546.       {
  1547. !       *ptr = (*ptr)->_next;
  1548. !       status = 0;
  1549. !       break;
  1550.       }
  1551. +   }
  1552.   
  1553. !   if (status < 0 || _IO_close(_IO_fileno(fp)) < 0)
  1554. !     return -1;
  1555.     /* POSIX.2 Rationale:  "Some historical implementations either block
  1556.        or ignore the signals SIGINT, SIGQUIT, and SIGHUP while waiting
  1557.        for the child process to terminate.  Since this behavior is not
  1558. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioprims.c libg++-2.5.3linux.2/libio/ioprims.c
  1559. *** libg++-2.5.3/libio/ioprims.c    Tue Aug 17 21:27:04 1993
  1560. --- libg++-2.5.3linux.2/libio/ioprims.c    Mon Dec 20 08:54:28 1993
  1561. ***************
  1562. *** 28,34 ****
  1563. --- 28,37 ----
  1564.      (in which case read would be defined in terms of _IO_read,
  1565.      rather than vice versa). */
  1566.   
  1567. + #ifndef __linux__
  1568.   #include "libioP.h"
  1569. + #include <unistd.h>
  1570.   #include <sys/types.h>
  1571.   #include <sys/stat.h>
  1572.   
  1573. ***************
  1574. *** 77,79 ****
  1575. --- 80,84 ----
  1576.   {
  1577.     return fstat (fildes, buf);
  1578.   }
  1579. + #endif
  1580. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iosetbuffer.c libg++-2.5.3linux.2/libio/iosetbuffer.c
  1581. *** libg++-2.5.3/libio/iosetbuffer.c    Mon Oct  4 20:26:21 1993
  1582. --- libg++-2.5.3linux.2/libio/iosetbuffer.c    Sun Feb 13 22:31:20 1994
  1583. ***************
  1584. *** 30,35 ****
  1585. --- 30,36 ----
  1586.        char *buf;
  1587.        _IO_size_t size;
  1588.   {
  1589. +   CHECK_FILE(fp, );
  1590.     COERCE_FILE(fp);
  1591.     fp->_flags &= ~_IO_LINE_BUF;
  1592.     if (buf)
  1593. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iosetvbuf.c libg++-2.5.3linux.2/libio/iosetvbuf.c
  1594. *** libg++-2.5.3/libio/iosetvbuf.c    Mon Oct  4 20:26:28 1993
  1595. --- libg++-2.5.3linux.2/libio/iosetvbuf.c    Sun Feb 13 22:31:30 1994
  1596. ***************
  1597. *** 35,40 ****
  1598. --- 35,41 ----
  1599.        int mode;
  1600.        _IO_size_t size;
  1601.   {
  1602. +   CHECK_FILE(fp, EOF);
  1603.     COERCE_FILE(fp);
  1604.     switch (mode)
  1605.       {
  1606. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iostrerror.c libg++-2.5.3linux.2/libio/iostrerror.c
  1607. *** libg++-2.5.3/libio/iostrerror.c    Mon Oct 11 23:49:53 1993
  1608. --- libg++-2.5.3linux.2/libio/iostrerror.c    Mon Dec 20 08:54:29 1993
  1609. ***************
  1610. *** 1,3 ****
  1611. --- 1,5 ----
  1612. + #ifndef __linux__
  1613.   /* This should be replaced by whatever namespace-clean
  1614.      version of strerror you have available. */
  1615.   
  1616. ***************
  1617. *** 9,11 ****
  1618. --- 11,15 ----
  1619.   {
  1620.     return strerror(errnum);
  1621.   }
  1622. + #endif
  1623. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iotempname.c libg++-2.5.3linux.2/libio/iotempname.c
  1624. *** libg++-2.5.3/libio/iotempname.c    Wed Dec 31 19:00:00 1969
  1625. --- libg++-2.5.3linux.2/libio/iotempname.c    Mon Dec 20 08:54:30 1993
  1626. ***************
  1627. *** 0 ****
  1628. --- 1,238 ----
  1629. + /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  1630. + This file is part of the GNU C Library.
  1631. + The GNU C Library is free software; you can redistribute it and/or
  1632. + modify it under the terms of the GNU Library General Public License as
  1633. + published by the Free Software Foundation; either version 2 of the
  1634. + License, or (at your option) any later version.
  1635. + The GNU C Library is distributed in the hope that it will be useful,
  1636. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1637. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  1638. + Library General Public License for more details.
  1639. + You should have received a copy of the GNU Library General Public
  1640. + License along with the GNU C Library; see the file COPYING.LIB.  If
  1641. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  1642. + Cambridge, MA 02139, USA.  */
  1643. + #include <ansidecl.h>
  1644. + #include <errno.h>
  1645. + #ifdef __STDC__
  1646. + #include <stddef.h>
  1647. + #endif
  1648. + #include <stdlib.h>
  1649. + #include <string.h>
  1650. + #include <sys/types.h>
  1651. + #include <sys/stat.h>
  1652. + #include <fcntl.h>
  1653. + #include <unistd.h>
  1654. + #include "libioP.h"
  1655. + #include "stdio.h"
  1656. + #ifndef _IO_open
  1657. + #define _IO_open open
  1658. + #endif
  1659. + #ifndef _IO_close
  1660. + #define _IO_close close
  1661. + #endif
  1662. + #ifndef _IO_stat
  1663. + #define _IO_stat stat
  1664. + #endif
  1665. + #ifndef _IO_getpid
  1666. + #define _IO_getpid getpid
  1667. + #endif
  1668. + #ifndef _IO_geteuid
  1669. + #define _IO_geteuid geteuid
  1670. + #endif
  1671. + /* Return nonzero if DIR is an existent directory.  */
  1672. + static int
  1673. + DEFUN(diraccess, (dir), CONST char *dir)
  1674. + {
  1675. +   struct stat buf;
  1676. +   _IO_uid_t euid;
  1677. +   if (_IO_stat(dir, &buf) != 0 || !S_ISDIR(buf.st_mode)) return 0;
  1678. +   /* That is going to be tough. */
  1679. +   euid = _IO_geteuid ();
  1680. +   
  1681. +   /* super user */
  1682. +   if (!euid) return 1;
  1683. +   if (euid == buf.st_uid)
  1684. +     return ((buf.st_mode & S_IWUSR) && (buf.st_mode & S_IXUSR));
  1685. +   if (_IO_getegid () == buf.st_gid)
  1686. +     return ((buf.st_mode & S_IWGRP) && (buf.st_mode & S_IXGRP));
  1687. +   return ((buf.st_mode & S_IWOTH) && (buf.st_mode & S_IXOTH));
  1688. + }
  1689. + /* Return nonzero if FILE exists.  */
  1690. + static int
  1691. + DEFUN(exists, (file), CONST char *file)
  1692. + {
  1693. +   /* We can stat the file even if we can't read its data.  */
  1694. +   struct stat st;
  1695. +   int save = errno;
  1696. +   if (_IO_stat (file, &st) == 0)
  1697. +     return 1;
  1698. +   else
  1699. +     {
  1700. +       /* We report that the file exists if stat failed for a reason other
  1701. +      than nonexistence.  In this case, it may or may not exist, and we
  1702. +      don't know; but reporting that it does exist will never cause any
  1703. +      trouble, while reporting that it doesn't exist when it does would
  1704. +      violate the interface of __stdio_gen_tempname.  */
  1705. +       int exists = errno != ENOENT;
  1706. +       errno = save;
  1707. +       return exists;
  1708. +     }
  1709. + }
  1710. + /* These are the characters used in temporary filenames.  */
  1711. + static CONST char letters[] =
  1712. +   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  1713. + /* Generate a temporary filename and return it (in a static buffer).  If
  1714. +    STREAMPTR is not NULL, open a stream "w+b" on the file and set
  1715. +    *STREAMPTR to it.  If DIR_SEARCH is nonzero, DIR and PFX are used as
  1716. +    described for tempnam.  If not, a temporary filename in P_tmpdir with no
  1717. +    special prefix is generated.  If LENPTR is not NULL, *LENPTR is set the
  1718. +    to length (including the terminating '\0') of the resultant filename,
  1719. +    which is returned.  This goes through a cyclic pattern of all possible
  1720. +    filenames consisting of five decimal digits of the current pid and three
  1721. +    of the characters in `letters'.  Data for tempnam and tmpnam is kept
  1722. +    separate, but when tempnam is using P_tmpdir and no prefix (i.e, it is
  1723. +    identical to tmpnam), the same data is used.  Each potential filename is
  1724. +    tested for an already-existing file of the same name, and no name of an
  1725. +    existing file will be returned.  When the cycle reaches its end
  1726. +    (12345ZZZ), NULL is returned.  */
  1727. + char *
  1728. + DEFUN(_IO_gen_tempname, (dir, pfx, dir_search, lenptr, streamptr),
  1729. +       CONST char *dir AND CONST char *pfx AND
  1730. +       int dir_search AND _IO_size_t *lenptr AND
  1731. +       _IO_FILE **streamptr)
  1732. + {
  1733. +   int saverrno = errno;
  1734. +   static CONST char tmpdir[] = P_tmpdir;
  1735. +   static struct
  1736. +     {
  1737. +       unsigned char digits [4];
  1738. +     } infos[2], *info;
  1739. +   static char buf[FILENAME_MAX];
  1740. +   static _IO_pid_t oldpid = (pid_t) 0;
  1741. +   _IO_pid_t pid = _IO_getpid();
  1742. +   register _IO_size_t len, plen, dlen;
  1743. +   int i, carry;
  1744. +   if (dir_search)
  1745. +     {
  1746. +       register CONST char *d = getenv("TMPDIR");
  1747. +       if (d != NULL && !diraccess(d))
  1748. +     d = NULL;
  1749. +       if (d == NULL && dir != NULL && diraccess(dir))
  1750. +     d = dir;
  1751. +       if (d == NULL && diraccess(tmpdir))
  1752. +     d = tmpdir;
  1753. +       if (d == NULL && diraccess("/tmp"))
  1754. +     d = "/tmp";
  1755. +       if (d == NULL)
  1756. +     {
  1757. +       errno = ENOENT;
  1758. +       return NULL;
  1759. +     }
  1760. +       dir = d;
  1761. +     }
  1762. +   else
  1763. +     dir = tmpdir;
  1764. +   dlen = strlen (dir);
  1765. +   /* Remove trailing slashes from the directory name.  */
  1766. +   while (dlen > 1 && dir[dlen - 1] == '/')
  1767. +     --dlen;
  1768. +   if (pfx != NULL && *pfx != '\0')
  1769. +     {
  1770. +       plen = strlen(pfx);
  1771. +       if (plen > 5)
  1772. +     plen = 5;
  1773. +     }
  1774. +   else
  1775. +     plen = 0;
  1776. +   if (dir != tmpdir && !strcmp(dir, tmpdir))
  1777. +     dir = tmpdir;
  1778. +   info = &infos[(plen == 0 && dir == tmpdir) ? 1 : 0];
  1779. +   if (pid != oldpid)
  1780. +     {
  1781. +       oldpid = pid;
  1782. +       for (i = 0; i < sizeof (info->digits); i++)
  1783. +     infos[0].digits[i] = infos[1].digits[i] = 0;
  1784. +     }
  1785. +   len = dlen + 1 + plen + 5;
  1786. +   for (;;)
  1787. +     {
  1788. +       if (info->digits [sizeof (info->digits) - 1])
  1789. +     {
  1790. +       errno = EEXIST;
  1791. +       return NULL;
  1792. +     }
  1793. +       if ((sizeof (buf) - sizeof (info->digits)) < len ||
  1794. +         sprintf(buf, "%.*s/%.*s%.5d", (int) dlen, dir,
  1795. +         (int) plen, pfx, pid % 100000) != (int) len)
  1796. +     return NULL;
  1797. +       /* Get the last part of string */
  1798. +       for (i = 0; i < sizeof (info->digits) - 1; i++)
  1799. +         buf [len++] = letters [info->digits [i]];
  1800. +       buf [len] = '\0';
  1801. +       /* Always return a unique string.  */
  1802. +       carry = ++info->digits [0] / (sizeof (letters) - 1);
  1803. +       info->digits [0] %= (sizeof (letters) - 1);
  1804. +       for (i = 1; i < sizeof (info->digits); i++) {
  1805. +       info->digits [i] += carry;
  1806. +       carry = info->digits [i] / (sizeof (letters) - 1);
  1807. +       info->digits [i] %= (sizeof (letters) - 1);
  1808. +       }
  1809. +       if (streamptr != NULL)
  1810. +     {
  1811. +       int fd = _IO_open (buf, O_RDWR|O_CREAT|O_EXCL, 0666);
  1812. +       if (fd >= 0)
  1813. +         {
  1814. +           *streamptr = _IO_fdopen (fd, "w+b");
  1815. +           if (*streamptr == NULL)
  1816. +         {
  1817. +           int save = errno;
  1818. +           (void) _IO_close (fd);
  1819. +           errno = save;
  1820. +           return NULL;
  1821. +         }
  1822. +           break;
  1823. +         }
  1824. +     }
  1825. +       else if (!exists (buf))
  1826. +     break;
  1827. +     }
  1828. +   errno = saverrno;
  1829. +   if (lenptr != NULL)
  1830. +     *lenptr = len + 1;
  1831. +   return buf;
  1832. + }
  1833. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/ioungetc.c libg++-2.5.3linux.2/libio/ioungetc.c
  1834. *** libg++-2.5.3/libio/ioungetc.c    Mon Sep 27 17:46:35 1993
  1835. --- libg++-2.5.3linux.2/libio/ioungetc.c    Mon Feb 14 10:06:16 1994
  1836. ***************
  1837. *** 29,34 ****
  1838. --- 29,35 ----
  1839.        int c;
  1840.        _IO_FILE *fp;
  1841.   {
  1842. +   CHECK_FILE(fp, EOF);
  1843.     COERCE_FILE(fp);
  1844.     if (c == EOF)
  1845.       return EOF;
  1846. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iovfprintf.c libg++-2.5.3linux.2/libio/iovfprintf.c
  1847. *** libg++-2.5.3/libio/iovfprintf.c    Wed Dec 22 06:40:01 1993
  1848. --- libg++-2.5.3linux.2/libio/iovfprintf.c    Mon Feb 14 10:39:04 1994
  1849. ***************
  1850. *** 129,134 ****
  1851. --- 129,138 ----
  1852.     hp->_IO_write_base = buf;
  1853.     hp->_IO_write_ptr = buf;
  1854.     hp->_IO_write_end = buf+_IO_BUFSIZ;
  1855. +   /* TG: add because of Checker */
  1856. +   hp->_IO_file_flags = _IO_MAGIC|(_IO_IS_FILEBUF+_IO_NO_READS);
  1857.     hp->_jumps = &_IO_helper_jumps;
  1858.     
  1859.     /* Now print to helper instead. */
  1860. ***************
  1861. *** 148,154 ****
  1862.   #include "floatio.h"
  1863.   #define    BUF        (MAXEXP+MAXFRACT+1)    /* + decimal point */
  1864.   #define    DEFPREC        6
  1865. ! extern double modf _PARAMS((double, double*));
  1866.   
  1867.   #else /* no FLOATING_POINT */
  1868.   
  1869. --- 152,158 ----
  1870.   #include "floatio.h"
  1871.   #define    BUF        (MAXEXP+MAXFRACT+1)    /* + decimal point */
  1872.   #define    DEFPREC        6
  1873. ! extern double modf __P((double, double*));
  1874.   
  1875.   #else /* no FLOATING_POINT */
  1876.   
  1877. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/iovfscanf.c libg++-2.5.3linux.2/libio/iovfscanf.c
  1878. *** libg++-2.5.3/libio/iovfscanf.c    Wed Dec 22 06:40:01 1993
  1879. --- libg++-2.5.3linux.2/libio/iovfscanf.c    Mon Dec 20 08:54:30 1993
  1880. ***************
  1881. *** 74,79 ****
  1882. --- 74,80 ----
  1883.   #define    SUPPRESS    0x08    /* suppress assignment */
  1884.   #define    POINTER        0x10    /* weird %p pointer (`fake hex') */
  1885.   #define    NOSKIP        0x20    /* do not skip blanks */
  1886. + #define    WIDTH        0x40    /* width */
  1887.   
  1888.   /*
  1889.    * The following are used in numeric conversions only:
  1890. ***************
  1891. *** 101,109 ****
  1892.   #define u_char unsigned char
  1893.   #define u_long unsigned long
  1894.   
  1895. ! extern u_long strtoul _PARAMS((const char*, char**, int));
  1896. ! extern long strtol _PARAMS((const char*, char**, int));
  1897. ! static const u_char *__sccl _PARAMS((char *tab, const u_char *fmt));
  1898.   #ifndef USE_DTOA
  1899.   extern double atof();
  1900.   #endif
  1901. --- 102,110 ----
  1902.   #define u_char unsigned char
  1903.   #define u_long unsigned long
  1904.   
  1905. ! extern u_long strtoul __P((const char*, char**, int));
  1906. ! extern long strtol __P((const char*, char**, int));
  1907. ! static const u_char *__sccl __P((char *tab, const u_char *fmt));
  1908.   #ifndef USE_DTOA
  1909.   extern double atof();
  1910.   #endif
  1911. ***************
  1912. *** 123,135 ****
  1913.       register _IO_ssize_t width;    /* field width, or 0 */
  1914.       register char *p;    /* points into all kinds of strings */
  1915.       register int n;        /* handy integer */
  1916. !     register int flags;    /* flags as defined above */
  1917.       register char *p0;    /* saves original value of p when necessary */
  1918.       int nassigned;        /* number of fields assigned */
  1919.       int nread;        /* number of characters consumed from fp */
  1920.       /* Assignments to base and ccfn are just to suppress warnings from gcc.*/
  1921.       int base = 0;        /* base argument to strtol/strtoul */
  1922. !     typedef u_long (*strtoulfn) _PARAMS((const char*, char**, int));
  1923.       strtoulfn ccfn = 0;
  1924.       /* conversion function (strtol/strtoul) */
  1925.       char ccltab[256];    /* character class table for %[...] */
  1926. --- 124,136 ----
  1927.       register _IO_ssize_t width;    /* field width, or 0 */
  1928.       register char *p;    /* points into all kinds of strings */
  1929.       register int n;        /* handy integer */
  1930. !     register int flags = 0;    /* flags as defined above */
  1931.       register char *p0;    /* saves original value of p when necessary */
  1932.       int nassigned;        /* number of fields assigned */
  1933.       int nread;        /* number of characters consumed from fp */
  1934.       /* Assignments to base and ccfn are just to suppress warnings from gcc.*/
  1935.       int base = 0;        /* base argument to strtol/strtoul */
  1936. !     typedef u_long (*strtoulfn) __P((const char*, char**, int));
  1937.       strtoulfn ccfn = 0;
  1938.       /* conversion function (strtol/strtoul) */
  1939.       char ccltab[256];    /* character class table for %[...] */
  1940. ***************
  1941. *** 149,157 ****
  1942.           if (isspace(c)) {
  1943.               for (;;) {
  1944.                       c = _IO_getc(fp);
  1945. !                 if (c == EOF) {
  1946. !                   seen_eof++;
  1947. !                   break;
  1948.                   }
  1949.                   if (!isspace(c)) {
  1950.                       _IO_ungetc (c, fp);
  1951. --- 150,159 ----
  1952.           if (isspace(c)) {
  1953.               for (;;) {
  1954.                       c = _IO_getc(fp);
  1955. !                 if (c == EOF)
  1956. !                 {
  1957. !                    seen_eof++;
  1958. !                    break;
  1959.                   }
  1960.                   if (!isspace(c)) {
  1961.                       _IO_ungetc (c, fp);
  1962. ***************
  1963. *** 184,203 ****
  1964.               continue;
  1965.   
  1966.           case '*':
  1967. !             flags |= SUPPRESS;
  1968.               goto again;
  1969.           case 'l':
  1970.               flags |= LONG;
  1971.               goto again;
  1972.           case 'L':
  1973.               flags |= LONGDBL;
  1974.               goto again;
  1975.           case 'h':
  1976.               flags |= SHORT;
  1977.               goto again;
  1978.   
  1979.           case '0': case '1': case '2': case '3': case '4':
  1980.           case '5': case '6': case '7': case '8': case '9':
  1981.               width = width * 10 + c - '0';
  1982.               goto again;
  1983.   
  1984. --- 186,211 ----
  1985.               continue;
  1986.   
  1987.           case '*':
  1988. !             if (flags) goto control_failure;
  1989. !             flags = SUPPRESS;
  1990.               goto again;
  1991.           case 'l':
  1992. +             if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  1993.               flags |= LONG;
  1994.               goto again;
  1995.           case 'L':
  1996. +             if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  1997.               flags |= LONGDBL;
  1998.               goto again;
  1999.           case 'h':
  2000. +             if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  2001.               flags |= SHORT;
  2002.               goto again;
  2003.   
  2004.           case '0': case '1': case '2': case '3': case '4':
  2005.           case '5': case '6': case '7': case '8': case '9':
  2006. +             if (flags & ~(SUPPRESS | WIDTH)) goto control_failure;
  2007. +             flags |= WIDTH;
  2008.               width = width * 10 + c - '0';
  2009.               goto again;
  2010.   
  2011. ***************
  2012. *** 666,671 ****
  2013. --- 674,680 ----
  2014.       }
  2015.   eof_failure:
  2016.       seen_eof++;
  2017. + control_failure:
  2018.   input_failure:
  2019.       if (nassigned == 0)
  2020.           nassigned = -1;
  2021. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/isgetline.cc libg++-2.5.3linux.2/libio/isgetline.cc
  2022. *** libg++-2.5.3/libio/isgetline.cc    Fri Oct 22 00:54:32 1993
  2023. --- libg++-2.5.3linux.2/libio/isgetline.cc    Tue Feb 22 14:33:30 1994
  2024. ***************
  2025. *** 29,66 ****
  2026.   istream& istream::getline(char* buf, int len, char delim)
  2027.   {
  2028.     _gcount = 0;
  2029.     if (ipfx1())
  2030.       {
  2031.         streambuf *sb = rdbuf();
  2032. !       long count = _IO_getline(sb, buf, len, delim, -1);
  2033. !       if (count == len-1)
  2034. !     set(ios::failbit);
  2035. !       else {
  2036. !     int ch = sb->sbumpc();
  2037. !     if (ch == EOF)
  2038. !       set(ios::failbit|ios::eofbit);
  2039. !     else if (ch == (unsigned char)delim)
  2040. !       count++;
  2041. !     else
  2042.         sb->sungetc(); // Leave delimiter unread.
  2043. !       }
  2044.         _gcount = count;
  2045.       }
  2046.     return *this;
  2047.   }
  2048.   
  2049.   istream& istream::get(char* buf, int len, char delim)
  2050.   {
  2051.     _gcount = 0;
  2052.     if (ipfx1())
  2053.       {
  2054.         streambuf *sbuf = rdbuf();
  2055. !       long count = _IO_getline(sbuf, buf, len, delim, -1);
  2056. !       if (count < 0 || (count == 0 && sbuf->sgetc() == EOF))
  2057.       set(ios::failbit|ios::eofbit);
  2058.         else
  2059.       _gcount = count;
  2060.       }
  2061.     return *this;
  2062.   }
  2063.   
  2064. --- 29,75 ----
  2065.   istream& istream::getline(char* buf, int len, char delim)
  2066.   {
  2067.     _gcount = 0;
  2068. +   if (len <= 0)
  2069. +     {
  2070. +       set(ios::failbit);
  2071. +       return *this;
  2072. +     }
  2073.     if (ipfx1())
  2074.       {
  2075.         streambuf *sb = rdbuf();
  2076. !       _IO_size_t count = _IO_getline(sb, buf, len - 1, delim, -1);
  2077. !       int ch = sb->sbumpc();
  2078. !       if (ch == EOF)
  2079. !     set(ios::failbit|ios::eofbit);
  2080. !       else if (ch != (unsigned char)delim)
  2081. !     {
  2082. !       set(ios::failbit);
  2083.         sb->sungetc(); // Leave delimiter unread.
  2084. !     }
  2085.         _gcount = count;
  2086.       }
  2087. +   buf[_gcount] = '\0';
  2088.     return *this;
  2089.   }
  2090.   
  2091.   istream& istream::get(char* buf, int len, char delim)
  2092.   {
  2093.     _gcount = 0;
  2094. +   if (len <= 0)
  2095. +     {
  2096. +       set(ios::failbit);
  2097. +       return *this;
  2098. +     }
  2099.     if (ipfx1())
  2100.       {
  2101.         streambuf *sbuf = rdbuf();
  2102. !       long count = _IO_getline(sbuf, buf, len - 1, delim, -1);
  2103. !       if (count == 0 && sbuf->sgetc() == EOF)
  2104.       set(ios::failbit|ios::eofbit);
  2105.         else
  2106.       _gcount = count;
  2107.       }
  2108. +   buf[_gcount] = '\0';
  2109.     return *this;
  2110.   }
  2111.   
  2112. ***************
  2113. *** 75,87 ****
  2114.   
  2115.   char *_sb_readline (streambuf *sb, long& total, char terminator) 
  2116.   {
  2117. !     char buf[CHUNK_SIZE+1];
  2118.       char *ptr;
  2119.       int ch;
  2120.       
  2121. !     long count = sb->sgetline(buf, CHUNK_SIZE+1, terminator, -1);
  2122. !     if (count == EOF)
  2123. !     return NULL;
  2124.       ch = sb->sbumpc();
  2125.       long old_total = total;
  2126.       total += count;
  2127. --- 84,94 ----
  2128.   
  2129.   char *_sb_readline (streambuf *sb, long& total, char terminator) 
  2130.   {
  2131. !     char buf[CHUNK_SIZE];
  2132.       char *ptr;
  2133.       int ch;
  2134.       
  2135. !     _IO_size_t count = _IO_getline(sb, buf, CHUNK_SIZE, terminator, -1);
  2136.       ch = sb->sbumpc();
  2137.       long old_total = total;
  2138.       total += count;
  2139. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/libio.h libg++-2.5.3linux.2/libio/libio.h
  2140. *** libg++-2.5.3/libio/libio.h    Fri Nov 26 17:05:49 1993
  2141. --- libg++-2.5.3linux.2/libio/libio.h    Tue Feb 22 14:38:26 1994
  2142. ***************
  2143. *** 39,45 ****
  2144. --- 39,47 ----
  2145.   #define _IO_ssize_t _G_ssize_t
  2146.   #define _IO_off_t _G_off_t
  2147.   #define _IO_pid_t _G_pid_t
  2148. + #define _IO_uid_t _G_uid_t
  2149.   #define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT
  2150. + #define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
  2151.   #define _IO_BUFSIZ _G_BUFSIZ
  2152.   #define _IO_va_list _G_va_list
  2153.   
  2154. ***************
  2155. *** 58,73 ****
  2156.   typedef _IO_fpos_t _IO_pos_t;
  2157.   #endif
  2158.   
  2159. ! #ifndef _PARAMS
  2160. ! #ifdef __STDC__
  2161. ! #define _PARAMS(paramlist) paramlist
  2162. ! #else
  2163. ! #define _PARAMS(paramlist) ()
  2164. ! #endif
  2165. ! #endif /*!_PARAMS*/
  2166. ! #ifndef __STDC__
  2167. ! #define const
  2168. ! #endif
  2169.   #define USE_DTOA
  2170.   
  2171.   #if 0
  2172. --- 60,67 ----
  2173.   typedef _IO_fpos_t _IO_pos_t;
  2174.   #endif
  2175.   
  2176. ! #include <sys/cdefs.h>
  2177.   #define USE_DTOA
  2178.   
  2179.   #if 0
  2180. ***************
  2181. *** 213,219 ****
  2182.   
  2183.   struct _IO_FILE_plus {
  2184.     _IO_FILE _file;
  2185. !   const void *_vtable;
  2186.   };
  2187.   
  2188.   extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_;
  2189. --- 207,213 ----
  2190.   
  2191.   struct _IO_FILE_plus {
  2192.     _IO_FILE _file;
  2193. !   __const void *_vtable;
  2194.   };
  2195.   
  2196.   extern struct _IO_FILE_plus _IO_stdin_, _IO_stdout_, _IO_stderr_;
  2197. ***************
  2198. *** 225,234 ****
  2199.   extern "C" {
  2200.   #endif
  2201.   
  2202. ! extern int __underflow _PARAMS((_IO_FILE*));
  2203. ! extern int __overflow _PARAMS((_IO_FILE*, int));
  2204.   
  2205. ! extern unsigned __adjust_column _PARAMS((unsigned start, const char *line, int count));
  2206.   
  2207.   #define _IO_getc(_fp) \
  2208.          ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end \
  2209. --- 219,228 ----
  2210.   extern "C" {
  2211.   #endif
  2212.   
  2213. ! extern int __underflow __P((_IO_FILE*));
  2214. ! extern int __overflow __P((_IO_FILE*, int));
  2215.   
  2216. ! extern unsigned __adjust_column __P((unsigned start, __const char *line, int count));
  2217.   
  2218.   #define _IO_getc(_fp) \
  2219.          ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end \
  2220. ***************
  2221. *** 241,255 ****
  2222.   
  2223.   #define _IO_putc(_ch, _fp) \
  2224.      (((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \
  2225. !     ? __overflow(_fp, (unsigned char)_ch) \
  2226. !     : (unsigned char)(*(_fp)->_IO_write_ptr++ = _ch))
  2227.   
  2228. ! extern int _IO_vfscanf _PARAMS((_IO_FILE*, const char*, _IO_va_list, int*));
  2229. ! extern int _IO_vfprintf _PARAMS((_IO_FILE*, const char*, _IO_va_list));
  2230. ! extern _IO_ssize_t _IO_padn _PARAMS((_IO_FILE *, int, _IO_ssize_t));
  2231. ! extern _IO_size_t _IO_sgetn _PARAMS((_IO_FILE *, void*, _IO_size_t));
  2232.   
  2233. ! extern void _IO_free_backup_area _PARAMS((_IO_FILE*));
  2234.   
  2235.   #ifdef __cplusplus
  2236.   }
  2237. --- 235,253 ----
  2238.   
  2239.   #define _IO_putc(_ch, _fp) \
  2240.      (((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \
  2241. !     ? __overflow(_fp, (unsigned char)(_ch)) \
  2242. !     : (unsigned char)(*(_fp)->_IO_write_ptr++ = (_ch)))
  2243.   
  2244. ! /* This one is for Emacs. */
  2245. ! #define _IO_PENDING_OUTPUT_COUNT(_fp)    \
  2246. !     ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base)
  2247. ! extern int _IO_vfscanf __P((_IO_FILE*, __const char*, _IO_va_list, int*));
  2248. ! extern int _IO_vfprintf __P((_IO_FILE*, __const char*, _IO_va_list));
  2249. ! extern _IO_ssize_t _IO_padn __P((_IO_FILE *, int, _IO_ssize_t));
  2250. ! extern _IO_size_t _IO_sgetn __P((_IO_FILE *, void*, _IO_size_t));
  2251.   
  2252. ! extern void _IO_free_backup_area __P((_IO_FILE*));
  2253.   
  2254.   #ifdef __cplusplus
  2255.   }
  2256. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/libioP.h libg++-2.5.3linux.2/libio/libioP.h
  2257. *** libg++-2.5.3/libio/libioP.h    Wed Dec 22 06:40:01 1993
  2258. --- libg++-2.5.3linux.2/libio/libioP.h    Sun Feb 13 22:03:08 1994
  2259. ***************
  2260. *** 29,34 ****
  2261. --- 29,44 ----
  2262.   
  2263.   #include "iolibio.h"
  2264.   
  2265. + /* Include those system dependent file. */
  2266. + #ifdef _LIBIO_CONFIG_H
  2267. + #include _LIBIO_CONFIG_H
  2268. + #endif
  2269. + #ifdef __STDC__
  2270. + #include <stdlib.h>
  2271. + #endif
  2272.   #ifdef __cplusplus
  2273.   extern "C" {
  2274.   #endif
  2275. ***************
  2276. *** 42,68 ****
  2277.        read and write positions. */
  2278.     _IO_seek_not_in = 4,    /* Don't move read posistion. */
  2279.     _IO_seek_not_out = 8,    /* Don't move write posistion. */
  2280. !   _IO_seek_pos_ignored = 16 /* Result is ignored (except EOF) */
  2281.   } _IO_seekflags;
  2282.   
  2283. ! typedef int (*_IO_overflow_t) _PARAMS((_IO_FILE*, int));
  2284. ! typedef int (*_IO_underflow_t) _PARAMS((_IO_FILE*));
  2285. ! typedef _IO_size_t (*_IO_xsputn_t) _PARAMS((_IO_FILE*,const void*,_IO_size_t));
  2286. ! typedef _IO_size_t (*_IO_xsgetn_t) _PARAMS((_IO_FILE*, void*, _IO_size_t));
  2287. ! typedef _IO_ssize_t (*_IO_read_t) _PARAMS((_IO_FILE*, void*, _IO_ssize_t));
  2288. ! typedef _IO_ssize_t (*_IO_write_t) _PARAMS((_IO_FILE*,const void*,_IO_ssize_t));
  2289. ! typedef int (*_IO_stat_t) _PARAMS((_IO_FILE*, void*));
  2290. ! typedef _IO_fpos_t (*_IO_seek_t) _PARAMS((_IO_FILE*, _IO_off_t, int));
  2291. ! typedef int (*_IO_doallocate_t) _PARAMS((_IO_FILE*));
  2292. ! typedef int (*_IO_pbackfail_t) _PARAMS((_IO_FILE*, int));
  2293. ! typedef int (*_IO_setbuf_t) _PARAMS((_IO_FILE*, char *, _IO_ssize_t));
  2294. ! typedef int (*_IO_sync_t) _PARAMS((_IO_FILE*));
  2295. ! typedef void (*_IO_finish_t) _PARAMS((_IO_FILE*)); /* finalize */
  2296. ! typedef int (*_IO_close_t) _PARAMS((_IO_FILE*)); /* finalize */
  2297. ! typedef _IO_fpos_t (*_IO_seekoff_t) _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2298.   
  2299.   /* The _IO_seek_cur and _IO_seek_end options are not allowed. */
  2300. ! typedef _IO_fpos_t (*_IO_seekpos_t) _PARAMS((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  2301.   
  2302.   struct _IO_jump_t {
  2303.       _IO_overflow_t __overflow;
  2304. --- 52,78 ----
  2305.        read and write positions. */
  2306.     _IO_seek_not_in = 4,    /* Don't move read posistion. */
  2307.     _IO_seek_not_out = 8,    /* Don't move write posistion. */
  2308. !   _IO_seek_pos_ignored = 16, /* Result is ignored (except EOF) */
  2309.   } _IO_seekflags;
  2310.   
  2311. ! typedef int (*_IO_overflow_t) __P((_IO_FILE*, int));
  2312. ! typedef int (*_IO_underflow_t) __P((_IO_FILE*));
  2313. ! typedef _IO_size_t (*_IO_xsputn_t) __P((_IO_FILE*,const void*,_IO_size_t));
  2314. ! typedef _IO_size_t (*_IO_xsgetn_t) __P((_IO_FILE*, void*, _IO_size_t));
  2315. ! typedef _IO_ssize_t (*_IO_read_t) __P((_IO_FILE*, void*, _IO_ssize_t));
  2316. ! typedef _IO_ssize_t (*_IO_write_t) __P((_IO_FILE*,const void*,_IO_ssize_t));
  2317. ! typedef int (*_IO_stat_t) __P((_IO_FILE*, void*));
  2318. ! typedef _IO_fpos_t (*_IO_seek_t) __P((_IO_FILE*, _IO_off_t, int));
  2319. ! typedef int (*_IO_doallocate_t) __P((_IO_FILE*));
  2320. ! typedef int (*_IO_pbackfail_t) __P((_IO_FILE*, int));
  2321. ! typedef int (*_IO_setbuf_t) __P((_IO_FILE*, char *, _IO_ssize_t));
  2322. ! typedef int (*_IO_sync_t) __P((_IO_FILE*));
  2323. ! typedef void (*_IO_finish_t) __P((_IO_FILE*)); /* finalize */
  2324. ! typedef int (*_IO_close_t) __P((_IO_FILE*)); /* finalize */
  2325. ! typedef _IO_fpos_t (*_IO_seekoff_t) __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2326.   
  2327.   /* The _IO_seek_cur and _IO_seek_end options are not allowed. */
  2328. ! typedef _IO_fpos_t (*_IO_seekpos_t) __P((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  2329.   
  2330.   struct _IO_jump_t {
  2331.       _IO_overflow_t __overflow;
  2332. ***************
  2333. *** 89,141 ****
  2334.   
  2335.   /* Generic functions */
  2336.   
  2337. ! extern _IO_fpos_t _IO_seekoff _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2338. ! extern _IO_fpos_t _IO_seekpos _PARAMS((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  2339.   
  2340. ! extern int _IO_switch_to_get_mode _PARAMS((_IO_FILE*));
  2341. ! extern void _IO_init _PARAMS((_IO_FILE*, int));
  2342. ! extern int _IO_sputbackc _PARAMS((_IO_FILE*, int));
  2343. ! extern int _IO_sungetc _PARAMS((_IO_FILE*));
  2344. ! extern void _IO_un_link _PARAMS((_IO_FILE*));
  2345. ! extern void _IO_link_in _PARAMS((_IO_FILE *));
  2346. ! extern void _IO_doallocbuf _PARAMS((_IO_FILE*));
  2347. ! extern void _IO_unsave_markers _PARAMS((_IO_FILE*));
  2348. ! extern void _IO_setb _PARAMS((_IO_FILE*, char*, char*, int));
  2349. ! extern unsigned _IO_adjust_column _PARAMS((unsigned, const char *, int));
  2350.   #define _IO_sputn(__fp, __s, __n) (__fp->_jumps->__xsputn(__fp, __s, __n))
  2351.   
  2352.   /* Marker-related function. */
  2353.   
  2354. ! extern void _IO_init_marker _PARAMS((struct _IO_marker *, _IO_FILE *));
  2355. ! extern void _IO_remove_marker _PARAMS((struct _IO_marker*));
  2356. ! extern int _IO_marker_difference _PARAMS((struct _IO_marker *, struct _IO_marker *));
  2357. ! extern int _IO_marker_delta _PARAMS((struct _IO_marker *));
  2358. ! extern int _IO_seekmark _PARAMS((_IO_FILE *, struct _IO_marker *, int));
  2359.   
  2360.   /* Default jumptable functions. */
  2361.   
  2362. ! extern int _IO_default_underflow _PARAMS((_IO_FILE*));
  2363. ! extern int _IO_default_doallocate _PARAMS((_IO_FILE*));
  2364. ! extern void _IO_default_finish _PARAMS((_IO_FILE *));
  2365. ! extern int _IO_default_pbackfail _PARAMS((_IO_FILE*, int));
  2366. ! extern int _IO_default_setbuf _PARAMS((_IO_FILE *, char*, _IO_ssize_t));
  2367. ! extern _IO_size_t _IO_default_xsputn _PARAMS((_IO_FILE *, const void*, _IO_size_t));
  2368. ! extern _IO_size_t _IO_default_xsgetn _PARAMS((_IO_FILE *, void*, _IO_size_t));
  2369. ! extern _IO_fpos_t _IO_default_seekoff _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2370. ! extern _IO_fpos_t _IO_default_seekpos _PARAMS((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  2371. ! extern _IO_ssize_t _IO_default_write _PARAMS((_IO_FILE*,const void*,_IO_ssize_t));
  2372. ! extern _IO_ssize_t _IO_default_read _PARAMS((_IO_FILE*, void*, _IO_ssize_t));
  2373. ! extern int _IO_default_stat _PARAMS((_IO_FILE*, void*));
  2374. ! extern _IO_fpos_t _IO_default_seek _PARAMS((_IO_FILE*, _IO_off_t, int));
  2375. ! extern int _IO_default_sync _PARAMS((_IO_FILE*));
  2376.   #define _IO_default_close ((_IO_close_t)_IO_default_sync)
  2377.   
  2378.   extern struct _IO_jump_t _IO_file_jumps;
  2379.   extern struct _IO_jump_t _IO_proc_jumps;
  2380.   extern struct _IO_jump_t _IO_str_jumps;
  2381. ! extern int _IO_do_write _PARAMS((_IO_FILE*, const char*, _IO_size_t));
  2382. ! extern int _IO_flush_all _PARAMS(());
  2383. ! extern void _IO_flush_all_linebuffered _PARAMS(());
  2384.   
  2385.   #define _IO_do_flush(_f) \
  2386.     _IO_do_write(_f, _f->_IO_write_base, _f->_IO_write_ptr-_f->_IO_write_base)
  2387. --- 99,160 ----
  2388.   
  2389.   /* Generic functions */
  2390.   
  2391. ! extern _IO_fpos_t _IO_seekoff __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2392. ! extern _IO_fpos_t _IO_seekpos __P((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  2393.   
  2394. ! extern int _IO_switch_to_get_mode __P((_IO_FILE*));
  2395. ! extern void _IO_init __P((_IO_FILE*, int));
  2396. ! extern int _IO_sputbackc __P((_IO_FILE*, int));
  2397. ! extern int _IO_sungetc __P((_IO_FILE*));
  2398. ! extern void _IO_un_link __P((_IO_FILE*));
  2399. ! extern void _IO_link_in __P((_IO_FILE *));
  2400. ! extern void _IO_doallocbuf __P((_IO_FILE*));
  2401. ! extern void _IO_unsave_markers __P((_IO_FILE*));
  2402. ! extern void _IO_setb __P((_IO_FILE*, char*, char*, int));
  2403. ! extern unsigned _IO_adjust_column __P((unsigned, const char *, int));
  2404.   #define _IO_sputn(__fp, __s, __n) (__fp->_jumps->__xsputn(__fp, __s, __n))
  2405.   
  2406. + extern int _IO_ignore __P((_IO_FILE *, _IO_size_t));
  2407. + extern void _IO_switch_to_main_get_area __P((_IO_FILE *));
  2408. + extern void _IO_switch_to_backup_area  __P((_IO_FILE *));
  2409. + extern int _IO_sync __P((_IO_FILE *));
  2410. + extern int _IO_get_column __P((_IO_FILE *));
  2411. + extern int _IO_set_column __P((_IO_FILE *, int));
  2412. + extern int _IO_nobackup_pbackfail __P((_IO_FILE *, int));
  2413.   /* Marker-related function. */
  2414.   
  2415. ! extern void _IO_init_marker __P((struct _IO_marker *, _IO_FILE *));
  2416. ! extern void _IO_remove_marker __P((struct _IO_marker*));
  2417. ! extern int _IO_marker_difference __P((struct _IO_marker *, struct _IO_marker *));
  2418. ! extern int _IO_marker_delta __P((struct _IO_marker *));
  2419. ! extern int _IO_seekmark __P((_IO_FILE *, struct _IO_marker *, int));
  2420. ! extern _IO_size_t _IO_least_marker __P((_IO_FILE *));
  2421.   
  2422.   /* Default jumptable functions. */
  2423.   
  2424. ! extern int _IO_default_underflow __P((_IO_FILE*));
  2425. ! extern int _IO_default_doallocate __P((_IO_FILE*));
  2426. ! extern void _IO_default_finish __P((_IO_FILE *));
  2427. ! extern int _IO_default_pbackfail __P((_IO_FILE*, int));
  2428. ! extern int _IO_default_setbuf __P((_IO_FILE *, char*, _IO_ssize_t));
  2429. ! extern _IO_size_t _IO_default_xsputn __P((_IO_FILE *, const void*, _IO_size_t));
  2430. ! extern _IO_size_t _IO_default_xsgetn __P((_IO_FILE *, void*, _IO_size_t));
  2431. ! extern _IO_fpos_t _IO_default_seekoff __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2432. ! extern _IO_fpos_t _IO_default_seekpos __P((_IO_FILE*, _IO_fpos_t, _IO_seekflags));
  2433. ! extern _IO_ssize_t _IO_default_write __P((_IO_FILE*,const void*,_IO_ssize_t));
  2434. ! extern _IO_ssize_t _IO_default_read __P((_IO_FILE*, void*, _IO_ssize_t));
  2435. ! extern int _IO_default_stat __P((_IO_FILE*, void*));
  2436. ! extern _IO_fpos_t _IO_default_seek __P((_IO_FILE*, _IO_off_t, int));
  2437. ! extern int _IO_default_sync __P((_IO_FILE*));
  2438.   #define _IO_default_close ((_IO_close_t)_IO_default_sync)
  2439.   
  2440.   extern struct _IO_jump_t _IO_file_jumps;
  2441.   extern struct _IO_jump_t _IO_proc_jumps;
  2442.   extern struct _IO_jump_t _IO_str_jumps;
  2443. ! extern int _IO_do_write __P((_IO_FILE*, const char*, _IO_size_t));
  2444. ! extern int _IO_flush_all __P((void));
  2445. ! extern void _IO_flush_all_linebuffered __P((void));
  2446.   
  2447.   #define _IO_do_flush(_f) \
  2448.     _IO_do_write(_f, _f->_IO_write_base, _f->_IO_write_ptr-_f->_IO_write_base)
  2449. ***************
  2450. *** 153,205 ****
  2451.   
  2452.   /* Jumptable functions for files. */
  2453.   
  2454. ! extern int _IO_file_doallocate _PARAMS((_IO_FILE*));
  2455. ! extern int _IO_file_setbuf _PARAMS((_IO_FILE *, char*, _IO_ssize_t));
  2456. ! extern _IO_fpos_t _IO_file_seekoff _PARAMS((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2457. ! extern _IO_size_t _IO_file_xsputn _PARAMS((_IO_FILE*,const void*,_IO_size_t));
  2458. ! extern int _IO_file_stat _PARAMS((_IO_FILE*, void*));
  2459. ! extern int _IO_file_close _PARAMS((_IO_FILE*));
  2460. ! extern int _IO_file_underflow _PARAMS((_IO_FILE *));
  2461. ! extern int _IO_file_overflow _PARAMS((_IO_FILE *, int));
  2462.   #define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0)
  2463. ! extern void _IO_file_init _PARAMS((_IO_FILE*));
  2464. ! extern _IO_FILE* _IO_file_attach _PARAMS((_IO_FILE*, int));
  2465. ! extern _IO_FILE* _IO_file_fopen _PARAMS((_IO_FILE*, const char*, const char*));
  2466. ! extern _IO_ssize_t _IO_file_write _PARAMS((_IO_FILE*,const void*,_IO_ssize_t));
  2467. ! extern _IO_ssize_t _IO_file_read _PARAMS((_IO_FILE*, void*, _IO_ssize_t));
  2468. ! extern int _IO_file_sync _PARAMS((_IO_FILE*));
  2469. ! extern int _IO_file_close_it _PARAMS((_IO_FILE*));
  2470. ! extern _IO_fpos_t _IO_file_seek _PARAMS((_IO_FILE *, _IO_off_t, int));
  2471. ! extern void _IO_file_finish _PARAMS((_IO_FILE*));
  2472.   
  2473.   /* Other file functions. */
  2474. ! extern _IO_FILE* _IO_file_attach _PARAMS((_IO_FILE *, int));
  2475.   
  2476.   /* Jumptable functions for proc_files. */
  2477. ! extern _IO_FILE* _IO_proc_open _PARAMS((_IO_FILE*, const char*, const char *));
  2478. ! extern int _IO_proc_close _PARAMS((_IO_FILE*));
  2479.   
  2480.   /* Jumptable functions for strfiles. */
  2481. ! extern int _IO_str_underflow _PARAMS((_IO_FILE*));
  2482. ! extern int _IO_str_overflow _PARAMS((_IO_FILE *, int));
  2483. ! extern int _IO_str_pbackfail _PARAMS((_IO_FILE*, int));
  2484. ! extern _IO_fpos_t _IO_str_seekoff _PARAMS((_IO_FILE*,_IO_off_t,_IO_seekflags));
  2485.   
  2486.   /* Other strfile functions */
  2487. ! extern void _IO_str_init_static _PARAMS((_IO_FILE *, char*, int, char*));
  2488. ! extern void _IO_str_init_readonly _PARAMS((_IO_FILE *, const char*, int));
  2489. ! extern _IO_ssize_t _IO_str_count _PARAMS ((_IO_FILE*));
  2490. ! extern _IO_size_t _IO_getline _PARAMS((_IO_FILE*,char*,_IO_size_t,int,int));
  2491. ! extern double _IO_strtod _PARAMS((const char *, char **));
  2492. ! extern char * _IO_dtoa _PARAMS((double __d, int __mode, int __ndigits,
  2493.                   int *__decpt, int *__sign, char **__rve));
  2494. ! extern int _IO_outfloat _PARAMS((double __value, _IO_FILE *__sb, int __type,
  2495.                    int __width, int __precision, int __flags,
  2496.                    int __sign_mode, int __fill));
  2497.   
  2498.   extern _IO_FILE *_IO_list_all;
  2499.   extern void (*_IO_cleanup_registration_needed)();
  2500.   
  2501.   #ifndef EOF
  2502.   #define EOF (-1)
  2503. --- 172,232 ----
  2504.   
  2505.   /* Jumptable functions for files. */
  2506.   
  2507. ! extern int _IO_file_doallocate __P((_IO_FILE*));
  2508. ! extern int _IO_file_setbuf __P((_IO_FILE *, char*, _IO_ssize_t));
  2509. ! extern _IO_fpos_t _IO_file_seekoff __P((_IO_FILE*, _IO_off_t, _IO_seekflags));
  2510. ! extern _IO_size_t _IO_file_xsputn __P((_IO_FILE*,const void*,_IO_size_t));
  2511. ! extern int _IO_file_stat __P((_IO_FILE*, void*));
  2512. ! extern int _IO_file_close __P((_IO_FILE*));
  2513. ! extern int _IO_file_underflow __P((_IO_FILE *));
  2514. ! extern int _IO_file_overflow __P((_IO_FILE *, int));
  2515.   #define _IO_file_is_open(__fp) ((__fp)->_fileno >= 0)
  2516. ! extern void _IO_file_init __P((_IO_FILE*));
  2517. ! extern _IO_FILE* _IO_file_attach __P((_IO_FILE*, int));
  2518. ! extern _IO_FILE* _IO_file_fopen __P((_IO_FILE*, const char*, const char*));
  2519. ! extern _IO_ssize_t _IO_file_write __P((_IO_FILE*,const void*,_IO_ssize_t));
  2520. ! extern _IO_ssize_t _IO_file_read __P((_IO_FILE*, void*, _IO_ssize_t));
  2521. ! extern int _IO_file_sync __P((_IO_FILE*));
  2522. ! extern int _IO_file_close_it __P((_IO_FILE*));
  2523. ! extern _IO_fpos_t _IO_file_seek __P((_IO_FILE *, _IO_off_t, int));
  2524. ! extern void _IO_file_finish __P((_IO_FILE*));
  2525.   
  2526.   /* Other file functions. */
  2527. ! extern _IO_FILE* _IO_file_attach __P((_IO_FILE *, int));
  2528.   
  2529.   /* Jumptable functions for proc_files. */
  2530. ! extern _IO_FILE* _IO_proc_open __P((_IO_FILE*, const char*, const char *));
  2531. ! extern int _IO_proc_close __P((_IO_FILE*));
  2532.   
  2533.   /* Jumptable functions for strfiles. */
  2534. ! extern int _IO_str_underflow __P((_IO_FILE*));
  2535. ! extern int _IO_str_overflow __P((_IO_FILE *, int));
  2536. ! extern int _IO_str_pbackfail __P((_IO_FILE*, int));
  2537. ! extern _IO_fpos_t _IO_str_seekoff __P((_IO_FILE*,_IO_off_t,_IO_seekflags));
  2538.   
  2539.   /* Other strfile functions */
  2540. ! extern void _IO_str_init_static __P((_IO_FILE *, char*, int, char*));
  2541. ! extern void _IO_str_init_readonly __P((_IO_FILE *, const char*, int));
  2542. ! extern _IO_ssize_t _IO_str_count __P ((_IO_FILE*));
  2543. ! extern void _IO_str_finish __P((_IO_FILE *));
  2544. ! extern _IO_size_t _IO_getline __P((_IO_FILE*,char*,_IO_size_t,int,int));
  2545. ! extern double _IO_strtod __P((const char *, char **));
  2546. ! extern char * _IO_dtoa __P((double __d, int __mode, int __ndigits,
  2547.                   int *__decpt, int *__sign, char **__rve));
  2548. ! extern int _IO_outfloat __P((double __value, _IO_FILE *__sb, int __type,
  2549.                    int __width, int __precision, int __flags,
  2550.                    int __sign_mode, int __fill));
  2551.   
  2552. + extern char *_IO_gen_tempname __P ((const char *__dir,
  2553. +                  const char *__pfx, int __dir_search,
  2554. +                  _IO_size_t * __lenptr,
  2555. +                  _IO_FILE **__streamptr));
  2556. +  
  2557.   extern _IO_FILE *_IO_list_all;
  2558. + #ifndef __linux__
  2559.   extern void (*_IO_cleanup_registration_needed)();
  2560. + #endif
  2561.   
  2562.   #ifndef EOF
  2563.   #define EOF (-1)
  2564. ***************
  2565. *** 219,229 ****
  2566.   #define OS_FSTAT fstat
  2567.   #endif
  2568.   struct stat;
  2569. ! extern _IO_ssize_t _IO_read _PARAMS((int, void*, _IO_size_t));
  2570. ! extern _IO_ssize_t _IO_write _PARAMS((int, const void*, _IO_size_t));
  2571. ! extern _IO_off_t _IO_lseek _PARAMS((int, _IO_off_t, int));
  2572. ! extern int _IO_close _PARAMS((int));
  2573. ! extern int _IO_fstat _PARAMS((int, struct stat *));
  2574.   
  2575.   /* Operations on _IO_fpos_t.
  2576.      Normally, these are trivial, but we provide hooks for configurations
  2577. --- 246,256 ----
  2578.   #define OS_FSTAT fstat
  2579.   #endif
  2580.   struct stat;
  2581. ! extern _IO_ssize_t _IO_read __P((int, void*, _IO_size_t));
  2582. ! extern _IO_ssize_t _IO_write __P((int, const void*, _IO_size_t));
  2583. ! extern _IO_off_t _IO_lseek __P((int, _IO_off_t, int));
  2584. ! extern int _IO_close __P((int));
  2585. ! extern int _IO_fstat __P((int, struct stat *));
  2586.   
  2587.   /* Operations on _IO_fpos_t.
  2588.      Normally, these are trivial, but we provide hooks for configurations
  2589. ***************
  2590. *** 257,262 ****
  2591. --- 284,320 ----
  2592.   #define _IO_va_start(args, last) va_start(args)
  2593.   #endif
  2594.   
  2595. + /* Just do a sanity check. We assume no one uses old stdio. It
  2596. +  * won't work all the time.
  2597. +  */
  2598. + #if 1
  2599. + #ifdef EIO
  2600. + #define CHECK_FILE(FILE,RET) \
  2601. +     if ((FILE) == NULL || \
  2602. +         ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC) \
  2603. +     { errno = EIO; return RET; }
  2604. + #else
  2605. + #define CHECK_FILE(FILE,RET) \
  2606. +     if ((FILE) == NULL || \
  2607. +         ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC) \
  2608. +     { return RET; }
  2609. + #endif
  2610. + #else
  2611. + #ifdef EIO
  2612. + #define CHECK_FILE(FILE,RET) \
  2613. +     if ((FILE) == NULL || ( \
  2614. +         ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC \
  2615. +         && ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _OLD_IO_MAGIC)) \
  2616. +     { errno = EIO; return RET; }
  2617. + #else
  2618. + #define CHECK_FILE(FILE,RET) \
  2619. +     if ((FILE) == NULL || ( \
  2620. +         ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC \
  2621. +         && ((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _OLD_IO_MAGIC)) \
  2622. +     { return RET; }
  2623. + #endif
  2624. + #endif
  2625.   #if 1
  2626.   #define COERCE_FILE(FILE) /* Nothing */
  2627.   #else
  2628. ***************
  2629. *** 265,267 ****
  2630. --- 323,328 ----
  2631.     (((FILE)->_IO_file_flags & _IO_MAGIC_MASK) == _OLD_MAGIC_MASK \
  2632.       && (FILE) = *(FILE**)&((int*)fp)[1])
  2633.   #endif
  2634. + #define CLOSED_FILEBUF_FLAGS \
  2635. +   (_IO_IS_FILEBUF+_IO_NO_READS+_IO_NO_WRITES+_IO_TIED_PUT_GET)
  2636. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/procbuf.h libg++-2.5.3linux.2/libio/procbuf.h
  2637. *** libg++-2.5.3/libio/procbuf.h    Fri Oct 22 00:54:38 1993
  2638. --- libg++-2.5.3linux.2/libio/procbuf.h    Mon Dec 20 08:54:32 1993
  2639. ***************
  2640. *** 29,34 ****
  2641. --- 29,35 ----
  2642.   class procbuf : public filebuf {
  2643.       /* Following fields must match those in struct _IO_proc_file */
  2644.       _IO_pid_t _pid;
  2645. +     struct _IO_proc_file *_next;
  2646.     public:
  2647.       procbuf() : filebuf() { }
  2648.       procbuf(const char *command, int mode);
  2649. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/ChangeLog libg++-2.5.3linux.2/libio/stdio/ChangeLog
  2650. *** libg++-2.5.3/libio/stdio/ChangeLog    Fri Nov 26 21:48:20 1993
  2651. --- libg++-2.5.3linux.2/libio/stdio/ChangeLog    Mon Feb 14 10:09:18 1994
  2652. ***************
  2653. *** 1,3 ****
  2654. --- 1,66 ----
  2655. + Sat Jan  1 21:13:59 1994  H.J. Lu (hlu@nighthawk)
  2656. +     * clearerr.c:
  2657. +     * feof.c:
  2658. +     * ferror.c:
  2659. +     * fgetc.c:
  2660. +     * fileno.c:
  2661. +     * fputc.c:
  2662. +     * freopen.c:
  2663. +     * fseek.c:
  2664. +     * getw.c:
  2665. +     * putw.c:
  2666. +     * rewind.c:
  2667. +     * setfileno.c:
  2668. +     * vfprintf.c:
  2669. +     * vfscanf.c: check fp with CHECK_FILE(FILE,RET).
  2670. + Sun Dec 19 12:36:10 1993  H.J. Lu (hlu@nighthawk)
  2671. +         * stdio.h: don't define __P since it is taken care of
  2672. +       in libio.h. change const to __const.
  2673. +            
  2674. + Thu Dec  2 22:25:31 1993  H.J. Lu (hlu@nighthawk)
  2675. +     * Makefile.in (STDIO_OBJECTS): add stdio.o, remove.o, tmpfile.o
  2676. +       and tmpnam.o.  change popen.o to pclose.o.
  2677. +     * stdio.h: include <features.h> if __linux__ is defined.
  2678. +       <features.h> should be copied from glibc to help put libio
  2679. +       into glibc.
  2680. +       change _ARGS to __P.
  2681. +       check if __P is already defined.
  2682. +       declare psignal (), _sys_errlist, _sys_siglist if
  2683. +       __GNU_LIBRARY__ is defined.
  2684. +       add getw () and putw ().
  2685. +       (getc, getchar, putc, putchar): new declaration. move macros after
  2686. +       the declaration.
  2687. +       (tempnam): new declaration.
  2688. +       define TMP_MAX as 238328. see ../iotempname.c.
  2689. +     * popen.c: removed.
  2690. +     * pclose.c: renamed from popen.c.
  2691. +     * stdio.c: new file for stdin, stdout and stderr.
  2692. +     * vfprintf.c:
  2693. +     * fdopen.c: add alias for Linux.
  2694. +     * remove.c: new file for remove ().
  2695. +     * tempnam.c: new file for tempnam ().
  2696. +     * tmpfile.c: new file for tmpfile ().
  2697. +     * tmpnam.c: new file for tmpnam ().
  2698. +     * configure.in: Linux uses aliases instead of
  2699. +       -D_IO_foo=foo. Move #define _HAVE_GNU_LD to the
  2700. +       first line.
  2701. +       remove the TODO list. rename () should be a system call.
  2702. +       (stdio_renames): add popen if __linux__ is defined.
  2703.   Fri Nov 26 13:26:35 1993  Per Bothner  (bothner@kalessin.cygnus.com)
  2704.   
  2705.       Bunch of little changes, many from H.J. Lu <hjl@nynexst.com>.
  2706. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/Makefile.in libg++-2.5.3linux.2/libio/stdio/Makefile.in
  2707. *** libg++-2.5.3/libio/stdio/Makefile.in    Fri Nov 26 21:48:21 1993
  2708. --- libg++-2.5.3linux.2/libio/stdio/Makefile.in    Mon Dec 20 08:54:32 1993
  2709. ***************
  2710. *** 9,17 ****
  2711.   STDIO_OBJECTS = $(STDIO_RENAMED_OBJECTS) \
  2712.     clearerr.o fdopen.o feof.o ferror.o fgetc.o fileno.o \
  2713.     fputc.o freopen.o fseek.o getc.o getchar.o getw.o \
  2714. !   popen.o putc.o putchar.o putw.o rewind.o \
  2715.     setbuf.c setfileno.o setlinebuf.o \
  2716. !   vfprintf.o vfscanf.o vprintf.o vscanf.o
  2717.   
  2718.   CC_FOR_STDIO=$(CC)
  2719.   CINCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
  2720. --- 9,18 ----
  2721.   STDIO_OBJECTS = $(STDIO_RENAMED_OBJECTS) \
  2722.     clearerr.o fdopen.o feof.o ferror.o fgetc.o fileno.o \
  2723.     fputc.o freopen.o fseek.o getc.o getchar.o getw.o \
  2724. !   pclose.o putc.o putchar.o putw.o rewind.o \
  2725.     setbuf.c setfileno.o setlinebuf.o \
  2726. !   vfprintf.o vfscanf.o vprintf.o vscanf.o \
  2727. !   remove.o tmpfile.o tmpnam.o stdio.o
  2728.   
  2729.   CC_FOR_STDIO=$(CC)
  2730.   CINCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/..
  2731. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/clearerr.c libg++-2.5.3linux.2/libio/stdio/clearerr.c
  2732. *** libg++-2.5.3/libio/stdio/clearerr.c    Mon Oct  4 20:39:42 1993
  2733. --- libg++-2.5.3linux.2/libio/stdio/clearerr.c    Tue Jan 18 11:20:58 1994
  2734. ***************
  2735. *** 5,10 ****
  2736. --- 5,11 ----
  2737.   clearerr(fp)
  2738.        FILE* fp;
  2739.   {
  2740. +   CHECK_FILE(fp, );
  2741.     COERCE_FILE(fp);
  2742.     _IO_clearerr(fp);
  2743.   }
  2744. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/configure.in libg++-2.5.3linux.2/libio/stdio/configure.in
  2745. *** libg++-2.5.3/libio/stdio/configure.in    Thu Oct 14 19:13:08 1993
  2746. --- libg++-2.5.3linux.2/libio/stdio/configure.in    Mon Dec 20 08:54:33 1993
  2747. ***************
  2748. *** 24,43 ****
  2749.   # NOTE: We assume a C compiler that where -o with -c works.
  2750.   # But these files are not built by default anyway ...
  2751.   
  2752. - # TODO: remove rename tmpfile tmpnam
  2753.   stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
  2754.     fscanf fsetpos ftell fwrite gets perror printf puts \
  2755.     scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
  2756.   stdio_objects=""
  2757.   
  2758. ! for file in $stdio_renames ; do
  2759. !   cat >>Makefile <<EOF
  2760.   $file.o: \$(srcdir)/../io$file.c
  2761.       \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
  2762.         \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
  2763.   EOF
  2764. !   stdio_objects="$stdio_objects $file.o"
  2765. ! done
  2766.   sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp
  2767.   mv -f tmp Makefile
  2768. --- 24,62 ----
  2769.   # NOTE: We assume a C compiler that where -o with -c works.
  2770.   # But these files are not built by default anyway ...
  2771.   
  2772.   stdio_renames="fclose fflush fgetpos fgets fopen fprintf fputs fread \
  2773.     fscanf fsetpos ftell fwrite gets perror printf puts \
  2774.     scanf setbuffer setvbuf sprintf sscanf ungetc vsprintf vsscanf"
  2775.   stdio_objects=""
  2776.   
  2777. ! case "${target}" in
  2778. ! *linux*)
  2779. !   # Linux uses aliases.
  2780. !   stdio_renames="$stdio_renames popen"
  2781. !   for file in $stdio_renames ; do
  2782. !     cat >>Makefile <<EOF
  2783. ! $file.o:
  2784. !     echo "#undef HAVE_GNU_LD" > $file.c
  2785. !     echo "#define HAVE_GNU_LD" >> $file.c
  2786. !     echo "#include <gnu-stabs.h>" >> $file.c
  2787. !     echo "#undef $file" >> $file.c
  2788. !     echo "symbol_alias (_IO_$file, $file);" >> $file.c
  2789. !     \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c $file.c
  2790. !     /bin/rm -f $file.c
  2791. ! EOF
  2792. !     stdio_objects="$stdio_objects $file.o"
  2793. !   done
  2794. !   ;;
  2795. ! *-*-*)
  2796. !   for file in $stdio_renames ; do
  2797. !     cat >>Makefile <<EOF
  2798.   $file.o: \$(srcdir)/../io$file.c
  2799.       \$(CC_FOR_STDIO) \$(CFLAGS) \$(CINCLUDES) -c \\
  2800.         \$(srcdir)/../io$file.c -D_IO_$file=$file -o $file.o
  2801.   EOF
  2802. !     stdio_objects="$stdio_objects $file.o"
  2803. !   done
  2804. ! esac
  2805.   sed -e "/STDIO_RENAMED_OBJECTS =/s/=.*/=${stdio_objects}/" <Makefile >tmp
  2806.   mv -f tmp Makefile
  2807. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fdopen.c libg++-2.5.3linux.2/libio/stdio/fdopen.c
  2808. *** libg++-2.5.3/libio/stdio/fdopen.c    Fri Aug 20 01:59:58 1993
  2809. --- libg++-2.5.3linux.2/libio/stdio/fdopen.c    Mon Dec 20 08:54:33 1993
  2810. ***************
  2811. *** 1,5 ****
  2812. --- 1,15 ----
  2813.   #include "libioP.h"
  2814.   
  2815. + #ifdef __linux__
  2816. +  
  2817. + #undef HAVE_GNU_LD
  2818. + #define HAVE_GNU_LD
  2819. + #include <gnu-stabs.h>
  2820. +   
  2821. + symbol_alias (_IO_fdopen, fdopen);
  2822. +    
  2823. + #else
  2824.   _IO_FILE *
  2825.   fdopen (fd, mode)
  2826.        int fd;
  2827. ***************
  2828. *** 7,9 ****
  2829. --- 17,21 ----
  2830.   {
  2831.     return _IO_fdopen (fd, mode);
  2832.   }
  2833. + #endif
  2834. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/feof.c libg++-2.5.3linux.2/libio/stdio/feof.c
  2835. *** libg++-2.5.3/libio/stdio/feof.c    Fri Nov 26 21:48:22 1993
  2836. --- libg++-2.5.3linux.2/libio/stdio/feof.c    Tue Jan 18 11:20:58 1994
  2837. ***************
  2838. *** 29,34 ****
  2839. --- 29,35 ----
  2840.   feof(fp)
  2841.        _IO_FILE* fp;
  2842.   {
  2843. +   CHECK_FILE(fp, EOF);
  2844.     COERCE_FILE(fp);
  2845.     return _IO_feof(fp);
  2846.   }
  2847. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/ferror.c libg++-2.5.3linux.2/libio/stdio/ferror.c
  2848. *** libg++-2.5.3/libio/stdio/ferror.c    Sat Nov 27 01:34:24 1993
  2849. --- libg++-2.5.3linux.2/libio/stdio/ferror.c    Tue Jan 18 11:20:58 1994
  2850. ***************
  2851. *** 5,10 ****
  2852. --- 5,11 ----
  2853.   ferror(fp)
  2854.        FILE* fp;
  2855.   {
  2856. +   CHECK_FILE(fp, EOF);
  2857.     COERCE_FILE(fp);
  2858.     return _IO_ferror(fp);
  2859.   }
  2860. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fgetc.c libg++-2.5.3linux.2/libio/stdio/fgetc.c
  2861. *** libg++-2.5.3/libio/stdio/fgetc.c    Mon Oct  4 20:39:48 1993
  2862. --- libg++-2.5.3linux.2/libio/stdio/fgetc.c    Mon Feb 14 10:07:38 1994
  2863. ***************
  2864. *** 5,10 ****
  2865. --- 5,11 ----
  2866.   fgetc(fp)
  2867.        FILE *fp;
  2868.   {
  2869. +   CHECK_FILE(fp, EOF);
  2870.     COERCE_FILE(fp);
  2871.     return _IO_getc(fp);
  2872.   }
  2873. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fileno.c libg++-2.5.3linux.2/libio/stdio/fileno.c
  2874. *** libg++-2.5.3/libio/stdio/fileno.c    Fri Nov 26 21:48:23 1993
  2875. --- libg++-2.5.3linux.2/libio/stdio/fileno.c    Tue Jan 18 11:20:58 1994
  2876. ***************
  2877. *** 5,10 ****
  2878. --- 5,11 ----
  2879.   fileno(fp)
  2880.        _IO_FILE* fp;
  2881.   {
  2882. +   CHECK_FILE(fp, EOF);
  2883.     COERCE_FILE(fp);
  2884.     if (!(fp->_flags & _IO_IS_FILEBUF))
  2885.       return EOF;
  2886. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fputc.c libg++-2.5.3linux.2/libio/stdio/fputc.c
  2887. *** libg++-2.5.3/libio/stdio/fputc.c    Fri Nov 26 21:48:23 1993
  2888. --- libg++-2.5.3linux.2/libio/stdio/fputc.c    Mon Feb 14 10:07:48 1994
  2889. ***************
  2890. *** 6,11 ****
  2891. --- 6,12 ----
  2892.        int c;
  2893.        FILE *fp;
  2894.   {
  2895. +   CHECK_FILE(fp, EOF);
  2896.     COERCE_FILE(fp);
  2897.     return _IO_putc(c, fp);
  2898.   }
  2899. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/freopen.c libg++-2.5.3linux.2/libio/stdio/freopen.c
  2900. *** libg++-2.5.3/libio/stdio/freopen.c    Mon Oct  4 20:39:54 1993
  2901. --- libg++-2.5.3linux.2/libio/stdio/freopen.c    Sun Feb 13 22:23:04 1994
  2902. ***************
  2903. *** 7,12 ****
  2904. --- 7,13 ----
  2905.        const char* mode;
  2906.        FILE* fp;
  2907.   {
  2908. +   CHECK_FILE(fp, NULL);
  2909.     COERCE_FILE(fp);
  2910.     if (!(fp->_flags & _IO_IS_FILEBUF))
  2911.       return NULL;
  2912. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/fseek.c libg++-2.5.3linux.2/libio/stdio/fseek.c
  2913. *** libg++-2.5.3/libio/stdio/fseek.c    Fri Nov 26 21:48:24 1993
  2914. --- libg++-2.5.3linux.2/libio/stdio/fseek.c    Sun Feb 13 22:24:04 1994
  2915. ***************
  2916. *** 7,12 ****
  2917. --- 7,13 ----
  2918.        long int offset;
  2919.        int whence;
  2920.   {
  2921. +   CHECK_FILE(fp, -1);
  2922.     COERCE_FILE(fp);
  2923.     return _IO_fseek(fp, offset, whence);
  2924.   }
  2925. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/getw.c libg++-2.5.3linux.2/libio/stdio/getw.c
  2926. *** libg++-2.5.3/libio/stdio/getw.c    Fri Nov 26 21:48:27 1993
  2927. --- libg++-2.5.3linux.2/libio/stdio/getw.c    Mon Feb 14 10:08:08 1994
  2928. ***************
  2929. *** 7,12 ****
  2930. --- 7,13 ----
  2931.   {
  2932.     int w;
  2933.     _IO_size_t bytes_read;
  2934. +   CHECK_FILE(fp, EOF);
  2935.     COERCE_FILE(fp);
  2936.     bytes_read = _IO_sgetn (fp, (char*)&w, sizeof(w));
  2937.     return sizeof(w) == bytes_read ? w : EOF;
  2938. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/pclose.c libg++-2.5.3linux.2/libio/stdio/pclose.c
  2939. *** libg++-2.5.3/libio/stdio/pclose.c    Wed Dec 31 19:00:00 1969
  2940. --- libg++-2.5.3linux.2/libio/stdio/pclose.c    Mon Dec 20 08:54:33 1993
  2941. ***************
  2942. *** 0 ****
  2943. --- 1,27 ----
  2944. + #include "libioP.h"
  2945. + #include "stdio.h"
  2946. + #include <errno.h>
  2947. + #ifndef __linux__
  2948. + FILE *
  2949. + popen(command, mode)
  2950. +      const char *command; const char *mode;
  2951. + {
  2952. +   return _IO_popen(command, mode);
  2953. + }
  2954. + #endif
  2955. + int
  2956. + pclose(fp)
  2957. +      FILE *fp;
  2958. + {
  2959. + #if 0
  2960. +   /* Does not actually test that stream was created by popen(). Instead,
  2961. +      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
  2962. +   if (fp is not a proc_file)
  2963. +     return -1;
  2964. + #endif
  2965. +   return _IO_fclose(fp);
  2966. + }
  2967. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/popen.c libg++-2.5.3linux.2/libio/stdio/popen.c
  2968. *** libg++-2.5.3/libio/stdio/popen.c    Fri Nov 26 21:48:28 1993
  2969. --- libg++-2.5.3linux.2/libio/stdio/popen.c    Mon Dec 20 08:54:34 1993
  2970. ***************
  2971. *** 1,23 ****
  2972. - #include "libioP.h"
  2973. - #include "stdio.h"
  2974. - #include <errno.h>
  2975. - FILE *
  2976. - popen(command, mode)
  2977. -      const char *command; const char *mode;
  2978. - {
  2979. -   return _IO_popen(command, mode);
  2980. - }
  2981. - int
  2982. - pclose(fp)
  2983. -      FILE *fp;
  2984. - {
  2985. - #if 0
  2986. -   /* Does not actually test that stream was created by popen(). Instead,
  2987. -      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
  2988. -   if (fp is not a proc_file)
  2989. -     return -1;
  2990. - #endif
  2991. -   return _IO_fclose(fp);
  2992. - }
  2993. --- 0 ----
  2994. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/putw.c libg++-2.5.3linux.2/libio/stdio/putw.c
  2995. *** libg++-2.5.3/libio/stdio/putw.c    Fri Nov 26 21:48:30 1993
  2996. --- libg++-2.5.3linux.2/libio/stdio/putw.c    Mon Feb 14 10:08:54 1994
  2997. ***************
  2998. *** 9,14 ****
  2999. --- 9,15 ----
  3000.        FILE *fp;
  3001.   {
  3002.     _IO_size_t written;
  3003. +   CHECK_FILE(fp, EOF);
  3004.     COERCE_FILE(fp);
  3005.     written = _IO_sputn(fp, (const char *)&w, sizeof(w));
  3006.     return written == sizeof(w) ? 0 : EOF;
  3007. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/remove.c libg++-2.5.3linux.2/libio/stdio/remove.c
  3008. *** libg++-2.5.3/libio/stdio/remove.c    Wed Dec 31 19:00:00 1969
  3009. --- libg++-2.5.3linux.2/libio/stdio/remove.c    Mon Dec 20 08:54:34 1993
  3010. ***************
  3011. *** 0 ****
  3012. --- 1,39 ----
  3013. + /* Copyright (C) 1991 Free Software Foundation, Inc.
  3014. + This file is part of the GNU C Library.
  3015. + The GNU C Library is free software; you can redistribute it and/or
  3016. + modify it under the terms of the GNU Library General Public License as
  3017. + published by the Free Software Foundation; either version 2 of the
  3018. + License, or (at your option) any later version.
  3019. + The GNU C Library is distributed in the hope that it will be useful,
  3020. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  3021. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3022. + Library General Public License for more details.
  3023. + You should have received a copy of the GNU Library General Public
  3024. + License along with the GNU C Library; see the file COPYING.LIB.  If
  3025. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  3026. + Cambridge, MA 02139, USA.  */
  3027. + #include "libioP.h"
  3028. + #include "stdio.h"
  3029. + #include <unistd.h>
  3030. + #ifdef __GNU_LIBRARY__
  3031. + #include <ansidecl.h>
  3032. + #include <gnu-stabs.h>
  3033. + function_alias(remove, __unlink, int, (file),
  3034. +            DEFUN(remove, (file), CONST char *file))
  3035. + #else
  3036. + int
  3037. + remove (file)
  3038. +   const char *file;
  3039. + {
  3040. +   return unlink (file);
  3041. + }
  3042. + #endif
  3043. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/rewind.c libg++-2.5.3linux.2/libio/stdio/rewind.c
  3044. *** libg++-2.5.3/libio/stdio/rewind.c    Fri Nov 26 21:48:31 1993
  3045. --- libg++-2.5.3linux.2/libio/stdio/rewind.c    Tue Jan 18 11:20:59 1994
  3046. ***************
  3047. *** 5,10 ****
  3048. --- 5,11 ----
  3049.   rewind(fp)
  3050.        _IO_FILE* fp;
  3051.   {
  3052. +   CHECK_FILE(fp, );
  3053.     COERCE_FILE(fp);
  3054.     _IO_rewind(fp);
  3055.   }
  3056. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/setfileno.c libg++-2.5.3linux.2/libio/stdio/setfileno.c
  3057. *** libg++-2.5.3/libio/stdio/setfileno.c    Fri Nov 26 21:48:33 1993
  3058. --- libg++-2.5.3linux.2/libio/stdio/setfileno.c    Tue Jan 18 11:20:59 1994
  3059. ***************
  3060. *** 11,16 ****
  3061. --- 11,17 ----
  3062.        _IO_FILE* fp;
  3063.        int fd;
  3064.   {
  3065. +   CHECK_FILE(fp, );
  3066.     COERCE_FILE(fp);
  3067.     if ((fp->_flags & _IO_IS_FILEBUF) != 0)
  3068.       fp->_fileno = fd;
  3069. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/stdio.c libg++-2.5.3linux.2/libio/stdio/stdio.c
  3070. *** libg++-2.5.3/libio/stdio/stdio.c    Wed Dec 31 19:00:00 1969
  3071. --- libg++-2.5.3linux.2/libio/stdio/stdio.c    Mon Dec 20 08:54:34 1993
  3072. ***************
  3073. *** 0 ****
  3074. --- 1,12 ----
  3075. + #include "libioP.h"
  3076. + #include "stdio.h"
  3077. + /* Define non-macro versions of stdin/stdout/stderr,
  3078. +  * for use by debuggers. */
  3079. + #undef stdin
  3080. + #undef stdout
  3081. + #undef stderr
  3082. + FILE* stdin = &_IO_stdin_._file;
  3083. + FILE* stdout = &_IO_stdout_._file;
  3084. + FILE* stderr = &_IO_stderr_._file;
  3085. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/stdio.h libg++-2.5.3linux.2/libio/stdio/stdio.h
  3086. *** libg++-2.5.3/libio/stdio/stdio.h    Mon Oct  4 20:40:07 1993
  3087. --- libg++-2.5.3linux.2/libio/stdio/stdio.h    Mon Dec 20 08:58:12 1993
  3088. ***************
  3089. *** 19,25 ****
  3090.   */
  3091.   #ifndef _STDIO_H
  3092.   #define _STDIO_H
  3093. ! #define _STDIO_USES_IOSTREAM
  3094.   
  3095.   #include <libio.h>
  3096.   
  3097. --- 19,30 ----
  3098.   */
  3099.   #ifndef _STDIO_H
  3100.   #define _STDIO_H
  3101. ! #undef _STDIO_USES_IOSTREAM
  3102. ! #define _STDIO_USES_IOSTREAM 1
  3103. ! #ifdef __linux__
  3104. ! #include <features.h>
  3105. ! #endif
  3106.   
  3107.   #include <libio.h>
  3108.   
  3109. ***************
  3110. *** 68,74 ****
  3111.   
  3112.   #define FOPEN_MAX     _G_FOPEN_MAX
  3113.   #define FILENAME_MAX _G_FILENAME_MAX
  3114. ! #define TMP_MAX 999 /* Only limited by filename length */
  3115.   
  3116.   #define L_ctermid     9
  3117.   #define L_cuserid     9
  3118. --- 73,82 ----
  3119.   
  3120.   #define FOPEN_MAX     _G_FOPEN_MAX
  3121.   #define FILENAME_MAX _G_FILENAME_MAX
  3122. ! /* limited by the number of possible unique combinations. see
  3123. !  * libio/iotempname.c for details. */
  3124. ! #define TMP_MAX 238328
  3125.   
  3126.   #define L_ctermid     9
  3127.   #define L_cuserid     9
  3128. ***************
  3129. *** 82,154 ****
  3130.   #define stdout _IO_stdout
  3131.   #define stderr _IO_stderr
  3132.   
  3133. ! #define getc(fp) _IO_getc(fp)
  3134. ! #define putc(c, fp) _IO_putc(c, fp)
  3135. ! #define putchar(c) putc(c, stdout)
  3136. ! #define getchar() getc(stdin)
  3137.   
  3138. ! #ifdef __cplusplus
  3139. ! extern "C" {
  3140. ! #endif
  3141.   
  3142. ! #if defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
  3143. ! #define _ARGS(args) args
  3144. ! #else
  3145. ! #define _ARGS(args) ()
  3146.   #endif
  3147.   
  3148. ! extern void clearerr _ARGS((FILE*));
  3149. ! extern int fclose _ARGS((FILE*));
  3150. ! extern int feof _ARGS((FILE*));
  3151. ! extern int ferror _ARGS((FILE*));
  3152. ! extern int fflush _ARGS((FILE*));
  3153. ! extern int fgetc _ARGS((FILE *));
  3154. ! extern int fgetpos _ARGS((FILE* fp, fpos_t *pos));
  3155. ! extern char* fgets _ARGS((char*, int, FILE*));
  3156. ! extern FILE* fopen _ARGS((const char*, const char*));
  3157. ! extern int fprintf _ARGS((FILE*, const char* format, ...));
  3158. ! extern int fputc _ARGS((int, FILE*));
  3159. ! extern int fputs _ARGS((const char *str, FILE *fp));
  3160. ! extern size_t fread _ARGS((void*, size_t, size_t, FILE*));
  3161. ! extern FILE* freopen _ARGS((const char*, const char*, FILE*));
  3162. ! extern int fscanf _ARGS((FILE *fp, const char* format, ...));
  3163. ! extern int fseek _ARGS((FILE* fp, long int offset, int whence));
  3164. ! extern int fsetpos _ARGS((FILE* fp, const fpos_t *pos));
  3165. ! extern long int ftell _ARGS((FILE* fp));
  3166. ! extern size_t fwrite _ARGS((const void*, size_t, size_t, FILE*));
  3167. ! extern char* gets _ARGS((char*));
  3168. ! extern void perror _ARGS((const char *));
  3169. ! extern int printf _ARGS((const char* format, ...));
  3170. ! extern int puts _ARGS((const char *str));
  3171. ! extern int remove _ARGS((const char*));
  3172. ! extern int rename _ARGS((const char* _old, const char* _new));
  3173. ! extern void rewind _ARGS((FILE*));
  3174. ! extern int scanf _ARGS((const char* format, ...));
  3175. ! extern void setbuf _ARGS((FILE*, char*));
  3176. ! extern void setlinebuf _ARGS((FILE*));
  3177. ! extern void setbuffer _ARGS((FILE*, char*, int));
  3178. ! extern int setvbuf _ARGS((FILE*, char*, int mode, size_t size));
  3179. ! extern int sprintf _ARGS((char*, const char* format, ...));
  3180. ! extern int sscanf _ARGS((const char* string, const char* format, ...));
  3181. ! extern FILE* tmpfile _ARGS((void));
  3182. ! extern char* tmpnam _ARGS((char*));
  3183. ! extern int ungetc _ARGS((int c, FILE* fp));
  3184. ! extern int vfprintf _ARGS((FILE *fp, char const *fmt0, _G_va_list));
  3185. ! extern int vprintf _ARGS((char const *fmt, _G_va_list));
  3186. ! extern int vsprintf _ARGS((char* string, const char* format, _G_va_list));
  3187.   
  3188. ! #if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
  3189. ! extern FILE *fdopen _ARGS((int, const char *));
  3190. ! extern int fileno _ARGS((FILE*));
  3191. ! extern FILE* popen _ARGS((const char*, const char*));
  3192. ! extern int pclose _ARGS((FILE*));
  3193. ! #endif
  3194.   
  3195. - extern int __underflow _ARGS((struct _IO_FILE*));
  3196. - extern int __overflow _ARGS((struct _IO_FILE*, int));
  3197.   
  3198. ! #ifdef __cplusplus
  3199. ! }
  3200.   #endif
  3201.   
  3202.   #endif /*!_STDIO_H*/
  3203. --- 90,183 ----
  3204.   #define stdout _IO_stdout
  3205.   #define stderr _IO_stderr
  3206.   
  3207. ! __BEGIN_DECLS
  3208.   
  3209. ! extern void clearerr __P((FILE*));
  3210. ! extern int fclose __P((FILE*));
  3211. ! extern int feof __P((FILE*));
  3212. ! extern int ferror __P((FILE*));
  3213. ! extern int fflush __P((FILE*));
  3214. ! extern int fgetc __P((FILE *));
  3215. ! extern int fgetpos __P((FILE* fp, fpos_t *pos));
  3216. ! extern char* fgets __P((char*, int, FILE*));
  3217. ! extern FILE* fopen __P((__const char*, __const char*));
  3218. ! extern int fprintf __P((FILE*, __const char* format, ...));
  3219. ! extern int fputc __P((int, FILE*));
  3220. ! extern int fputs __P((__const char *str, FILE *fp));
  3221. ! extern size_t fread __P((void*, size_t, size_t, FILE*));
  3222. ! extern FILE* freopen __P((__const char*, __const char*, FILE*));
  3223. ! extern int fscanf __P((FILE *fp, __const char* format, ...));
  3224. ! extern int fseek __P((FILE* fp, long int offset, int whence));
  3225. ! extern int fsetpos __P((FILE* fp, __const fpos_t *pos));
  3226. ! extern long int ftell __P((FILE* fp));
  3227. ! extern size_t fwrite __P((__const void*, size_t, size_t, FILE*));
  3228. ! extern int getc __P((FILE *));
  3229. ! extern int getchar __P((void));
  3230. ! extern char* gets __P((char*));
  3231. ! extern void perror __P((__const char *));
  3232. ! extern int printf __P((__const char* format, ...));
  3233. ! extern int putc __P((int, FILE *));
  3234. ! extern int putchar __P((int));
  3235. ! extern int puts __P((__const char *str));
  3236. ! extern int remove __P((__const char*));
  3237. ! extern int rename __P((__const char* _old, __const char* _new));
  3238. ! extern void rewind __P((FILE*));
  3239. ! extern int scanf __P((__const char* format, ...));
  3240. ! extern void setbuf __P((FILE*, char*));
  3241. ! extern void setlinebuf __P((FILE*));
  3242. ! extern void setbuffer __P((FILE*, char*, int));
  3243. ! extern int setvbuf __P((FILE*, char*, int mode, size_t size));
  3244. ! extern int sprintf __P((char*, __const char* format, ...));
  3245. ! extern int sscanf __P((__const char* string, __const char* format, ...));
  3246. ! extern FILE* tmpfile __P((void));
  3247. ! extern char* tmpnam __P((char*));
  3248. ! extern int ungetc __P((int c, FILE* fp));
  3249. ! extern int vfprintf __P((FILE *fp, char __const *fmt0, _G_va_list));
  3250. ! extern int vprintf __P((char __const *fmt, _G_va_list));
  3251. ! extern int vsprintf __P((char* string, __const char* format, _G_va_list));
  3252.   
  3253. ! #if !defined(__STRICT_ANSI__) || defined(_POSIX_SOURCE)
  3254. ! extern FILE *fdopen __P((int, __const char *));
  3255. ! extern int fileno __P((FILE*));
  3256. ! extern FILE* popen __P((__const char*, __const char*));
  3257. ! extern int pclose __P((FILE*));
  3258.   #endif
  3259.   
  3260. ! #if !defined(__STRICT_ANSI__)
  3261. ! extern int getw __P((FILE*));
  3262. ! extern int putw __P((int, FILE*));
  3263.   
  3264. ! extern char* tempnam __P((__const char *__dir, __const char *__pfx));
  3265.   
  3266.   
  3267. ! #ifdef __GNU_LIBRARY__
  3268. ! #ifdef  __USE_BSD
  3269. ! extern int sys_nerr;
  3270. ! extern char *sys_errlist[];
  3271. ! #endif
  3272. ! #ifdef  __USE_GNU
  3273. ! extern int _sys_nerr;
  3274. ! extern char *_sys_errlist[];
  3275.   #endif
  3276. +  
  3277. + #ifdef  __USE_MISC
  3278. + /* Print a message describing the meaning of the given signal number. */
  3279. + extern void psignal __P ((int __sig, __const char *__s));
  3280. + #endif /* Non strict ANSI and not POSIX only.  */
  3281. + #endif /* __GNU_LIBRARY__ */
  3282. + #endif /* __STRICT_ANSI__ */
  3283. + extern int __underflow __P((struct _IO_FILE*));
  3284. + extern int __overflow __P((struct _IO_FILE*, int));
  3285. + #define getc(fp) _IO_getc(fp)
  3286. + #define putc(c, fp) _IO_putc(c, fp)
  3287. + #define putchar(c) putc(c, stdout)
  3288. + #define getchar() getc(stdin)
  3289. + __END_DECLS
  3290.   
  3291.   #endif /*!_STDIO_H*/
  3292. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/tempnam.c libg++-2.5.3linux.2/libio/stdio/tempnam.c
  3293. *** libg++-2.5.3/libio/stdio/tempnam.c    Wed Dec 31 19:00:00 1969
  3294. --- libg++-2.5.3linux.2/libio/stdio/tempnam.c    Mon Dec 20 08:54:35 1993
  3295. ***************
  3296. *** 0 ****
  3297. --- 1,51 ----
  3298. + /* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
  3299. + This file is part of the GNU C Library.
  3300. + The GNU C Library is free software; you can redistribute it and/or
  3301. + modify it under the terms of the GNU Library General Public License as
  3302. + published by the Free Software Foundation; either version 2 of the
  3303. + License, or (at your option) any later version.
  3304. + The GNU C Library is distributed in the hope that it will be useful,
  3305. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  3306. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3307. + Library General Public License for more details.
  3308. + You should have received a copy of the GNU Library General Public
  3309. + License along with the GNU C Library; see the file COPYING.LIB.  If
  3310. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  3311. + Cambridge, MA 02139, USA.  */
  3312. + #include <ansidecl.h>
  3313. + #include <errno.h>
  3314. + #include <stddef.h>
  3315. + #include <stdlib.h>
  3316. + #include <string.h>
  3317. + #include "libioP.h"
  3318. + #include "stdio.h"
  3319. + /* Generate a unique temporary filename using up to five characters of PFX
  3320. +    if it is not NULL.  The directory to put this file in is searched for
  3321. +    as follows: First the environment variable "TMPDIR" is checked.
  3322. +    If it contains the name of a writable directory, that directory is used.
  3323. +    If not and if DIR is not NULL, that value is checked.  If that fails,
  3324. +    P_tmpdir is tried and finally "/tmp".  The storage for the filename
  3325. +    is allocated by `malloc'.  */
  3326. + char *
  3327. + DEFUN(tempnam, (dir, pfx), CONST char *dir AND CONST char *pfx)
  3328. + {
  3329. +   _IO_size_t len;
  3330. +   register char *s;
  3331. +   register char *t = _IO_gen_tempname(dir, pfx, 1, &len, (_IO_FILE **) NULL);
  3332. +   if (t == NULL)
  3333. +     return NULL;
  3334. +   s = (char *) malloc(len);
  3335. +   if (s == NULL)
  3336. +     return NULL;
  3337. +   (void) memcpy(s, t, len);
  3338. +   return s;
  3339. + }
  3340. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/tmpfile.c libg++-2.5.3linux.2/libio/stdio/tmpfile.c
  3341. *** libg++-2.5.3/libio/stdio/tmpfile.c    Wed Dec 31 19:00:00 1969
  3342. --- libg++-2.5.3linux.2/libio/stdio/tmpfile.c    Mon Dec 20 08:54:35 1993
  3343. ***************
  3344. *** 0 ****
  3345. --- 1,44 ----
  3346. + /* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
  3347. + This file is part of the GNU C Library.
  3348. + The GNU C Library is free software; you can redistribute it and/or
  3349. + modify it under the terms of the GNU Library General Public License as
  3350. + published by the Free Software Foundation; either version 2 of the
  3351. + License, or (at your option) any later version.
  3352. + The GNU C Library is distributed in the hope that it will be useful,
  3353. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  3354. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3355. + Library General Public License for more details.
  3356. + You should have received a copy of the GNU Library General Public
  3357. + License along with the GNU C Library; see the file COPYING.LIB.  If
  3358. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  3359. + Cambridge, MA 02139, USA.  */
  3360. + #include <ansidecl.h>
  3361. + #include "stdio.h"
  3362. + #include "libioP.h"
  3363. + /* This returns a new stream opened on a temporary file (generated
  3364. +    by tmpnam) The file is opened with mode "w+b" (binary read/write).
  3365. +    If we couldn't generate a unique filename or the file couldn't
  3366. +    be opened, NULL is returned.  */
  3367. + FILE *
  3368. + DEFUN_VOID(tmpfile)
  3369. + {
  3370. +   char *filename;
  3371. +   _IO_FILE *f;
  3372. +   filename = _IO_gen_tempname((char *) NULL, "tmpf", 0,
  3373. +                   (_IO_size_t *) NULL, &f);
  3374. +   if (filename == NULL)
  3375. +     return NULL;
  3376. +   /* Note that this relies on the Unix semantics that
  3377. +      a file is not really removed until it is closed.  */
  3378. +   (void) remove (filename);
  3379. +   return f;
  3380. + }
  3381. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/tmpnam.c libg++-2.5.3linux.2/libio/stdio/tmpnam.c
  3382. *** libg++-2.5.3/libio/stdio/tmpnam.c    Wed Dec 31 19:00:00 1969
  3383. --- libg++-2.5.3linux.2/libio/stdio/tmpnam.c    Mon Dec 20 08:54:36 1993
  3384. ***************
  3385. *** 0 ****
  3386. --- 1,46 ----
  3387. + /* Copyright (C) 1991, 1993 Free Software Foundation, Inc.
  3388. + This file is part of the GNU C Library.
  3389. + The GNU C Library is free software; you can redistribute it and/or
  3390. + modify it under the terms of the GNU Library General Public License as
  3391. + published by the Free Software Foundation; either version 2 of the
  3392. + License, or (at your option) any later version.
  3393. + The GNU C Library is distributed in the hope that it will be useful,
  3394. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  3395. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  3396. + Library General Public License for more details.
  3397. + You should have received a copy of the GNU Library General Public
  3398. + License along with the GNU C Library; see the file COPYING.LIB.  If
  3399. + not, write to the Free Software Foundation, Inc., 675 Mass Ave,
  3400. + Cambridge, MA 02139, USA.  */
  3401. + #include <ansidecl.h>
  3402. + #ifdef __STDC__
  3403. + #include <stddef.h>
  3404. + #endif
  3405. + #include "stdio.h"
  3406. + #include "libioP.h"
  3407. + #include <string.h>
  3408. + /* Generate a unique filename in P_tmpdir.  */
  3409. + char *
  3410. + DEFUN(tmpnam, (s), register char *s)
  3411. + {
  3412. +   register char *t = _IO_gen_tempname((CONST char *) NULL,
  3413. +                       (CONST char *) NULL, 0,
  3414. +                       (_IO_size_t *) NULL,
  3415. +                           (_IO_FILE **) NULL);
  3416. +   if (t == NULL)
  3417. +     return NULL;
  3418. +   if (s != NULL)
  3419. +     (void) strcpy(s, t);
  3420. +   else
  3421. +     s = t;
  3422. +   return s;
  3423. + }
  3424. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/vfprintf.c libg++-2.5.3linux.2/libio/stdio/vfprintf.c
  3425. *** libg++-2.5.3/libio/stdio/vfprintf.c    Fri Aug 20 02:00:01 1993
  3426. --- libg++-2.5.3linux.2/libio/stdio/vfprintf.c    Mon Feb 14 10:09:06 1994
  3427. ***************
  3428. *** 22,27 ****
  3429. --- 22,37 ----
  3430.   This exception does not however invalidate any other reasons why
  3431.   the executable file might be covered by the GNU General Public License. */
  3432.   
  3433. + #ifdef __linux__
  3434. + #undef HAVE_GNU_LD
  3435. + #define HAVE_GNU_LD
  3436. + #include <gnu-stabs.h>
  3437. + symbol_alias (_IO_vfprintf, vfprintf);
  3438. + #else
  3439.   #include "libioP.h"
  3440.   
  3441.   int
  3442. ***************
  3443. *** 30,35 ****
  3444. --- 40,48 ----
  3445.        char const *format;
  3446.        _IO_va_list args;
  3447.   {
  3448. +   CHECK_FILE(fp, -1);
  3449.     COERCE_FILE(fp);
  3450.     return _IO_vfprintf(fp, format, args);
  3451.   }
  3452. + #endif
  3453. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/stdio/vfscanf.c libg++-2.5.3linux.2/libio/stdio/vfscanf.c
  3454. *** libg++-2.5.3/libio/stdio/vfscanf.c    Fri Nov 26 16:27:21 1993
  3455. --- libg++-2.5.3linux.2/libio/stdio/vfscanf.c    Mon Feb 14 10:09:14 1994
  3456. ***************
  3457. *** 31,36 ****
  3458. --- 31,37 ----
  3459.        const char *format;
  3460.        _IO_va_list args;
  3461.   {
  3462. +   CHECK_FILE(fp, EOF);
  3463.     COERCE_FILE(fp);
  3464.     return _IO_vfscanf(fp, format, args, NULL);
  3465.   }
  3466. diff -rc --new-file -x Makefile -x depend -x *.orig -x *.o -x *.info* -x config.status -x *.a -x nohup.* -x Make.pack -x tests -x target-mkfrag -x dbz -x alloca-conf.h libg++-2.5.3/libio/strfile.h libg++-2.5.3linux.2/libio/strfile.h
  3467. *** libg++-2.5.3/libio/strfile.h    Wed Nov  3 15:00:05 1993
  3468. --- libg++-2.5.3linux.2/libio/strfile.h    Mon Dec 20 08:54:36 1993
  3469. ***************
  3470. *** 27,34 ****
  3471.   Merge into  libio.h ?
  3472.   #endif
  3473.   
  3474. ! typedef void *(*_IO_alloc_type) _PARAMS((_IO_size_t));
  3475. ! typedef void (*_IO_free_type) _PARAMS((void*));
  3476.   
  3477.   struct _IO_str_fields
  3478.   {
  3479. --- 27,34 ----
  3480.   Merge into  libio.h ?
  3481.   #endif
  3482.   
  3483. ! typedef void *(*_IO_alloc_type) __P((_IO_size_t));
  3484. ! typedef void (*_IO_free_type) __P((void*));
  3485.   
  3486.   struct _IO_str_fields
  3487.   {
  3488.