From c8a89e7dd5cab24242cc9050387bd5bb902da11a Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Mon, 30 Jan 2012 21:20:32 +0000 Subject: [PATCH] Remove miscellaneous __STDC__ conditionals. --- ChangeLog | 32 ++++++++++++++++++++++++++++++++ crypt/cert.c | 4 ---- crypt/crypt-entry.c | 4 +--- crypt/crypt_util.c | 2 -- libio/filedoalloc.c | 4 +--- libio/fileops.c | 4 +--- libio/genops.c | 4 +--- libio/iofclose.c | 4 +--- libio/iofdopen.c | 6 ++---- libio/iofopen.c | 4 +--- libio/iofopen64.c | 4 +--- libio/iogetdelim.c | 5 ++--- libio/iopopen.c | 4 +--- libio/obprintf.c | 4 +--- libio/oldfileops.c | 4 +--- libio/oldiofclose.c | 5 ++--- libio/oldiofdopen.c | 6 ++---- libio/oldiofopen.c | 4 +--- libio/oldiopopen.c | 4 +--- libio/wfiledoalloc.c | 4 +--- libio/wgenops.c | 5 ++--- locale/programs/xmalloc.c | 6 +----- misc/syslog.c | 4 ---- stdio-common/xbug.c | 2 -- string/memchr.c | 8 ++------ string/memcmp.c | 10 ++-------- string/memrchr.c | 8 ++------ string/rawmemchr.c | 8 ++------ sysdeps/posix/getcwd.c | 6 +----- time/strftime_l.c | 8 ++------ 30 files changed, 67 insertions(+), 110 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ca578f..a03aee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,37 @@ 2012-01-30 Joseph Myers + * crypt/cert.c: Remove __STDC__ conditionals. + * crypt/crypt-entry.c: Likewise. + * crypt/crypt_util.c: Likewise. + * libio/filedoalloc.c: Likewise. + * libio/fileops.c: Likewise. + * libio/genops.c: Likewise. + * libio/iofclose.c: Likewise. + * libio/iofdopen.c: Likewise. + * libio/iofopen.c: Likewise. + * libio/iofopen64.c: Likewise. + * libio/iogetdelim.c: Likewise. + * libio/iopopen.c: Likewise. + * libio/obprintf.c: Likewise. + * libio/oldfileops.c: Likewise. + * libio/oldiofclose.c: Likewise. + * libio/oldiofdopen.c: Likewise. + * libio/oldiofopen.c: Likewise. + * libio/oldiopopen.c: Likewise. + * libio/wfiledoalloc.c: Likewise. + * libio/wgenops.c: Likewise. + * locale/programs/xmalloc.c: Likewise. + * misc/syslog.c: Likewise. + * stdio-common/xbug.c: Likewise. + * string/memchr.c: Likewise. + * string/memcmp.c: Likewise. + * string/memrchr.c: Likewise. + * string/rawmemchr.c: Likewise. + * sysdeps/posix/getcwd.c: Likewise. + * time/strftime_l.c: Likewise. + +2012-01-30 Joseph Myers + * configure.in (libc_cv_cc_sse2avx): AC_SUBST. * configure: Regenerate. * config.make.in (config-cflags-sse2avx): Define. diff --git a/crypt/cert.c b/crypt/cert.c index 34d7e41..8c838e9 100644 --- a/crypt/cert.c +++ b/crypt/cert.c @@ -12,14 +12,10 @@ int totfails = 0; -#if __STDC__ - 0 int main (int argc, char *argv[]); void get8 (char *cp); void put8 (char *cp); void good_bye (void) __attribute__ ((noreturn)); -#else -void get8(), put8(); -#endif void good_bye () { diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c index fdddad2..97bd145 100644 --- a/crypt/crypt-entry.c +++ b/crypt/crypt-entry.c @@ -1,7 +1,7 @@ /* * UFC-crypt: ultra fast crypt(3) implementation * - * Copyright (C) 1991,1992,1993,1996,1997,2007 Free Software Foundation, Inc. + * Copyright (C) 1991-1993,1996-1997,2007,2012 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 Lesser General Public @@ -46,7 +46,6 @@ #include "crypt-private.h" /* Prototypes for local functions. */ -#if __STDC__ - 0 #ifndef __GNU_LIBRARY__ void _ufc_clearmem (char *start, int cnt); #else @@ -61,7 +60,6 @@ extern char *__sha256_crypt (const char *key, const char *salt); extern char *__sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen); extern char *__sha512_crypt (const char *key, const char *salt); -#endif /* Define our magic string to mark salt for MD5 encryption replacement. This is meant to be the same as for other MD5 based diff --git a/crypt/crypt_util.c b/crypt/crypt_util.c index 62c8790..7fcbd8f 100644 --- a/crypt/crypt_util.c +++ b/crypt/crypt_util.c @@ -49,7 +49,6 @@ #include "crypt-private.h" /* Prototypes for local functions. */ -#if __STDC__ - 0 #ifndef __GNU_LIBRARY__ void _ufc_clearmem (char *start, int cnt); void _ufc_copymem (char *from, char *to, int cnt); @@ -59,7 +58,6 @@ STATIC void shuffle_sb (long32 *k, ufc_long saltbits); #else STATIC void shuffle_sb (long64 *k, ufc_long saltbits); #endif -#endif /* diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index 4f62dcd..6cbe2e2 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 2001, 2002, 2011 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1997, 2001-2002, 2011-2012 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 @@ -62,10 +62,8 @@ #include "libioP.h" #include #include -#ifdef __STDC__ #include #include -#endif #ifdef _LIBC # undef isatty diff --git a/libio/fileops.c b/libio/fileops.c index a6f7cba..201d063 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009, 2011 +/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009, 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -40,9 +40,7 @@ #include #include #include -#ifdef __STDC__ #include -#endif #if _LIBC # include "../wcsmbs/wcsmbsload.h" # include "../iconv/gconv_charset.h" diff --git a/libio/genops.c b/libio/genops.c index bb40c34..aa50456 100644 --- a/libio/genops.c +++ b/libio/genops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1997-2002, 2003, 2004, 2006, 2007, 2011 +/* Copyright (C) 1993,1995,1997-2002, 2003, 2004, 2006, 2007, 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -29,9 +29,7 @@ /* Generic or default I/O operations. */ #include "libioP.h" -#ifdef __STDC__ #include -#endif #include #include #ifdef _LIBC diff --git a/libio/iofclose.c b/libio/iofclose.c index aa2ba40..64e025b 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1995,1997-2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2004,2005,2012 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 @@ -26,9 +26,7 @@ in files containing the exception. */ #include "libioP.h" -#ifdef __STDC__ #include -#endif #if _LIBC # include "../iconv/gconv_int.h" # include diff --git a/libio/iofdopen.c b/libio/iofdopen.c index 7f6e593..59f4414 100644 --- a/libio/iofdopen.c +++ b/libio/iofdopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1994,1997,1998,1999,2000,2002,2003,2010 +/* Copyright (C) 1993,1994,1997,1998,1999,2000,2002,2003,2010,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -26,9 +26,7 @@ This exception applies to code released by its copyright holders in files containing the exception. */ -#ifdef __STDC__ -# include -#endif +#include #include "libioP.h" #include diff --git a/libio/iofopen.c b/libio/iofopen.c index 5051f7a..1537418 100644 --- a/libio/iofopen.c +++ b/libio/iofopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1997,1998,1999,2000,2002,2003 +/* Copyright (C) 1993,1997,1998,1999,2000,2002,2003,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -27,10 +27,8 @@ in files containing the exception. */ #include "libioP.h" -#ifdef __STDC__ #include #include -#endif #ifdef _LIBC # include #else diff --git a/libio/iofopen64.c b/libio/iofopen64.c index 69e62b8..fe4dc99 100644 --- a/libio/iofopen64.c +++ b/libio/iofopen64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1993,1997,1999,2000,2002,2012 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 @@ -26,9 +26,7 @@ in files containing the exception. */ #include "libioP.h" -#ifdef __STDC__ #include -#endif _IO_FILE * _IO_fopen64 (filename, mode) diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c index a362bf9..3ee7eac 100644 --- a/libio/iogetdelim.c +++ b/libio/iogetdelim.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1994,1996-1998,2001,2003,2005 Free Software Foundation, Inc. +/* Copyright (C) 1994,1996-1998,2001,2003,2005,2012 + 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 @@ -25,9 +26,7 @@ This exception applies to code released by its copyright holders in files containing the exception. */ -#ifdef __STDC__ #include -#endif #include "libioP.h" #include #include diff --git a/libio/iopopen.c b/libio/iopopen.c index 1a5cc0f..1b2b654 100644 --- a/libio/iopopen.c +++ b/libio/iopopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997-2002, 2003, 2004, 2007, 2008 +/* Copyright (C) 1993, 1997-2002, 2003, 2004, 2007, 2008, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -34,9 +34,7 @@ #if _IO_HAVE_SYS_WAIT #include #include -#ifdef __STDC__ #include -#endif #ifdef _LIBC # include # include diff --git a/libio/obprintf.c b/libio/obprintf.c index c715c2d..d099e56 100644 --- a/libio/obprintf.c +++ b/libio/obprintf.c @@ -1,5 +1,5 @@ /* Print output of stream to given obstack. - Copyright (C) 1996,1997,1999,2000,2001,2002,2003,2004,2005,2006,2008 + Copyright (C) 1996,1997,1999,2000,2001,2002,2003,2004,2005,2006,2008,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1996. @@ -20,9 +20,7 @@ 02111-1307 USA. */ -#ifdef __STDC__ #include -#endif #include "libioP.h" #include "strfile.h" #include diff --git a/libio/oldfileops.c b/libio/oldfileops.c index 3e3daa8..900d302 100644 --- a/libio/oldfileops.c +++ b/libio/oldfileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997-2004, 2005, 2007, 2011 +/* Copyright (C) 1993, 1995, 1997-2004, 2005, 2007, 2011-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -42,9 +42,7 @@ #include #include #include -#ifdef __STDC__ #include -#endif #ifndef errno extern int errno; #endif diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c index 62c3154..34829ea 100644 --- a/libio/oldiofclose.c +++ b/libio/oldiofclose.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1993,1995,1997-2002,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2002,2004,2005,2012 + 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 @@ -30,9 +31,7 @@ #define _IO_USE_OLD_IO_FILE #include "libioP.h" -#ifdef __STDC__ #include -#endif int attribute_compat_text_section diff --git a/libio/oldiofdopen.c b/libio/oldiofdopen.c index a1fc667..824c7be 100644 --- a/libio/oldiofdopen.c +++ b/libio/oldiofdopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,94,97,99,2000,2002,2003,2004 +/* Copyright (C) 1993,94,97,99,2000,2002,2003,2004,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -30,9 +30,7 @@ #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) #define _IO_USE_OLD_IO_FILE -#ifdef __STDC__ -# include -#endif +#include #include "libioP.h" #include diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c index c761580..fcbc443 100644 --- a/libio/oldiofopen.c +++ b/libio/oldiofopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993,1997,1999,2000,2002,2003,2004 +/* Copyright (C) 1993,1997,1999,2000,2002,2003,2004,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -31,9 +31,7 @@ #define _IO_USE_OLD_IO_FILE #include "libioP.h" -#ifdef __STDC__ #include -#endif _IO_FILE * diff --git a/libio/oldiopopen.c b/libio/oldiopopen.c index 2fa1ac5..fe09aed 100644 --- a/libio/oldiopopen.c +++ b/libio/oldiopopen.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998-2002, 2004, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -34,9 +34,7 @@ #if _IO_HAVE_SYS_WAIT #include #include -#ifdef __STDC__ #include -#endif #ifdef _LIBC # include #endif diff --git a/libio/wfiledoalloc.c b/libio/wfiledoalloc.c index 67a0517..168bddd 100644 --- a/libio/wfiledoalloc.c +++ b/libio/wfiledoalloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997, 1999, 2000, 2002, 2006 +/* Copyright (C) 1993, 1997, 1999, 2000, 2002, 2006, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -63,10 +63,8 @@ #include "libioP.h" #include #include -#ifdef __STDC__ #include #include -#endif #ifdef _LIBC # undef isatty diff --git a/libio/wgenops.c b/libio/wgenops.c index e2adedd..d9709ca 100644 --- a/libio/wgenops.c +++ b/libio/wgenops.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1993,1995,1997-2002,2004,2006 Free Software Foundation, Inc. +/* Copyright (C) 1993,1995,1997-2002,2004,2006,2012 + Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Ulrich Drepper . Based on the single byte version by Per Bothner . @@ -30,9 +31,7 @@ /* Generic or default I/O operations. */ #include "libioP.h" -#ifdef __STDC__ #include -#endif #include #include diff --git a/locale/programs/xmalloc.c b/locale/programs/xmalloc.c index a2eeda7..de2767d 100644 --- a/locale/programs/xmalloc.c +++ b/locale/programs/xmalloc.c @@ -1,5 +1,5 @@ /* xmalloc.c -- malloc with out of memory checking - Copyright (C) 1990,91,92,93,94,95,96,97,2004,2005 + Copyright (C) 1990,91,92,93,94,95,96,97,2004,2005,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -21,11 +21,7 @@ #include #endif -#if __STDC__ #define VOID void -#else -#define VOID char -#endif #include diff --git a/misc/syslog.c b/misc/syslog.c index 7156b4f..57d4db9 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -51,11 +51,7 @@ static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94"; #include #include -#if __STDC__ #include -#else -#include -#endif #include #include diff --git a/stdio-common/xbug.c b/stdio-common/xbug.c index a04bfc4..76a8c54 100644 --- a/stdio-common/xbug.c +++ b/stdio-common/xbug.c @@ -8,11 +8,9 @@ typedef struct _Buffer { int room, used; } Buffer; -#if __STDC__ - 0 void InitBuffer (Buffer *b); void AppendToBuffer (register Buffer *b, const char *str, register int len); void ReadFile (register Buffer *buffer, FILE *input); -#endif #define INIT_BUFFER_SIZE 10000 diff --git a/string/memchr.c b/string/memchr.c index f3098c7..28de957 100644 --- a/string/memchr.c +++ b/string/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,93,96,97,99,2000,2003 Free Software Foundation, Inc. +/* Copyright (C) 1991,93,96,97,99,2000,2003,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and @@ -26,11 +26,7 @@ #endif #undef __ptr_t -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) -# define __ptr_t void * -#else /* Not C++ or ANSI C. */ -# define __ptr_t char * -#endif /* C++ or ANSI C. */ +#define __ptr_t void * #if defined _LIBC # include diff --git a/string/memcmp.c b/string/memcmp.c index 2f8cf34..d2ec1c2 100644 --- a/string/memcmp.c +++ b/string/memcmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,1993,1995,1997,1998,2003,2004 +/* Copyright (C) 1991,1993,1995,1997,1998,2003,2004,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Torbjorn Granlund (tege@sics.se). @@ -23,13 +23,7 @@ #endif #undef __ptr_t -#if defined __cplusplus || (defined __STDC__ && __STDC__) -# define __ptr_t void * -#else /* Not C++ or ANSI C. */ -# undef const -# define const -# define __ptr_t char * -#endif /* C++ or ANSI C. */ +#define __ptr_t void * #if defined HAVE_STRING_H || defined _LIBC # include diff --git a/string/memrchr.c b/string/memrchr.c index 498a437..a19f8e6 100644 --- a/string/memrchr.c +++ b/string/memrchr.c @@ -1,5 +1,5 @@ /* memrchr -- find the last occurrence of a byte in a memory block - Copyright (C) 1991, 93, 96, 97, 99, 2000 Free Software Foundation, Inc. + Copyright (C) 1991, 93, 96, 97, 99, 2000, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and @@ -29,11 +29,7 @@ #endif #undef __ptr_t -#if defined __cplusplus || (defined __STDC__ && __STDC__) -# define __ptr_t void * -#else /* Not C++ or ANSI C. */ -# define __ptr_t char * -#endif /* C++ or ANSI C. */ +#define __ptr_t void * #if defined _LIBC # include diff --git a/string/rawmemchr.c b/string/rawmemchr.c index cb00ad7..a7c9ec6 100644 --- a/string/rawmemchr.c +++ b/string/rawmemchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,93,96,97,99,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,93,96,97,99,2000,2002,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), with help from Dan Sahlin (dan@sics.se) and @@ -26,11 +26,7 @@ #endif #undef __ptr_t -#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) -# define __ptr_t void * -#else /* Not C++ or ANSI C. */ -# define __ptr_t char * -#endif /* C++ or ANSI C. */ +#define __ptr_t void * #if defined (_LIBC) # include diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c index 847abc5..007f7e6 100644 --- a/sysdeps/posix/getcwd.c +++ b/sysdeps/posix/getcwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98,99,11 Free Software Foundation, Inc. +/* Copyright (C) 1991-1999,2011-2012 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 @@ -192,10 +192,6 @@ extern char *alloca (); # define size_t unsigned int #endif -#if !__STDC__ && !defined const -# define const -#endif - #ifndef __GNU_LIBRARY__ # define __lstat64 stat64 #endif diff --git a/time/strftime_l.c b/time/strftime_l.c index 08c2aeb..b221299 100644 --- a/time/strftime_l.c +++ b/time/strftime_l.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2004, 2007-2009, 2010 Free Software Foundation, Inc. +/* Copyright (C) 2002,2004,2007-2009,2010,2012 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 @@ -124,11 +124,7 @@ extern char *tzname[]; #endif #ifndef PTR -# ifdef __STDC__ -# define PTR void * -# else -# define PTR char * -# endif +# define PTR void * #endif #ifndef CHAR_BIT -- 2.7.4