This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
A glibc 2.1 patch for libstdc++
- To: drepper@cygnus.com
- Subject: A glibc 2.1 patch for libstdc++
- From: hjl@lucon.org (H.J. Lu)
- Date: Mon, 17 Aug 1998 14:06:23 -0700 (PDT)
- Cc: libc-hacker@cygnus.com (GNU C Library)
Hi,
This seems to fix groff.
H.J.
---
Mon Aug 17 07:17:08 1998 H.J. Lu (hjl@gnu.org)
* libio/Versions (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.1.
* libio/fileops.c (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Change the prefix to
"_IO_new_". Added to GLIBC_2.1.
* libio/libioP.h (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Add prototypes for the prefix
"_IO_new_".
* libio/oldfileops.c (_IO_do_write, _IO_file_attach,
_IO_file_close_it, _IO_file_finish, _IO_file_fopen,
_IO_file_init, _IO_file_overflow, _IO_file_seekoff,
_IO_file_setbuf, _IO_file_sync, _IO_file_underflow,
_IO_file_write, _IO_file_xsputn): Added to GLIBC_2.0.
Index: libio/Versions
===================================================================
RCS file: /home/work/cvs/gnu/glibc/libio/Versions,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 Versions
--- libio/Versions 1998/07/17 17:29:17 1.1.1.2
+++ libio/Versions 1998/08/17 20:03:59
@@ -83,6 +83,12 @@ libc {
# functions used in other libraries
_IO_fclose; _IO_fopen; _IO_fdopen; __asprintf;
+ # functions used in libstdc++
+ _IO_do_write; _IO_file_attach; _IO_file_close_it; _IO_file_finish;
+ _IO_file_fopen; _IO_file_init; _IO_file_overflow; _IO_file_seekoff;
+ _IO_file_setbuf; _IO_file_sync; _IO_file_underflow;
+ _IO_file_write; _IO_file_xsputn;
+
# Changed getline function in libio.
_IO_getline_info;
Index: libio/fileops.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/libio/fileops.c,v
retrieving revision 1.1.1.20
diff -u -p -r1.1.1.20 fileops.c
--- libio/fileops.c 1998/08/11 22:28:40 1.1.1.20
+++ libio/fileops.c 1998/08/17 18:51:18
@@ -105,7 +105,7 @@ extern int errno;
void
-_IO_file_init (fp)
+_IO_new_file_init (fp)
_IO_FILE *fp;
{
/* POSIX.1 allows another file handle to be used to change the position
@@ -119,7 +119,7 @@ _IO_file_init (fp)
}
int
-_IO_file_close_it (fp)
+_IO_new_file_close_it (fp)
_IO_FILE *fp;
{
int write_status, close_status;
@@ -146,7 +146,7 @@ _IO_file_close_it (fp)
}
void
-_IO_file_finish (fp, dummy)
+_IO_new_file_finish (fp, dummy)
_IO_FILE *fp;
int dummy;
{
@@ -192,7 +192,7 @@ _IO_file_open (fp, filename, posix_mode,
}
_IO_FILE *
-_IO_file_fopen (fp, filename, mode, is32not64)
+_IO_new_file_fopen (fp, filename, mode, is32not64)
_IO_FILE *fp;
const char *filename;
const char *mode;
@@ -250,7 +250,7 @@ _IO_file_fopen (fp, filename, mode, is32
}
_IO_FILE *
-_IO_file_attach (fp, fd)
+_IO_new_file_attach (fp, fd)
_IO_FILE *fp;
int fd;
{
@@ -269,7 +269,7 @@ _IO_file_attach (fp, fd)
}
_IO_FILE *
-_IO_file_setbuf (fp, p, len)
+_IO_new_file_setbuf (fp, p, len)
_IO_FILE *fp;
char *p;
_IO_ssize_t len;
@@ -288,7 +288,7 @@ _IO_file_setbuf (fp, p, len)
Then mark FP as having empty buffers. */
int
-_IO_do_write (fp, data, to_do)
+_IO_new_do_write (fp, data, to_do)
_IO_FILE *fp;
const char *data;
_IO_size_t to_do;
@@ -322,7 +322,7 @@ _IO_do_write (fp, data, to_do)
}
int
-_IO_file_underflow (fp)
+_IO_new_file_underflow (fp)
_IO_FILE *fp;
{
_IO_ssize_t count;
@@ -377,7 +377,7 @@ _IO_file_underflow (fp)
}
int
-_IO_file_overflow (f, ch)
+_IO_new_file_overflow (f, ch)
_IO_FILE *f;
int ch;
{
@@ -428,7 +428,7 @@ _IO_file_overflow (f, ch)
}
int
-_IO_file_sync (fp)
+_IO_new_file_sync (fp)
_IO_FILE *fp;
{
_IO_ssize_t delta;
@@ -462,7 +462,7 @@ _IO_file_sync (fp)
}
_IO_fpos64_t
-_IO_file_seekoff (fp, offset, dir, mode)
+_IO_new_file_seekoff (fp, offset, dir, mode)
_IO_FILE *fp;
_IO_off64_t offset;
int dir;
@@ -662,7 +662,7 @@ _IO_file_close (fp)
}
_IO_ssize_t
-_IO_file_write (f, data, n)
+_IO_new_file_write (f, data, n)
_IO_FILE *f;
const void *data;
_IO_ssize_t n;
@@ -686,7 +686,7 @@ _IO_file_write (f, data, n)
}
_IO_size_t
-_IO_file_xsputn (f, data, n)
+_IO_new_file_xsputn (f, data, n)
_IO_FILE *f;
const void *data;
_IO_size_t n;
@@ -759,7 +759,7 @@ _IO_file_xsputn (f, data, n)
dont_write = block_size >= 128 ? to_do % block_size : 0;
count = to_do - dont_write;
- if (_IO_do_write (f, s, count) == EOF)
+ if (_IO_new_do_write (f, s, count) == EOF)
return n - to_do;
to_do = dont_write;
@@ -863,23 +863,56 @@ _IO_file_xsgetn (fp, data, n)
struct _IO_jump_t _IO_file_jumps =
{
JUMP_INIT_DUMMY,
- JUMP_INIT(finish, _IO_file_finish),
- JUMP_INIT(overflow, _IO_file_overflow),
- JUMP_INIT(underflow, _IO_file_underflow),
+ JUMP_INIT(finish, _IO_new_file_finish),
+ JUMP_INIT(overflow, _IO_new_file_overflow),
+ JUMP_INIT(underflow, _IO_new_file_underflow),
JUMP_INIT(uflow, _IO_default_uflow),
JUMP_INIT(pbackfail, _IO_default_pbackfail),
- JUMP_INIT(xsputn, _IO_file_xsputn),
+ JUMP_INIT(xsputn, _IO_new_file_xsputn),
JUMP_INIT(xsgetn, _IO_file_xsgetn),
- JUMP_INIT(seekoff, _IO_file_seekoff),
+ JUMP_INIT(seekoff, _IO_new_file_seekoff),
JUMP_INIT(seekpos, _IO_default_seekpos),
- JUMP_INIT(setbuf, _IO_file_setbuf),
- JUMP_INIT(sync, _IO_file_sync),
+ JUMP_INIT(setbuf, _IO_new_file_setbuf),
+ JUMP_INIT(sync, _IO_new_file_sync),
JUMP_INIT(doallocate, _IO_file_doallocate),
JUMP_INIT(read, _IO_file_read),
- JUMP_INIT(write, _IO_file_write),
+ JUMP_INIT(write, _IO_new_file_write),
JUMP_INIT(seek, _IO_file_seek),
JUMP_INIT(close, _IO_file_close),
JUMP_INIT(stat, _IO_file_stat),
JUMP_INIT(showmanyc, _IO_default_showmanyc),
JUMP_INIT(imbue, _IO_default_imbue)
};
+
+
+#if defined PIC && DO_VERSIONING
+default_symbol_version (_IO_new_do_write, _IO_do_write, GLIBC_2.1);
+default_symbol_version (_IO_new_file_attach, _IO_file_attach, GLIBC_2.1);
+default_symbol_version (_IO_new_file_close_it, _IO_file_close_it, GLIBC_2.1);
+default_symbol_version (_IO_new_file_finish, _IO_file_finish, GLIBC_2.1);
+default_symbol_version (_IO_new_file_fopen, _IO_file_fopen, GLIBC_2.1);
+default_symbol_version (_IO_new_file_init, _IO_file_init, GLIBC_2.1);
+default_symbol_version (_IO_new_file_setbuf, _IO_file_setbuf, GLIBC_2.1);
+default_symbol_version (_IO_new_file_sync, _IO_file_sync, GLIBC_2.1);
+default_symbol_version (_IO_new_file_overflow, _IO_file_overflow, GLIBC_2.1);
+default_symbol_version (_IO_new_file_seekoff, _IO_file_seekoff, GLIBC_2.1);
+default_symbol_version (_IO_new_file_underflow, _IO_file_underflow, GLIBC_2.1);
+default_symbol_version (_IO_new_file_write, _IO_file_write, GLIBC_2.1);
+default_symbol_version (_IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2.1);
+#else
+# ifdef strong_alias
+strong_alias (_IO_new_do_write, _IO_do_write);
+strong_alias (_IO_new_file_attach, _IO_file_attach);
+strong_alias (_IO_new_file_close_it, _IO_file_close_it);
+strong_alias (_IO_new_file_finish, _IO_file_finish);
+strong_alias (_IO_new_file_fopen, _IO_file_fopen);
+strong_alias (_IO_new_file_init, _IO_file_init);
+strong_alias (_IO_new_file_setbuf, _IO_file_setbuf);
+strong_alias (_IO_new_file_sync, _IO_file_sync);
+strong_alias (_IO_new_file_overflow, _IO_file_overflow);
+strong_alias (_IO_new_file_seekoff, _IO_file_seekoff);
+strong_alias (_IO_new_file_underflow, _IO_file_underflow);
+strong_alias (_IO_new_file_write, _IO_file_write);
+strong_alias (_IO_new_file_xsputn, _IO_file_xsputn);
+# endif
+#endif
Index: libio/libioP.h
===================================================================
RCS file: /home/work/cvs/gnu/glibc/libio/libioP.h,v
retrieving revision 1.1.1.14
diff -u -p -r1.1.1.14 libioP.h
--- libio/libioP.h 1998/07/22 03:05:02 1.1.1.14
+++ libio/libioP.h 1998/08/17 19:02:08
@@ -340,6 +340,7 @@ extern struct _IO_jump_t _IO_streambuf_j
extern struct _IO_jump_t _IO_proc_jumps;
extern struct _IO_jump_t _IO_str_jumps;
extern int _IO_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
+extern int _IO_new_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
extern int _IO_old_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
extern int _IO_flush_all __P ((void));
extern int _IO_cleanup __P ((void));
@@ -388,6 +389,21 @@ extern int _IO_file_sync __P ((_IO_FILE
extern int _IO_file_close_it __P ((_IO_FILE *));
extern _IO_fpos64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
extern void _IO_file_finish __P ((_IO_FILE *, int));
+
+extern _IO_FILE* _IO_new_file_attach __P ((_IO_FILE *, int));
+extern int _IO_new_file_close_it __P ((_IO_FILE *));
+extern void _IO_new_file_finish __P ((_IO_FILE *, int));
+extern _IO_FILE* _IO_new_file_fopen __P ((_IO_FILE *, const char *, const char *,
+ int));
+extern void _IO_new_file_init __P ((_IO_FILE *));
+extern _IO_FILE* _IO_new_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
+extern int _IO_new_file_sync __P ((_IO_FILE *));
+extern int _IO_new_file_underflow __P ((_IO_FILE *));
+extern int _IO_new_file_overflow __P ((_IO_FILE *, int));
+extern _IO_fpos64_t _IO_new_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_ssize_t _IO_new_file_write __P ((_IO_FILE *, const void *,
+ _IO_ssize_t));
+extern _IO_size_t _IO_new_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
extern _IO_FILE* _IO_old_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
extern _IO_fpos64_t _IO_old_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int,
Index: libio/oldfileops.c
===================================================================
RCS file: /home/work/cvs/gnu/glibc/libio/oldfileops.c,v
retrieving revision 1.1.1.7
diff -u -p -r1.1.1.7 oldfileops.c
--- libio/oldfileops.c 1998/06/13 18:31:03 1.1.1.7
+++ libio/oldfileops.c 1998/08/17 19:56:35
@@ -719,5 +719,18 @@ struct _IO_jump_t _IO_old_file_jumps =
JUMP_INIT(stat, _IO_file_stat)
};
+symbol_version (_IO_old_do_write, _IO_do_write, GLIBC_2.0);
+symbol_version (_IO_old_file_attach, _IO_file_attach, GLIBC_2.0);
+symbol_version (_IO_old_file_close_it, _IO_file_close_it, GLIBC_2.0);
+symbol_version (_IO_old_file_finish, _IO_file_finish, GLIBC_2.0);
+symbol_version (_IO_old_file_fopen, _IO_file_fopen, GLIBC_2.0);
+symbol_version (_IO_old_file_init, _IO_file_init, GLIBC_2.0);
+symbol_version (_IO_old_file_setbuf, _IO_file_setbuf, GLIBC_2.0);
+symbol_version (_IO_old_file_sync, _IO_file_sync, GLIBC_2.0);
+symbol_version (_IO_old_file_overflow, _IO_file_overflow, GLIBC_2.0);
+symbol_version (_IO_old_file_seekoff, _IO_file_seekoff, GLIBC_2.0);
+symbol_version (_IO_old_file_underflow, _IO_file_underflow, GLIBC_2.0);
+symbol_version (_IO_old_file_write, _IO_file_write, GLIBC_2.0);
+symbol_version (_IO_old_file_xsputn, _IO_file_xsputn, GLIBC_2.0);
#endif /* PIC && DO_VERSIONING */