Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 26 Jan 1999 20:49:55 +0000 (20:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 26 Jan 1999 20:49:55 +0000 (20:49 +0000)
* libio/Makefile (routines): Remove fgetc.
* libio/fgetc.c: Removed.
* libio/getc.c: Add fgetc alias.
* libio/Versions [GLIBC_2.1]: Add fgetc_unlocked.
* libio/getc_u.c: Rename functio to __getc_unlocked and make
getc_unlocked and fgetc_unlocked weak aliases.
* libio/stdio.h: Add prototype for fgetc_unlocked.

ChangeLog
libio/Makefile
libio/Versions
libio/fgetc.c [deleted file]
libio/getc.c
libio/getc_u.c
libio/stdio.h

index f1a0d41..1a0ce9a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 1999-01-26  Ulrich Drepper  <drepper@cygnus.com>
 
+       * libio/Makefile (routines): Remove fgetc.
+       * libio/fgetc.c: Removed.
+       * libio/getc.c: Add fgetc alias.
+       * libio/Versions [GLIBC_2.1]: Add fgetc_unlocked.
+       * libio/getc_u.c: Rename functio to __getc_unlocked and make
+       getc_unlocked and fgetc_unlocked weak aliases.
+       * libio/stdio.h: Add prototype for fgetc_unlocked.
+
        * sysdeps/gnu/bits/utmp.h: Don't prepend exit_status elements with
        __ since utmp.h is not mentioned in any standard.
 
index 3a7f3b4..5f62590 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 1998, 1999 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
@@ -31,7 +31,7 @@ routines      :=                                                            \
        iovsprintf iovsscanf                                                  \
        iofgetpos64 iofopen64 iofsetpos64                                     \
                                                                              \
-       clearerr feof ferror fgetc fileno fputc freopen fseek getc getchar    \
+       clearerr feof ferror fileno fputc freopen fseek getc getchar          \
        memstream pclose putc putchar rewind setbuf setlinebuf vasprintf      \
        iovdprintf vscanf vsnprintf obprintf fcloseall fseeko ftello          \
        freopen64 fseeko64 ftello64                                           \
index 3d6918f..61b767a 100644 (file)
@@ -95,7 +95,7 @@ libc {
     # f*
     fgetpos64; fopen64; freopen64; fseeko; fseeko64; fsetpos64; ftello;
     ftello64; fopen; fclose; fdopen; fread_unlocked; fwrite_unlocked;
-    fgets_unlocked; fputs_unlocked;
+    fgets_unlocked; fputs_unlocked; fgetc_unlocked;
 
     # p*
     pclose; popen;
diff --git a/libio/fgetc.c b/libio/fgetc.c
deleted file mode 100644 (file)
index 094c5fe..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
-   This file is part of the GNU IO Library.
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This library is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this library; see the file COPYING.  If not, write to
-   the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
-
-   As a special exception, if you link this library with files
-   compiled with a GNU compiler to produce an executable, this does
-   not cause the resulting executable to be covered by the GNU General
-   Public License.  This exception does not however invalidate any
-   other reasons why the executable file might be covered by the GNU
-   General Public License.  */
-
-#include "libioP.h"
-#include "stdio.h"
-
-int
-fgetc (fp)
-     FILE *fp;
-{
-  int result;
-  CHECK_FILE (fp, EOF);
-  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
-  _IO_flockfile (fp);
-  result = _IO_getc_unlocked (fp);
-  _IO_funlockfile (fp);
-  _IO_cleanup_region_end (0);
-  return result;
-}
index 81a4b52..6ccef99 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
 
    This library is free software; you can redistribute it and/or
@@ -46,4 +46,5 @@ _IO_getc (fp)
 
 #ifdef weak_alias
 weak_alias (_IO_getc, getc)
+weak_alias (_IO_getc, fgetc)
 #endif
index f074427..5572ef6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
 
    This library is free software; you can redistribute it and/or
 #undef getc_unlocked
 
 int
-getc_unlocked (fp)
+__getc_unlocked (fp)
      FILE *fp;
 {
   CHECK_FILE (fp, EOF);
   return _IO_getc_unlocked (fp);
 }
+
+weak_alias (__getc_unlocked, getc_unlocked)
+weak_alias (__getc_unlocked, fgetc_unlocked)
index edbd82b..6056652 100644 (file)
@@ -1,5 +1,5 @@
 /* Define ISO C stdio on top of C++ iostreams.
-   Copyright (C) 1991, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+   Copyright (C) 1991, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Library General Public License as
@@ -347,6 +347,11 @@ extern int getc_unlocked __P ((FILE *__stream));
 extern int getchar_unlocked __P ((void));
 #endif /* Use POSIX or MISC.  */
 
+#ifdef __USE_MISC
+/* Faster version when locking is not necessary.  */
+extern int fgetc_unlocked __P ((FILE *__stream));
+#endif /* Use MISC.  */
+
 
 /* Write a character to STREAM.  */
 extern int fputc __P ((int __c, FILE *__stream));