]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 12 Aug 2003 18:40:03 +0000 (18:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 12 Aug 2003 18:40:03 +0000 (18:40 +0000)
2003-08-12  Jakub Jelinek  <jakub@redhat.com>

* libio/libioP.h (_IO_vtable_offset): Define.
* libio/freopen.c (freopen): Use it.
* libio/ioputs.c (_IO_puts): Likewise.
* libio/freopen64.c (freopen64): Likewise.
* libio/genops.c (__underflow, __uflow, _IO_flush_all_lockp):
Likewise.
* libio/iofclose.c (_IO_new_fclose): Likewise.
* libio/iofputs.c (_IO_fputs): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* libio/iofwrite.c (_IO_fwrite): Likewise.
* libio/ioseekoff.c (_IO_seekoff_unlocked): Likewise.
* libio/iosetbuffer.c (_IO_setbuffer): Likewise.
* stdio-common/vfprintf.c (ORIENT, vfprintf): Likewise.
* stdio-common/vfscanf.c (ORIENT): Likewise.

12 files changed:
ChangeLog
libio/freopen.c
libio/freopen64.c
libio/genops.c
libio/iofclose.c
libio/iofputs.c
libio/ioftell.c
libio/iofwrite.c
libio/ioputs.c
libio/ioseekoff.c
libio/iosetbuffer.c
libio/libioP.h

index cb4b111274eed4e9e6285ca3d09b3a0b9685772d..f1ed43c83b86ae6535a8fd4f9a53705bcaffd2ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2003-08-12  Jakub Jelinek  <jakub@redhat.com>
+
+       * libio/libioP.h (_IO_vtable_offset): Define.
+       * libio/freopen.c (freopen): Use it.
+       * libio/ioputs.c (_IO_puts): Likewise.
+       * libio/freopen64.c (freopen64): Likewise.
+       * libio/genops.c (__underflow, __uflow, _IO_flush_all_lockp):
+       Likewise.
+       * libio/iofclose.c (_IO_new_fclose): Likewise.
+       * libio/iofputs.c (_IO_fputs): Likewise.
+       * libio/ioftell.c (_IO_ftell): Likewise.
+       * libio/iofwrite.c (_IO_fwrite): Likewise.
+       * libio/ioseekoff.c (_IO_seekoff_unlocked): Likewise.
+       * libio/iosetbuffer.c (_IO_setbuffer): Likewise.
+       * stdio-common/vfprintf.c (ORIENT, vfprintf): Likewise.
+       * stdio-common/vfscanf.c (ORIENT): Likewise.
+
 2003-08-11  Ulrich Drepper  <drepper@redhat.com>
 
        * assert/assert.h: Use __builtin_expect in assert and
index 7301da7f48a9a088af43c5b2585219730aca17fb..cae9d307cd0a7d52935f8a75405e569a0eecf304 100644 (file)
@@ -69,7 +69,7 @@ freopen (filename, mode, fp)
     {
       INTUSE(_IO_file_close_it) (fp);
       _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
-      if (fp->_vtable_offset == 0 && fp->_wide_data != NULL)
+      if (_IO_vtable_offset (fp) == 0 && fp->_wide_data != NULL)
        fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
       result = INTUSE(_IO_file_fopen) (fp, filename, mode, 1);
       if (result != NULL)
index 4176dd051151d22a34a36e7cc613bbfc1dbb6196..d57994df05d2ad6bb302d556a70df842869b586e 100644 (file)
@@ -54,7 +54,7 @@ freopen64 (filename, mode, fp)
     }
   INTUSE(_IO_file_close_it) (fp);
   _IO_JUMPS ((struct _IO_FILE_plus *) fp) = &_IO_file_jumps;
-  if (fp->_vtable_offset == 0 && fp->_wide_data != NULL)
+  if (_IO_vtable_offset (fp) == 0 && fp->_wide_data != NULL)
     fp->_wide_data->_wide_vtable = &_IO_wfile_jumps;
   result = INTUSE(_IO_file_fopen) (fp, filename, mode, 0);
   if (result != NULL)
index 8077268ba94ed7df466066a09d7b8882027e0e5d..88877ad3f016f11bb86bbfe30b9b833c3663b4e1 100644 (file)
@@ -324,7 +324,7 @@ __underflow (fp)
      _IO_FILE *fp;
 {
 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-  if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1)
+  if (_IO_vtable_offset (fp) == 0 && _IO_fwide (fp, -1) != -1)
     return EOF;
 #endif
 
@@ -357,7 +357,7 @@ __uflow (fp)
      _IO_FILE *fp;
 {
 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-  if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1)
+  if (_IO_vtable_offset (fp) == 0 && _IO_fwide (fp, -1) != -1)
     return EOF;
 #endif
 
@@ -834,7 +834,7 @@ _IO_flush_all_lockp (int do_lock)
 
       if (((fp->_mode <= 0 && fp->_IO_write_ptr > fp->_IO_write_base)
 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-          || (fp->_vtable_offset == 0
+          || (_IO_vtable_offset (fp) == 0
               && fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr
                                    > fp->_wide_data->_IO_write_base))
 #endif
index 62d12244c50ee7cd54e3812282ff85fcfbedebd3..eb01c8875530b49761259e693df48c4617210a4e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,1995,1997-2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995,1997-2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -49,7 +49,7 @@ _IO_new_fclose (fp)
   /* We desperately try to help programs which are using streams in a
      strange way and mix old and new functions.  Detect old streams
      here.  */
-  if (fp->_vtable_offset != 0)
+  if (_IO_vtable_offset (fp) != 0)
     return _IO_old_fclose (fp);
 #endif
 
index 1201735a38bd6282942a12d0b72500b6216b7960..088fd5fd4f69062c5c63057518770cb27412be0f 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,1996,1997,1998,1999,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1998, 1999, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +39,7 @@ _IO_fputs (str, fp)
   CHECK_FILE (fp, EOF);
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  if ((fp->_vtable_offset != 0 || _IO_fwide (fp, -1) == -1)
+  if ((_IO_vtable_offset (fp) != 0 || _IO_fwide (fp, -1) == -1)
       && _IO_sputn (fp, str, len) == len)
     result = 1;
   _IO_funlockfile (fp);
index fd5da6b61885ac57e8963396fa727b2d607838d2..589a2a274d23f572174eae3d6b6653c4a2375fa2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995-2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1995-2000,2001,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +41,7 @@ _IO_ftell (fp)
   pos = _IO_seekoff_unlocked (fp, 0, _IO_seek_cur, 0);
   if (_IO_in_backup (fp))
     {
-      if (fp->_vtable_offset != 0 || fp->_mode <= 0)
+      if (_IO_vtable_offset (fp) != 0 || fp->_mode <= 0)
        pos -= fp->_IO_save_end - fp->_IO_save_base;
     }
   _IO_funlockfile (fp);
index 67ed6a1f1252b2c59eb75f6ffe8e04abce77294d..6f0d273574c2c696de634b9bf7de2b23f667d050 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,96,97,98,99,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -41,7 +42,7 @@ _IO_fwrite (buf, size, count, fp)
     return 0;
   _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
   _IO_flockfile (fp);
-  if (fp->_vtable_offset != 0 || _IO_fwide (fp, -1) == -1)
+  if (_IO_vtable_offset (fp) != 0 || _IO_fwide (fp, -1) == -1)
     written = _IO_sputn (fp, (const char *) buf, request);
   _IO_funlockfile (fp);
   _IO_cleanup_region_end (0);
index 8a9a595f90aa92086c0fd30c411b4e37d2c467ef..f878ea6b5599898b7f37519ecd3cd7e843f34fdd 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1993,1996,1997,1998,1999,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,8 @@ _IO_puts (str)
                            _IO_stdout);
   _IO_flockfile (_IO_stdout);
 
-  if ((_IO_stdout->_vtable_offset != 0 || _IO_fwide (_IO_stdout, -1) == -1)
+  if ((_IO_vtable_offset (_IO_stdout) != 0
+       || _IO_fwide (_IO_stdout, -1) == -1)
       && _IO_sputn (_IO_stdout, str, len) == len
       && _IO_putc_unlocked ('\n', _IO_stdout) != EOF)
     result = len + 1;
index 09c138869e53a54bfa2a7789e079f888a61650e8..9229166705f6ad38bcbc96822761ee065608be14 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,1997,1998,1999,2001,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -56,7 +57,7 @@ _IO_seekoff_unlocked (fp, offset, dir, mode)
     {
       if (dir == _IO_seek_cur && _IO_in_backup (fp))
        {
-         if (fp->_vtable_offset != 0 || fp->_mode <= 0)
+         if (_IO_vtable_offset (fp) != 0 || fp->_mode <= 0)
            offset -= fp->_IO_read_end - fp->_IO_read_ptr;
          else
            abort ();
index 785fcab4bd4fee5cdc4a8c538eb799c6bf8c5169..2497304076c614d4298fece180cffca7af398c9c 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1993,95,96,97,98,99,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -40,7 +41,7 @@ _IO_setbuffer (fp, buf, size)
   if (!buf)
     size = 0;
   (void) _IO_SETBUF (fp, buf, size);
-  if (fp->_vtable_offset == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp))
+  if (_IO_vtable_offset (fp) == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp))
     /* We also have to set the buffer using the wide char function.  */
     (void) _IO_WSETBUF (fp, buf, size);
   _IO_funlockfile (fp);
index 38daa1daff677cbe7405cde3225a7abf8ac63d0c..1d30eef5cd7f0f06b776f845aa2e5755b150edf8 100644 (file)
@@ -110,8 +110,10 @@ extern "C" {
 # define _IO_JUMPS_FUNC(THIS) \
  (*(struct _IO_jump_t **) ((void *) &_IO_JUMPS ((struct _IO_FILE_plus *) (THIS)) \
                           + (THIS)->_vtable_offset))
+# define _IO_vtable_offset(THIS) (THIS)->_vtable_offset
 #else
 # define _IO_JUMPS_FUNC(THIS) _IO_JUMPS ((struct _IO_FILE_plus *) (THIS))
+# define _IO_vtable_offset(THIS) 0
 #endif
 #define _IO_WIDE_JUMPS_FUNC(THIS) _IO_WIDE_JUMPS(THIS)
 #ifdef _G_USING_THUNKS