summary refs log tree commit diff
path: root/libio/iofopncook.c
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-06-29 07:16:42 +0000
committerGreg McGary <greg@mcgary.org>2000-06-29 07:16:42 +0000
commit2ca8b1eef9c8b5ee2083bfbd8fd055353ab206ba (patch)
tree67d524af4cf749ac76e443a42123eaf2d14ca0dd /libio/iofopncook.c
parent2e23c3cc3fede8cc080af74f1b4f124b12955138 (diff)
downloadglibc-2ca8b1eef9c8b5ee2083bfbd8fd055353ab206ba.tar.gz
glibc-2ca8b1eef9c8b5ee2083bfbd8fd055353ab206ba.tar.xz
glibc-2ca8b1eef9c8b5ee2083bfbd8fd055353ab206ba.zip
2000-06-28 Greg McGary <greg@mcgary.org>
	* libio/libio.h (struct _IO_cookie_file): Move struct type defintion out.
	(_IO_FILE): Declare chain as (struct _IO_FILE_plus *).
	* libio/libioP.h (struct _IO_cookie_file): Move struct type defintion in.
	(_IO_JUMPS): Don't cast THIS--expect arg to be a (struct _IO_FILE_plus *).
	(_IO_JUMPS_FUNC): Express in terms of _IO_JUMPS, and add cast to
	THIS, since _IO_JUMPS no longer does it implicitly.
	(_IO_file_init, _IO_old_file_init, _IO_new_file_init): Declare
	arg type as (struct _IO_FILE_plus *).
	(_IO_str_init_static, _IO_str_init_readonly): Declare 1st
	arg as (_IO_strfile *).
	* libio/strops.c (_IO_str_init_static, _IO_str_init_readonly):
	Declare 1st arg as (_IO_strfile *).
	* libio/fileops.c (_IO_new_file_init): Declare
	arg type as (struct _IO_FILE_plus *).
	* libio/oldfileops.c (_IO_old_file_init): Likewise.
	* libio/genops.c (_IO_link_in, _IO_un_link): Likewise.
	(_IO_flush_all, _IO_flush_all_linebuffered, _IO_unbuffer_write):
	Declare iteration pointer as (struct _IO_FILE_plus *).
	(_IO_iter_next, _IO_iter_file): _IO_ITER is now (struct _IO_FILE_plus *).
	* libio/stdfiles.c (_IO_list_all): Declare as (struct _IO_FILE_plus *).
	* libio/oldstdfiles.c (_IO_list_all): Likewise.
	(_IO_check_libio): Set user-visible handles to (struct _IO_FILE_plus *).
	* libio/stdio.c (stdin, stdout, stderr): Set user-visible handles
	to (struct _IO_FILE_plus *).

	* libio/iofdopen.c (_IO_new_fdopen): Pass FILE handle pointer
	whose high bound includes vtable to all functions that will use
	vtable.  For streambufs, pass pointer whose bounds include struct
	_IO_strfile.
	* libio/wgenops.c (_IO_wdefault_finish): Likewise.
	* libio/oldiofdopen.c (_IO_old_fdopen): Likewise.
	* libio/iofopen.c (_IO_new_fopen): Likewise.
	* libio/oldiofopen.c (_IO_old_fopen): Likewise.
	* libio/iofopen64.c (_IO_fopen64): Likewise.
	* libio/iopopen.c (_IO_new_popen): Likewise.
	* libio/oldiopopen.c (_IO_old_popen): Likewise.
	* libio/memstream.c (open_memstream): Likewise.
	* libio/iovsscanf.c (_IO_vsscanf): Likewise.
	* libio/iovsprintf.c (_IO_vsprintf): Likewise.
	* libio/iovdprintf.c (_IO_vdprintf): Likewise.
	* libio/iofopncook.c (_IO_cookie_init): Likewise.
	* libio/obprintf.c (_IO_obstack_vprintf): Likewise.
	* libio/vasprintf.c (_IO_vasprintf): Likewise.
	* libio/vsnprintf.c (_IO_vsnprintf): Likewise.
	* libio/stdfiles.c (_IO_stdout_, _IO_stderr_): Likewise.
	* libio/oldstdfiles.c (_IO_stdout_, _IO_stderr_): Likewise.
	* stdlib/strfmon.c (__strfmon_l): Likewise.
	* stdio-common/vfprintf.c (buffered_vfprintf): Likewise.
	(vfprintf): Qualify computed-goto targets as unbounded.
2000-06-28  Greg McGary  <greg@mcgary.org>

	* libio/libio.h (struct _IO_cookie_file): Move struct type defintion out.
	(_IO_FILE): Declare chain as (struct _IO_FILE_plus *).
	* libio/libioP.h (struct _IO_cookie_file): Move struct type defintion in.
	(_IO_JUMPS): Don't cast THIS--expect arg to be a (struct _IO_FILE_plus *).
	(_IO_JUMPS_FUNC): Express in terms of _IO_JUMPS, and add cast to
	THIS, since _IO_JUMPS no longer does it implicitly.
	(_IO_file_init, _IO_old_file_init, _IO_new_file_init): Declare
	arg type as (struct _IO_FILE_plus *).
	(_IO_str_init_static, _IO_str_init_readonly): Declare 1st
	arg as (_IO_strfile *).
	* libio/strops.c (_IO_str_init_static, _IO_str_init_readonly):
	Declare 1st arg as (_IO_strfile *).
	* libio/fileops.c (_IO_new_file_init): Declare
	arg type as (struct _IO_FILE_plus *).
	* libio/oldfileops.c (_IO_old_file_init): Likewise.
	* libio/genops.c (_IO_link_in, _IO_un_link): Likewise.
	(_IO_flush_all, _IO_flush_all_linebuffered, _IO_unbuffer_write):
	Declare iteration pointer as (struct _IO_FILE_plus *).
	(_IO_iter_next, _IO_iter_file): _IO_ITER is now (struct _IO_FILE_plus *).
	* libio/stdfiles.c (_IO_list_all): Declare as (struct _IO_FILE_plus *).
	* libio/oldstdfiles.c (_IO_list_all): Likewise.
	(_IO_check_libio): Set user-visible handles to (struct _IO_FILE_plus *).
	* libio/stdio.c (stdin, stdout, stderr): Set user-visible handles
	to (struct _IO_FILE_plus *).

	* libio/iofdopen.c (_IO_new_fdopen): Pass FILE handle pointer
	whose high bound includes vtable to all functions that will use
	vtable.  For streambufs, pass pointer whose bounds include struct
	_IO_strfile.
	* libio/wgenops.c (_IO_wdefault_finish): Likewise.
	* libio/oldiofdopen.c (_IO_old_fdopen): Likewise.
	* libio/iofopen.c (_IO_new_fopen): Likewise.
	* libio/oldiofopen.c (_IO_old_fopen): Likewise.
	* libio/iofopen64.c (_IO_fopen64): Likewise.
	* libio/iopopen.c (_IO_new_popen): Likewise.
	* libio/oldiopopen.c (_IO_old_popen): Likewise.
	* libio/memstream.c (open_memstream): Likewise.
	* libio/iovsscanf.c (_IO_vsscanf): Likewise.
	* libio/iovsprintf.c (_IO_vsprintf): Likewise.
	* libio/iovdprintf.c (_IO_vdprintf): Likewise.
	* libio/iofopncook.c (_IO_cookie_init): Likewise.
	* libio/obprintf.c (_IO_obstack_vprintf): Likewise.
	* libio/vasprintf.c (_IO_vasprintf): Likewise.
	* libio/vsnprintf.c (_IO_vsnprintf): Likewise.
	* libio/stdfiles.c (_IO_stdout_, _IO_stderr_): Likewise.
	* libio/oldstdfiles.c (_IO_stdout_, _IO_stderr_): Likewise.
	* stdlib/strfmon.c (__strfmon_l): Likewise.
	* stdio-common/vfprintf.c (buffered_vfprintf): Likewise.
	(vfprintf): Qualify computed-goto targets as unbounded.
Diffstat (limited to 'libio/iofopncook.c')
-rw-r--r--libio/iofopncook.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index 852a483a49..c016cfb1d5 100644
--- a/libio/iofopncook.c
+++ b/libio/iofopncook.c
@@ -121,22 +121,22 @@ void
 _IO_cookie_init (struct _IO_cookie_file *cfile, int read_write,
 		 void *cookie, _IO_cookie_io_functions_t io_functions)
 {
-  _IO_init (&cfile->__file, 0);
-  _IO_JUMPS (&cfile->__file) = &_IO_cookie_jumps;
+  _IO_init (&cfile->__fp.file, 0);
+  _IO_JUMPS (&cfile->__fp) = &_IO_cookie_jumps;
 
   cfile->__cookie = cookie;
   cfile->__io_functions = io_functions;
 
-  _IO_file_init(&cfile->__file);
+  _IO_file_init(&cfile->__fp);
 
-  cfile->__file._IO_file_flags =
-    _IO_mask_flags (&cfile->__file, read_write,
+  cfile->__fp.file._IO_file_flags =
+    _IO_mask_flags (&cfile->__fp.file, read_write,
 		    _IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
 
   /* We use a negative number different from -1 for _fileno to mark that
      this special stream is not associated with a real file, but still has
      to be treated as such.  */
-  cfile->__file._fileno = -2;
+  cfile->__fp.file._fileno = -2;
 }
 
 
@@ -176,12 +176,12 @@ _IO_fopencookie (cookie, mode, io_functions)
   if (new_f == NULL)
     return NULL;
 #ifdef _IO_MTSAFE_IO
-  new_f->cfile.__file._lock = &new_f->lock;
+  new_f->cfile.__fp.file._lock = &new_f->lock;
 #endif
 
   _IO_cookie_init (&new_f->cfile, read_write, cookie, io_functions);
 
-  return &new_f->cfile.__file;
+  return (_IO_FILE *) &new_f->cfile.__fp;
 }
 
 versioned_symbol (libc, _IO_fopencookie, fopencookie, GLIBC_2_2);
@@ -245,7 +245,7 @@ _IO_old_fopencookie (cookie, mode, io_functions)
 
   ret = _IO_fopencookie (cookie, mode, io_functions);
   if (ret != NULL)
-    _IO_JUMPS (ret) = &_IO_old_cookie_jumps;
+    _IO_JUMPS ((struct _IO_FILE_plus *) ret) = &_IO_old_cookie_jumps;
 
   return ret;
 }