public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Another libio patch
@ 1997-10-10 15:09 H.J. Lu
  1997-10-10 22:58 ` Ulrich Drepper
  1997-10-13  5:49 ` Another libio patch Neal Becker
  0 siblings, 2 replies; 19+ messages in thread
From: H.J. Lu @ 1997-10-10 15:09 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: egcs

Hi,

Please discard my previous libio patch. This patch should
fix both glibc 2 and libc 5. Please let me know the result
on libc 5.3.12 on linux/x86.

Thanks.


-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Thu Oct  9 07:08:41 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
	not defined.

	* filedoalloc.c (_IO_file_doallocate): Don't call
	_IO_cleanup_registration_needed if __linux__ is defined.

	* iofclose.c (fclose): Make it weak alias of _IO_fclose if
	__ELF__ is defined.

	* iovsprintf.c (vsprintf): Make it weak alias of _IO_vsprintf
	if __ELF__ is defined.

	* iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
	__ELF__ is defined.

	* config/linuxlibc1.mt (MT_CFLAGS): Defined as -D_G_HAVE_MMAP.
	(IO_OBJECTS): Add filedoalloc.o fileops.o genops.o iofclose.o
	iovsprintf.o iovsscanf.o strops.o.

Index: libio/filedoalloc.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/filedoalloc.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 filedoalloc.c
--- filedoalloc.c	1997/09/08 01:01:01	1.1.1.2
+++ filedoalloc.c	1997/10/09 19:47:37
@@ -75,7 +75,7 @@
   char *p;
   struct stat st;
 
-#ifndef _LIBC
+#if !defined(_LIBC) && !defined(__linux__)
   /* If _IO_cleanup_registration_needed is non-zero, we should call the
      function it points to.  This is to make sure _IO_cleanup gets called
      on exit.  We call it from _IO_file_doallocate, since that is likely
Index: libio/iofclose.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/iofclose.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 iofclose.c
--- iofclose.c	1997/09/08 01:01:02	1.1.1.2
+++ iofclose.c	1997/10/09 19:02:33
@@ -55,4 +55,8 @@
 
 #ifdef weak_alias
 weak_alias (_IO_fclose, fclose)
+#else
+#ifdef __ELF__
+#pragma weak fclose = _IO_fclose
+#endif
 #endif
Index: libio/iovsprintf.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/iovsprintf.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 iovsprintf.c
--- iovsprintf.c	1997/09/08 01:01:05	1.1.1.2
+++ iovsprintf.c	1997/10/09 19:03:52
@@ -54,4 +54,8 @@
 
 #ifdef weak_alias
 weak_alias (_IO_vsprintf, vsprintf)
+#else
+#ifdef __ELF__
+#pragma weak vsprintf = _IO_vsprintf
+#endif
 #endif
Index: libio/iovsscanf.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/iovsscanf.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 iovsscanf.c
--- iovsscanf.c	1997/09/08 01:01:05	1.1.1.2
+++ iovsscanf.c	1997/10/09 19:03:29
@@ -51,4 +51,8 @@
 #ifdef weak_alias
 weak_alias (_IO_vsscanf, __vsscanf)
 weak_alias (_IO_vsscanf, vsscanf)
+#else
+#ifdef __ELF__
+#pragma weak vsscanf = _IO_vsscanf
+#endif
 #endif
Index: libio/libio.h
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/libio.h,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 libio.h
--- libio.h	1997/10/09 17:31:37	1.1.1.6
+++ libio.h	1997/10/10 21:53:01
@@ -157,15 +157,17 @@
 # endif
 #else
 /* XXX This will go away as soon as comthread is finished.  */
-# ifdef __linux__
+# if defined __GLIBC__ && __GLIBC__ >= 2
+#  define _IO_LOCK_T void *
+# else
+#  ifdef __linux__
 struct _IO_lock_t {
   void *ptr;
   short int field1;
   short int field2;
 };
-#  define _IO_LOCK_T struct _IO_lock_t
-# else
-typedef void _IO_lock_t;
+#   define _IO_LOCK_T struct _IO_lock_t
+#  endif
 # endif
 #endif
 
Index: libio/config/linuxlibc1.mt
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/config/linuxlibc1.mt,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 linuxlibc1.mt
--- linuxlibc1.mt	1997/10/09 17:31:39	1.1.1.3
+++ linuxlibc1.mt	1997/10/09 19:38:44
@@ -9,7 +9,9 @@
 LIBIO_INCLUDE=
 
 # We have those in libc.a.
-IO_OBJECTS=iogetc.o ioputc.o iofeof.o ioferror.o
+IO_OBJECTS=iogetc.o ioputc.o iofeof.o ioferror.o \
+	filedoalloc.o fileops.o genops.o iofclose.o \
+	iovsprintf.o iovsscanf.o strops.o
 STDIO_WRAP_OBJECTS=
 OSPRIM_OBJECTS=
 STDIO_OBJECTS=
@@ -19,3 +21,6 @@
 	indstream.h iomanip.h iostream.h istream.h ostream.h \
 	parsestream.h pfstream.h procbuf.h stdiostream.h stream.h \
 	streambuf.h strfile.h strstream.h
+
+# A bad kludge
+MT_CFLAGS=-D_G_HAVE_MMAP

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Another libio patch
@ 1997-11-17 13:18 H.J. Lu
  1997-11-17 13:57 ` Jeffrey A Law
  0 siblings, 1 reply; 19+ messages in thread
From: H.J. Lu @ 1997-11-17 13:18 UTC (permalink / raw)
  To: egcs; +Cc: Ulrich Drepper

Here is another libio patch.

-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Mon Nov 17 08:39:17 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* stdstrbufs.cc (DEF_STDFILE): Use STD_VTABLE.

Index: stdstrbufs.cc
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libio/stdstrbufs.cc,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 stdstrbufs.cc
--- stdstrbufs.cc	1997/09/17 20:12:34	1.1.1.2
+++ stdstrbufs.cc	1997/11/17 20:38:04
@@ -58,7 +58,7 @@
 #define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
   static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
   struct _IO_FILE_plus NAME \
-    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD), &_IO_file_jumps}
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD), STD_VTABLE}
 #else
 #define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
   struct _IO_FILE_plus NAME = {FILEBUF_LITERAL(CHAIN, FLAGS, FD), STD_VTABLE}

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Another libio patch
@ 1997-08-27 16:44 H.J. Lu
  0 siblings, 0 replies; 19+ messages in thread
From: H.J. Lu @ 1997-08-27 16:44 UTC (permalink / raw)
  To: egcs

I forgot this one in my libio patch.

Sorry for that.

-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
--
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ libio/config/libio.mt	Mon Aug 25 18:42:20 1997
@@ -0,0 +1,13 @@
+# Used by systems which implement stdio upon libio.
+# If libio in libc is not compatible with thunks, we
+# have to compile a few things ourselves.
+# FIXME: Use vfprintf.c and vfscanf.c from glibc.
+IO_OBJECTS=filedoalloc.o floatconv.o genops.o fileops.o iovfprintf.o \
+	   iovfscanf.o iopadn.o ioseekoff.o ioseekpos.o outfloat.o \
+	   strops.o iofclose.o iopopen.o \
+	   iofdopen.o iofflush.o iofopen.o iofputs.o \
+	   iofwrite.o ioputs.o iosetbuffer.o iosetvbuf.o \
+	   iovsprintf.o iovsscanf.o iovasprintf.o iovsnprintf.o
+		    
+XCFLAGS = $(LIBCFLAGS) -D_IO_USE_DTOA -D_IO_USE_LIBC
+XCXXFLAGS = $(LIBCXXFLAGS) -D_IO_USE_DTOA -D_IO_USE_LIBC
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ libio/config/mtsafe.mt	Mon Aug 25 18:42:20 1997
@@ -0,0 +1,4 @@
+MTCFLAGS = -D_IO_MTSAFE_IO
+MTCXXFLAGS = -D_IO_MTSAFE_IO
+XCFLAGS = $(LIBCFLAGS) $(MTCFLAGS)
+XCXXFLAGS = $(LIBCXXFLAGS) $(MTCXXFLAGS)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~1997-11-17 15:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-10 15:09 Another libio patch H.J. Lu
1997-10-10 22:58 ` Ulrich Drepper
1997-10-11  9:49   ` H.J. Lu
1997-10-11 13:11     ` HJ's patch to libio works on Red Hat 4.2/libc 5.3.12 Joe Buck
1997-10-11 13:40       ` H.J. Lu
1997-10-11 18:35       ` Mumit Khan
1997-10-12 13:31         ` H.J. Lu
1997-10-12 17:03           ` Joe Buck
1997-10-12 18:05             ` Mumit Khan
1997-10-13  8:01             ` H.J. Lu
1997-10-13 20:18               ` Mumit Khan
1997-10-14 12:55                 ` Joe Buck
1997-10-16 15:19                 ` H.J. Lu
1997-10-13  5:49 ` Another libio patch Neal Becker
1997-10-17 13:49   ` H.J. Lu
  -- strict thread matches above, loose matches on Subject: below --
1997-11-17 13:18 H.J. Lu
1997-11-17 13:57 ` Jeffrey A Law
1997-11-17 15:03   ` H.J. Lu
1997-08-27 16:44 H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).