This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

More none thread patch for glibc


It turned out we may need all those xxx_unlocked functions if thread
is not available. Here is the rest of patch.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
--
Fri Jul 30 07:38:26 1999  H.J. Lu  <hjl@gnu.org>

	* libio/iofflush.c (fflush_unlocked): Weak aliase if
	_IO_MTSAFE_IO is not defined.
	* libio/clearerr.c (clearerr_unlocked): Likewise.
	* libio/feof.c (feof_unlocked): Likewise.
	* libio/ferror.c (ferror_unlocked): Likewise.
	* libio/fputc.c (fputc_unlocked): Likewise.
	* libio/getc.c (getc_unlocked, fgetc_unlocked): Likewise.
	* libio/getchar.c (getchar_unlocked): Likewise.
	* libio/putc.c (putc_unlocked): Likewise.
	* libio/putchar.c (putchar_unlocked): Likewise.

--- /work/gnu/import/glibc-2.1/libc/libio/iofflush.c	Sun Jun  7 06:47:16 1998
+++ libio/iofflush.c	Thu Jul 29 15:52:08 1999
@@ -47,4 +47,8 @@ _IO_fflush (fp)
 
 #ifdef weak_alias
 weak_alias (_IO_fflush, fflush)
+
+#ifndef _IO_MTSAFE_IO
+weak_alias (_IO_fflush, fflush_unlocked)
+#endif
 #endif
--- /work/gnu/import/glibc-2.1/libc/libio/clearerr.c	Mon Feb 24 21:16:00 1997
+++ libio/clearerr.c	Thu Jul 29 15:49:09 1999
@@ -28,3 +28,7 @@ clearerr (fp)
   _IO_clearerr (fp);
   _IO_funlockfile (fp);
 }
+
+#if defined weak_alias && !defined _IO_MTSAFE_IO
+weak_alias (clearerr, clearerr_unlocked)
+#endif
--- /work/gnu/import/glibc-2.1/libc/libio/feof.c	Tue Aug 19 20:39:59 1997
+++ libio/feof.c	Thu Jul 29 15:52:44 1999
@@ -40,4 +40,9 @@ _IO_feof (fp)
 
 #ifdef weak_alias
 weak_alias (_IO_feof, feof)
+
+#ifndef _IO_MTSAFE_IO
+#undef feof_unlocked
+weak_alias (_IO_feof, feof_unlocked)
+#endif
 #endif
--- /work/gnu/import/glibc-2.1/libc/libio/ferror.c	Tue Aug 19 20:39:59 1997
+++ libio/ferror.c	Thu Jul 29 15:52:51 1999
@@ -40,4 +40,9 @@ _IO_ferror (fp)
 
 #ifdef weak_alias
 weak_alias (_IO_ferror, ferror)
+
+#ifndef _IO_MTSAFE_IO
+#undef ferror_unlocked
+weak_alias (_IO_ferror, ferror_unlocked)
+#endif
 #endif
--- /work/gnu/import/glibc-2.1/libc/libio/fputc.c	Sun Jun  7 06:47:04 1998
+++ libio/fputc.c	Thu Jul 29 15:52:56 1999
@@ -40,3 +40,8 @@ fputc (c, fp)
   _IO_cleanup_region_end (0);
   return result;
 }
+
+#if defined weak_alias && !defined _IO_MTSAFE_IO
+#undef fputc_unlocked
+weak_alias (fputc, fputc_unlocked)
+#endif
--- /work/gnu/import/glibc-2.1/libc/libio/getc.c	Tue Jan 26 12:46:42 1999
+++ libio/getc.c	Thu Jul 29 15:53:01 1999
@@ -47,4 +47,10 @@ _IO_getc (fp)
 #ifdef weak_alias
 weak_alias (_IO_getc, getc)
 weak_alias (_IO_getc, fgetc)
+
+#ifndef _IO_MTSAFE_IO
+#undef getc_unlocked
+weak_alias (_IO_getc, getc_unlocked)
+weak_alias (_IO_getc, fgetc_unlocked)
+#endif
 #endif
--- /work/gnu/import/glibc-2.1/libc/libio/getchar.c	Sun Jun  7 06:47:14 1998
+++ libio/getchar.c	Thu Jul 29 15:53:05 1999
@@ -39,3 +39,8 @@ getchar ()
   _IO_cleanup_region_end (0);
   return result;
 }
+
+#if defined weak_alias && !defined _IO_MTSAFE_IO
+#undef getchar_unlocked
+weak_alias (getchar, getchar_unlocked)
+#endif
--- /work/gnu/import/glibc-2.1/libc/libio/putc.c	Sun Jun  7 06:47:39 1998
+++ libio/putc.c	Thu Jul 29 15:54:19 1999
@@ -40,4 +40,9 @@ _IO_putc (c, fp)
 
 #ifdef weak_alias
 weak_alias (_IO_putc, putc)
+
+#ifndef _IO_MTSAFE_IO
+#undef putc_unlocked
+weak_alias (_IO_putc, putc_unlocked)
+#endif
 #endif
--- /work/gnu/import/glibc-2.1/libc/libio/putchar.c	Sun Jun  7 06:47:40 1998
+++ libio/putchar.c	Thu Jul 29 15:55:07 1999
@@ -34,3 +34,8 @@ putchar (c)
   _IO_cleanup_region_end (0);
   return result;
 }
+
+#if defined weak_alias && !defined _IO_MTSAFE_IO
+#undef putchar_unlocked
+weak_alias (putchar, putchar_unlocked)
+#endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]