]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 4 Nov 2003 09:58:57 +0000 (09:58 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 4 Nov 2003 09:58:57 +0000 (09:58 +0000)
2003-10-27  Daniel Jacobowitz  <drow@mvista.com>

* libio/libioP.h [_IO_USE_OLD_IO_FILE]
(struct _IO_FILE_complete_plus): New type.
* libio/oldiofopen.c (_IO_old_fopen): Use _IO_FILE_complete_plus.
* libio/oldiofdopen.c (_IO_old_fdopen): Likewise.
* libio/oldiopopen.c (struct _IO_proc_file, _IO_old_popen): Likewise.
Call _IO_old_init instead of _IO_init.

ChangeLog
libio/libioP.h
libio/oldiofdopen.c
libio/oldiofopen.c
libio/oldiopopen.c

index 87c47fb0d55abb8d27cd899bfdb61ecc261cd8c6..0013f05bfca15b2e8433e4421ccb0e23dbde00d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-10-27  Daniel Jacobowitz  <drow@mvista.com>
+
+       * libio/libioP.h [_IO_USE_OLD_IO_FILE]
+       (struct _IO_FILE_complete_plus): New type.
+       * libio/oldiofopen.c (_IO_old_fopen): Use _IO_FILE_complete_plus.
+       * libio/oldiofdopen.c (_IO_old_fdopen): Likewise.
+       * libio/oldiopopen.c (struct _IO_proc_file, _IO_old_popen): Likewise.
+       Call _IO_old_init instead of _IO_init.
+
 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
 
        * intl/locale.alias: nb_NO is now the correct name, not no_NO.
index 1e66feaa788b53da600ce30ad850e61d1c526789..3973b03cbdafc602cf115ba45e735aab5e01b831 100644 (file)
@@ -348,6 +348,17 @@ struct _IO_FILE_plus
   const struct _IO_jump_t *vtable;
 };
 
+#ifdef _IO_USE_OLD_IO_FILE
+/* This structure is used by the compatibility code as if it were an
+   _IO_FILE_plus, but has enough space to initialize the _mode argument
+   of an _IO_FILE_complete.  */
+struct _IO_FILE_complete_plus
+{
+  struct _IO_FILE_complete file;
+  const struct _IO_jump_t *vtable;
+};
+#endif
+
 /* Special file type for fopencookie function.  */
 struct _IO_cookie_file
 {
index 824a2fb0cc98db9064ec62f0d4b67479e7c42562..b256000c2cfe6b41d5edad232f08c8f60743d08c 100644 (file)
@@ -48,7 +48,7 @@ _IO_old_fdopen (fd, mode)
   int posix_mode = 0;
   struct locked_FILE
   {
-    struct _IO_FILE_plus fp;
+    struct _IO_FILE_complete_plus fp;
 #ifdef _IO_MTSAFE_IO
     _IO_lock_t lock;
 #endif
@@ -112,24 +112,24 @@ _IO_old_fdopen (fd, mode)
   if (new_f == NULL)
     return NULL;
 #ifdef _IO_MTSAFE_IO
-  new_f->fp.file._lock = &new_f->lock;
+  new_f->fp.file._file._lock = &new_f->lock;
 #endif
-  _IO_old_init (&new_f->fp.file, 0);
-  _IO_JUMPS (&new_f->fp) = &_IO_old_file_jumps;
-  _IO_old_file_init (&new_f->fp);
+  _IO_old_init (&new_f->fp.file._file, 0);
+  _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp) = &_IO_old_file_jumps;
+  _IO_old_file_init ((struct _IO_FILE_plus *) &new_f->fp);
 #if  !_IO_UNIFIED_JUMPTABLES
   new_f->fp.vtable = NULL;
 #endif
-  if (_IO_old_file_attach (&new_f->fp.file, fd) == NULL)
+  if (_IO_old_file_attach (&new_f->fp.file._file, fd) == NULL)
     {
-      INTUSE(_IO_un_link) (&new_f->fp);
+      INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) &new_f->fp);
       free (new_f);
       return NULL;
     }
-  new_f->fp.file._flags &= ~_IO_DELETE_DONT_CLOSE;
+  new_f->fp.file._file._flags &= ~_IO_DELETE_DONT_CLOSE;
 
-  new_f->fp.file._IO_file_flags =
-    _IO_mask_flags (&new_f->fp.file, read_write,
+  new_f->fp.file._file._IO_file_flags =
+    _IO_mask_flags (&new_f->fp.file._file, read_write,
                    _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
 
   return (_IO_FILE *) &new_f->fp;
index 29c0a18a21860f2734e4cfa7bfa879e23c426627..0370c762f6e7cacd7248ca2e3f7a14a572ba866b 100644 (file)
@@ -42,7 +42,7 @@ _IO_old_fopen (filename, mode)
 {
   struct locked_FILE
   {
-    struct _IO_FILE_plus fp;
+    struct _IO_FILE_complete_plus fp;
 #ifdef _IO_MTSAFE_IO
     _IO_lock_t lock;
 #endif
@@ -51,17 +51,17 @@ _IO_old_fopen (filename, mode)
   if (new_f == NULL)
     return NULL;
 #ifdef _IO_MTSAFE_IO
-  new_f->fp.file._lock = &new_f->lock;
+  new_f->fp.file._file._lock = &new_f->lock;
 #endif
-  _IO_old_init (&new_f->fp.file, 0);
-  _IO_JUMPS (&new_f->fp) = &_IO_old_file_jumps;
-  _IO_old_file_init (&new_f->fp);
+  _IO_old_init (&new_f->fp.file._file, 0);
+  _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fp) = &_IO_old_file_jumps;
+  _IO_old_file_init ((struct _IO_FILE_plus *) &new_f->fp);
 #if  !_IO_UNIFIED_JUMPTABLES
   new_f->fp.vtable = NULL;
 #endif
   if (_IO_old_file_fopen ((_IO_FILE *) &new_f->fp, filename, mode) != NULL)
     return (_IO_FILE *) &new_f->fp;
-  INTUSE(_IO_un_link) (&new_f->fp);
+  INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) &new_f->fp);
   free (new_f);
   return NULL;
 }
index b818af41803265786c33a5c5f3d95d03f3911199..01e8efed080a8d13723de224cc9b620909993671 100644 (file)
@@ -100,7 +100,7 @@ extern int _IO_dup2 __P ((int fd, int fd2));
 
 struct _IO_proc_file
 {
-  struct _IO_FILE_plus file;
+  struct _IO_FILE_complete_plus file;
   /* Following fields must match those in class procbuf (procbuf.h) */
   _IO_pid_t pid;
   struct _IO_proc_file *next;
@@ -219,18 +219,18 @@ _IO_old_popen (command, mode)
   if (new_f == NULL)
     return NULL;
 #ifdef _IO_MTSAFE_IO
-  new_f->fpx.file.file._lock = &new_f->lock;
+  new_f->fpx.file.file._file._lock = &new_f->lock;
 #endif
-  fp = &new_f->fpx.file.file;
-  INTUSE(_IO_init) (fp, 0);
-  _IO_JUMPS (&new_f->fpx.file) = &_IO_old_proc_jumps;
-  _IO_old_file_init (&new_f->fpx.file);
+  fp = &new_f->fpx.file.file._file;
+  _IO_old_init (fp, 0);
+  _IO_JUMPS ((struct _IO_FILE_plus *) &new_f->fpx.file) = &_IO_old_proc_jumps;
+  _IO_old_file_init ((struct _IO_FILE_plus *) &new_f->fpx.file);
 #if  !_IO_UNIFIED_JUMPTABLES
   new_f->fpx.file.vtable = NULL;
 #endif
   if (_IO_old_proc_open (fp, command, mode) != NULL)
     return fp;
-  INTUSE(_IO_un_link) (&new_f->fpx.file);
+  INTUSE(_IO_un_link) ((struct _IO_FILE_plus *) &new_f->fpx.file);
   free (new_f);
   return NULL;
 }