]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 5 Nov 2002 08:43:05 +0000 (08:43 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 5 Nov 2002 08:43:05 +0000 (08:43 +0000)
2002-11-05  Ulrich Drepper  <drepper@redhat.com>

* libio/ioseekoff.c: Remove INTDEF.  Define _IO_seekoff_unlocked.  Same
as old code without locking.  _IO_seekoff calls this function after
locking the stream.
* libio/ioseekpos.c: Likewise for _IO_seekpos.
* libio/libioP.h: Replace _IO_seekoff_internal and _IO_seekpos_internal
prototypes with _IO_seekoff_unlocked and _IO_seekpos_unlocked
prototypes.
* libio/iolibio.h (_IO_fseek): Call _IO_seekoff_unlocked instead
of _IO_seekoff_internal.
(_IO_rewind): Likewise.
* libio/ioftell.c: Likewise.
* libio/ftello.c: Likewise.
* libio/ftello64.c: Likewise.
* libio/iofgetpos.c: Likewise.
* libio/iofgetpos64.c: Likewise.
* libio/oldiofgetpos.c: Likewise.
* libio/oldiofgetpos64.c: Likewise.
* libio/iofsetpos.c: Call _IO_seekpos_unlocked instead of
_IO_seekpos_internal.
* libio/iofsetpos64.c: Likewise.
* libio/oldiofsetpos.c: Likewise.
* libio/oldiofsetpos64.c: Likewise.

* libio/wfileops.c (_IO_wfile_seekoff): Don't modify _offset and
_wide_data->_IO_read_end if adjustment can be made in the current
buffer.

17 files changed:
ChangeLog
NEWS
libio/ftello.c
libio/ftello64.c
libio/iofgetpos.c
libio/iofgetpos64.c
libio/iofsetpos.c
libio/iofsetpos64.c
libio/ioftell.c
libio/iolibio.h
libio/ioseekoff.c
libio/ioseekpos.c
libio/libioP.h
libio/oldiofgetpos.c
libio/oldiofgetpos64.c
libio/oldiofsetpos.c
libio/oldiofsetpos64.c

index 3da0f0f2486ce1c0da87356e1b65bce8ea728a3a..2714b51d52000a204d85e44831c268bf61f6d725 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2002-11-05  Ulrich Drepper  <drepper@redhat.com>
+
+       * libio/ioseekoff.c: Remove INTDEF.  Define _IO_seekoff_unlocked.  Same
+       as old code without locking.  _IO_seekoff calls this function after
+       locking the stream.
+       * libio/ioseekpos.c: Likewise for _IO_seekpos.
+       * libio/libioP.h: Replace _IO_seekoff_internal and _IO_seekpos_internal
+       prototypes with _IO_seekoff_unlocked and _IO_seekpos_unlocked
+       prototypes.
+       * libio/iolibio.h (_IO_fseek): Call _IO_seekoff_unlocked instead
+       of _IO_seekoff_internal.
+       (_IO_rewind): Likewise.
+       * libio/ioftell.c: Likewise.
+       * libio/ftello.c: Likewise.
+       * libio/ftello64.c: Likewise.
+       * libio/iofgetpos.c: Likewise.
+       * libio/iofgetpos64.c: Likewise.
+       * libio/oldiofgetpos.c: Likewise.
+       * libio/oldiofgetpos64.c: Likewise.
+       * libio/iofsetpos.c: Call _IO_seekpos_unlocked instead of
+       _IO_seekpos_internal.
+       * libio/iofsetpos64.c: Likewise.
+       * libio/oldiofsetpos.c: Likewise.
+       * libio/oldiofsetpos64.c: Likewise.
+
 2002-11-04  Roland McGrath  <roland@redhat.com>
 
        * sysdeps/unix/sysv/linux/powerpc/chown.c: Use INLINE_SYSCALL macro.
 
 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
 
+       * libio/wfileops.c (_IO_wfile_seekoff): Don't modify _offset and
+       _wide_data->_IO_read_end if adjustment can be made in the current
+       buffer.
+
        * sysdeps/unix/sysv/linux/fexecve.c: New file.
 
        * libio/bug-wfflush.c (do_test): Using fseek is not allowed when
diff --git a/NEWS b/NEWS
index f8550a15abbe79959ee4307ed99c67064e891183..249b69fb5d35dd9486e41971ad868cdbf646a523 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2002-10-13
+GNU C Library NEWS -- history of user-visible changes.  2002-11-5
 Copyright (C) 1992-2001, 2002 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -15,6 +15,8 @@ Version 2.3.2
 
 * The new dynamic string token $LIB is expanded in shared library names.
   This normally expands to lib, but on some 64-bit platforms to lib64 instead.
+
+* fexecve is implemented on Linux.
 \f
 Version 2.3
 
index 94a2541b25153dc384aaaa9a32b105a3aea67aec..e14866408fef5af63709122686a76724219a7dea 100644 (file)
@@ -39,7 +39,7 @@ ftello (fp)
   CHECK_FILE (fp, -1L);
   _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     {
       if (fp->_mode <= 0)
index bbf77679f36d652debf451a835a7c78ab3383592..b2da11d133e3e45255601336aa08ab8f4415032a 100644 (file)
@@ -40,7 +40,7 @@ ftello64 (fp)
   CHECK_FILE (fp, -1L);
   _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     {
       if (fp->_mode <= 0)
index 4b50898a0725c7df1e30f4cf31da1b4b89889c12..0c80b2fae5156c9f7c24316f16da04d742de3db0 100644 (file)
@@ -40,7 +40,7 @@ _IO_new_fgetpos (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     {
       if (fp->_mode <= 0)
index 525a75c7efbaa491e8985643c4e5269575a18973..3ad7e11cd05b64e458205b4b0ace67406b1de31c 100644 (file)
@@ -40,7 +40,7 @@ _IO_new_fgetpos64 (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     {
       if (fp->_mode <= 0)
index 3c3e61db5766862dc7fb2318219c8ccac1620f87..f3821e2fa556d0665dfb84f5ce749dc3928b41b3 100644 (file)
@@ -38,7 +38,7 @@ _IO_new_fsetpos (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
+  if (_IO_seekpos_unlocked (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
       == _IO_pos_BAD)
     {
       /* ANSI explicitly requires setting errno to a positive value on
index f8c5374d17f08f402cd397f396a2f14322121462..4746d720c36612bc8e7eac407149aee2a164a029 100644 (file)
@@ -39,7 +39,7 @@ _IO_new_fsetpos64 (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
+  if (_IO_seekpos_unlocked (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
       == _IO_pos_BAD)
     {
       /* ANSI explicitly requires setting errno to a positive value on
index 2a389c37be449f42971101e691c62b63b5e96ba6..fd5da6b61885ac57e8963396fa727b2d607838d2 100644 (file)
@@ -38,7 +38,7 @@ _IO_ftell (fp)
   CHECK_FILE (fp, -1L);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     {
       if (fp->_vtable_offset != 0 || fp->_mode <= 0)
index 80fb527d88d330c82fd0980f608be1ac96ad5e3f..db71be25c8040572e1bf59b3d3602cc7dbde020e 100644 (file)
@@ -56,10 +56,10 @@ extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
 #endif
 #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
 #define _IO_fseek(__fp, __offset, __whence) \
-  (INTUSE(_IO_seekoff)(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) \
+  (_IO_seekoff_unlocked (__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) \
    == _IO_pos_BAD ? EOF : 0)
 #define _IO_rewind(FILE) \
-  (void)INTUSE(_IO_seekoff)(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
+  (void) _IO_seekoff_unlocked (FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
 #define _IO_vprintf(FORMAT, ARGS) \
   INTUSE(_IO_vfprintf) (_IO_stdout, FORMAT, ARGS)
 #define _IO_freopen(FILENAME, MODE, FP) \
index eff6d3874d736b3b07d9619b7ce3d45ff726f556..09c138869e53a54bfa2a7789e079f888a61650e8 100644 (file)
@@ -36,14 +36,12 @@ extern int errno;
 #endif
 
 _IO_off64_t
-_IO_seekoff (fp, offset, dir, mode)
+_IO_seekoff_unlocked (fp, offset, dir, mode)
      _IO_FILE *fp;
      _IO_off64_t offset;
      int dir;
      int mode;
 {
-  _IO_off64_t retval;
-
   if (dir != _IO_seek_cur && dir != _IO_seek_set && dir != _IO_seek_end)
     {
       __set_errno (EINVAL);
@@ -53,9 +51,6 @@ _IO_seekoff (fp, offset, dir, mode)
   /* If we have a backup buffer, get rid of it, since the __seekoff
      callback may not know to do the right thing about it.
      This may be over-kill, but it'll do for now. TODO */
-  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
-  _IO_flockfile (fp);
-
   if (mode != 0 && ((_IO_fwide (fp, 0) < 0 && _IO_have_backup (fp))
                    || (_IO_fwide (fp, 0) > 0 && _IO_have_wbackup (fp))))
     {
@@ -72,10 +67,25 @@ _IO_seekoff (fp, offset, dir, mode)
        INTUSE(_IO_free_wbackup_area) (fp);
     }
 
-  retval = _IO_SEEKOFF (fp, offset, dir, mode);
+  return _IO_SEEKOFF (fp, offset, dir, mode);
+}
+
+
+_IO_off64_t
+_IO_seekoff (fp, offset, dir, mode)
+     _IO_FILE *fp;
+     _IO_off64_t offset;
+     int dir;
+     int mode;
+{
+  _IO_off64_t retval;
+
+  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
+  _IO_flockfile (fp);
+
+  retval = _IO_seekoff_unlocked (fp, offset, dir, mode);
 
   _IO_funlockfile (fp);
   _IO_cleanup_region_end (0);
   return retval;
 }
-INTDEF(_IO_seekoff)
index 8aa151a41eec56b3e2c0426e97af3a47da821ab9..37d32af340c3a2339fb587c406b5122c4c63204f 100644 (file)
 #include <libioP.h>
 
 _IO_off64_t
-_IO_seekpos (fp, pos, mode)
+_IO_seekpos_unlocked (fp, pos, mode)
      _IO_FILE *fp;
      _IO_off64_t pos;
      int mode;
 {
-  _IO_off64_t retval;
-
   /* If we have a backup buffer, get rid of it, since the __seekoff
      callback may not know to do the right thing about it.
      This may be over-kill, but it'll do for now. TODO */
-  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
-  _IO_flockfile (fp);
-
   if (_IO_fwide (fp, 0) <= 0)
     {
       if (_IO_have_backup (fp))
@@ -52,10 +47,24 @@ _IO_seekpos (fp, pos, mode)
        INTUSE(_IO_free_wbackup_area) (fp);
     }
 
-  retval = _IO_SEEKPOS (fp, pos, mode);
+  return _IO_SEEKPOS (fp, pos, mode);
+}
+
+
+_IO_off64_t
+_IO_seekpos (fp, pos, mode)
+     _IO_FILE *fp;
+     _IO_off64_t pos;
+     int mode;
+{
+  _IO_off64_t retval;
+
+  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
+  _IO_flockfile (fp);
+
+  retval = _IO_seekpos_unlocked (fp, pos, mode);
 
   _IO_funlockfile (fp);
   _IO_cleanup_region_end (0);
   return retval;
 }
-INTDEF(_IO_seekpos)
index 9cdfebceb15d833d1cc509c187333914a47c2514..105ffccecc680911ca402e06851bebb85047fd03 100644 (file)
@@ -730,8 +730,10 @@ extern int _IO_vfprintf_internal (_IO_FILE *__restrict, const char *__restrict,
                                  _IO_va_list);
 extern void _IO_doallocbuf_internal __P ((_IO_FILE *));
 extern void _IO_wsetb_internal __P ((_IO_FILE *, wchar_t *, wchar_t *, int));
-extern _IO_off64_t _IO_seekoff_internal (_IO_FILE *, _IO_off64_t, int, int);
-extern _IO_off64_t _IO_seekpos_internal (_IO_FILE *, _IO_off64_t, int);
+extern _IO_off64_t _IO_seekoff_unlocked (_IO_FILE *, _IO_off64_t, int, int)
+     attribute_hidden;
+extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int)
+     attribute_hidden;
 extern int _IO_putc_internal (int __c, _IO_FILE *__fp);
 extern void _IO_init_internal __P ((_IO_FILE *, int));
 extern void _IO_un_link_internal __P ((struct _IO_FILE_plus *));
index 0d6d1878fdb2794785d4c50f5ca17423116c0e1b..596c40599f7b67716ce16ee7e98eb1f962e3aac9 100644 (file)
@@ -40,7 +40,7 @@ _IO_old_fgetpos (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     pos -= fp->_IO_save_end - fp->_IO_save_base;
   _IO_funlockfile (fp);
index b7fecbd4269ec4f2df537d50fc02f9f858a8e3f5..4a38c38e86bc7531f74d5a66f388c4ee9b1a111f 100644 (file)
@@ -41,7 +41,7 @@ _IO_old_fgetpos64 (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  pos = INTUSE(_IO_seekoff) (fp, 0, _IO_seek_cur, 0);
+  pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     pos -= fp->_IO_save_end - fp->_IO_save_base;
   _IO_funlockfile (fp);
index 39adc5f5a34feb6e81add90bf0bdd72cc35a1063..ce3bb12363b63c440393dce3c9856e095fd0c95c 100644 (file)
@@ -39,7 +39,7 @@ _IO_old_fsetpos (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
+  if (_IO_seekpos_unlocked (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
       == _IO_pos_BAD)
     {
       /* ANSI explicitly requires setting errno to a positive value on
index 88071339e3934b36c049841e5a70e8cb6ce3d22e..834f154c21cc6e993b1d49f6a163030a97af860c 100644 (file)
@@ -41,7 +41,7 @@ _IO_old_fsetpos64 (fp, posp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  if (INTUSE(_IO_seekpos) (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
+  if (_IO_seekpos_unlocked (fp, posp->__pos, _IOS_INPUT|_IOS_OUTPUT)
       == _IO_pos_BAD)
     {
       /* ANSI explicitly requires setting errno to a positive value on