summaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-23 18:23:26 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-23 18:23:26 +0000
commitb259e74660448b2c316b90fed293f479f70ef56a (patch)
treeacebd733f1d3dad459c49d5441e7f51d48dce28a /libio
parentc0bc2709b6fb301260f20c84cc22d627113192fd (diff)
Update.
1998-08-23 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/Versions [GLIBC_2.1]: Add __modify_ldt and modify_ldt. * sysdeps/unix/sysv/linux/i386/syscalls.list: Add modify_ldt. * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Use orl $-1 instead of movl $-1 to save two bytes. * sysdeps/unix/sysv/linux/i386/i686/sysdep.h (SYSCALL_ERROR_HANDLER): Likewise. 1998-08-17 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. 1998-08-23 Richard Henderson <rth@cygnus.com> * Makeconfig (LDFLAGS): Remove. * csu/initfini.c: Return to .text before __gmon_start__. * elf/elf.h (EM_FAKE_ALPHA): Rename from EM_OLD_ALPHA. (STO_MIPS_*): Rename from STO_*. (STB_MIPS_SPLIT_COMMON): Rename from STB_SPLIT_COMMON. (STO_ALPHA_NOPV, STO_ALPHA_STD_GPLOAD): New. * math/atest-exp.c (mpn_bitsize): Fix bit location calculation. (main): e3s is negative on zero. * math/atest-exp2.c: Likewise. * math/atest-sincos.c: Likewise. 1998-08-23 Andreas Jaeger <aj@arthur.rhein-neckar.de> * Makerules (install): Add comment about absolute paths. 1998-08-23 Ulrich Drepper <drepper@cygnus.com> * libio/vsnprintf.c (_IO_vsnprintf): Set first byte of destination array to NUL to handle maxlen==1 case correctly. Patch by HJ Lu. 1998-08-23 Richard Henderson <rth@cygnus.com>
Diffstat (limited to 'libio')
-rw-r--r--libio/Versions6
-rw-r--r--libio/fileops.c77
-rw-r--r--libio/libioP.h16
-rw-r--r--libio/oldfileops.c13
-rw-r--r--libio/vsnprintf.c1
5 files changed, 91 insertions, 22 deletions
diff --git a/libio/Versions b/libio/Versions
index 7cc09454c3..c9d74d3773 100644
--- a/libio/Versions
+++ b/libio/Versions
@@ -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;
diff --git a/libio/fileops.c b/libio/fileops.c
index 5a5f9d9db2..a2017f23bc 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -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, prot, read_write, is32not64)
}
_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, is32not64)
}
_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;
@@ -664,7 +664,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;
@@ -688,7 +688,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;
@@ -761,7 +761,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;
@@ -865,23 +865,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
diff --git a/libio/libioP.h b/libio/libioP.h
index 004c95ab8d..bf5638fb19 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -340,6 +340,7 @@ extern struct _IO_jump_t _IO_streambuf_jumps;
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));
@@ -389,6 +390,21 @@ 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,
int));
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index ae710b1539..59de8d8818 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -721,5 +721,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 */
diff --git a/libio/vsnprintf.c b/libio/vsnprintf.c
index 5ac2317579..e223e5dec2 100644
--- a/libio/vsnprintf.c
+++ b/libio/vsnprintf.c
@@ -124,6 +124,7 @@ _IO_vsnprintf (string, maxlen, format, args)
_IO_init ((_IO_FILE *) &sf, 0);
_IO_JUMPS ((_IO_FILE *) &sf) = &_IO_strn_jumps;
+ string[0] = '\0';
_IO_str_init_static ((_IO_FILE *) &sf, string, maxlen - 1, string);
ret = _IO_vfprintf ((_IO_FILE *) &sf, format, args);