This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

[v3] c_std undef consistency



This wasn't really done in a consistent manner. std_cctype.h did it,
other files did the undef routine for one or two functions but not
everyone.

This patch fixes this, and does some cosmetic cleanup with the date
format on copyrights.

-benjamin

x86/linux

2001-02-05  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/bits/std_cerrno.h: Correct date format for copyright.
	* include/c_std/bits/std_cctype.h: Same.
	* include/c_std/bits/std_cassert.h: Same.
	* include/c_std/bits/std_cstdarg.h: Same.
	* include/c_std/bits/std_cstddef.h: Same.
	
	* include/c_std/bits/std_cstdio.h: Undefine all names brought into
	namespace std.
	* include/c_std/bits/std_ctime.h: Same.
	* include/c_std/bits/std_clocale.h: Same.
	* include/c_std/bits/std_cmath.h: Same.
	* include/c_std/bits/std_csetjmp.h: Same.
	* include/c_std/bits/std_csignal.h: Same.
	* include/c_std/bits/std_cstring.h: Same.
	* include/c_std/bits/std_cstdlib.h: Same.
	* include/c_std/bits/std_cwchar.h: Same.
	
Index: include/c_std/bits/std_cassert.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cassert.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cassert.h
*** std_cassert.h	2000/12/22 00:27:01	1.4
--- std_cassert.h	2001/02/05 22:09:30
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 30,37 ****
  //
  // ISO C++ 14882: 19.2  Assertions
  //
- 
- // Note: This is not a conforming implementation.
  
  // No include guards on this header...
  
--- 30,35 ----
Index: include/c_std/bits/std_cctype.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cctype.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_cctype.h
*** std_cctype.h	2000/12/22 00:27:01	1.3
--- std_cctype.h	2001/02/05 22:09:30
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
Index: include/c_std/bits/std_cerrno.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cerrno.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cerrno.h
*** std_cerrno.h	2000/12/22 00:27:01	1.4
--- std_cerrno.h	2001/02/05 22:09:30
***************
*** 1,6 ****
  // The -*- C++ -*- error number header.
  
! // Copyright (C) 1997-1999 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // The -*- C++ -*- error number header.
  
! // Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
Index: include/c_std/bits/std_cfloat.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cfloat.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_cfloat.h
*** std_cfloat.h	2000/12/22 00:27:01	1.3
--- std_cfloat.h	2001/02/05 22:09:31
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
Index: include/c_std/bits/std_climits.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_climits.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_climits.h
*** std_climits.h	2000/12/22 00:27:01	1.4
--- std_climits.h	2001/02/05 22:09:31
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
Index: include/c_std/bits/std_clocale.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_clocale.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_clocale.h
*** std_clocale.h	2001/01/30 09:18:50	1.4
--- std_clocale.h	2001/02/05 22:09:31
***************
*** 41,46 ****
--- 41,50 ----
  #pragma GCC system_header
  #include <locale.h>
  
+ // Get rid of those macros defined in <locale.h> in lieu of real functions.
+ #undef setlocale
+ #undef localeconv
+ 
  namespace std
  {
    using ::lconv;
Index: include/c_std/bits/std_cmath.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cmath.h,v
retrieving revision 1.5
diff -c -p -r1.5 std_cmath.h
*** std_cmath.h	2000/12/22 00:27:01	1.5
--- std_cmath.h	2001/02/05 22:09:32
***************
*** 1,6 ****
  // -*- C++ -*- C math library.
  
! // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- C math library.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 42,47 ****
--- 42,72 ----
  #pragma GCC system_header
  #include <math.h>
  
+ // Get rid of those macros defined in <math.h> in lieu of real functions.
+ #undef abs
+ #undef div
+ #undef acos
+ #undef asin
+ #undef atan
+ #undef atan2
+ #undef ceil
+ #undef cos
+ #undef cosh
+ #undef exp
+ #undef fabs
+ #undef floor
+ #undef fmod
+ #undef frexp
+ #undef ldexp
+ #undef log
+ #undef log10
+ #undef modf
+ #undef pow
+ #undef sin
+ #undef sinh
+ #undef tan
+ #undef tanh
+ 
  namespace std 
  {
    // Forward declaration of a helper function.  This really should be
*************** namespace std 
*** 580,587 ****
    inline long double 
    tanh(long double __x) { return ::tanh(static_cast<double>(__x)); }
  #endif
- 
- 
  } // std
  
  #ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
--- 605,610 ----
Index: include/c_std/bits/std_csetjmp.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_csetjmp.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_csetjmp.h
*** std_csetjmp.h	2000/12/22 00:27:01	1.4
--- std_csetjmp.h	2001/02/05 22:09:32
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 38,43 ****
--- 38,46 ----
  
  #pragma GCC system_header
  #include <setjmp.h>
+ 
+ // Get rid of those macros defined in <setjmp.h> in lieu of real functions.
+ #undef longjmp
  
  namespace std
  {
Index: include/c_std/bits/std_csignal.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_csignal.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_csignal.h
*** std_csignal.h	2000/12/22 00:27:01	1.3
--- std_csignal.h	2001/02/05 22:09:32
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
***************
*** 38,43 ****
--- 38,46 ----
  
  #pragma GCC system_header
  #include <signal.h>
+ 
+ // Get rid of those macros defined in <signal.h> in lieu of real functions.
+ #undef raise
  
  namespace std
  {
Index: include/c_std/bits/std_cstdarg.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cstdarg.h,v
retrieving revision 1.3
diff -c -p -r1.3 std_cstdarg.h
*** std_cstdarg.h	2000/12/22 00:27:01	1.3
--- std_cstdarg.h	2001/02/05 22:09:32
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
Index: include/c_std/bits/std_cstddef.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cstddef.h,v
retrieving revision 1.5
diff -c -p -r1.5 std_cstddef.h
*** std_cstddef.h	2000/12/22 00:27:01	1.5
--- std_cstddef.h	2001/02/05 22:09:32
***************
*** 1,6 ****
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,6 ----
  // -*- C++ -*- forwarding header.
  
! // Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
Index: include/c_std/bits/std_cstdio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cstdio.h,v
retrieving revision 1.7
diff -c -p -r1.7 std_cstdio.h
*** std_cstdio.h	2001/01/11 18:16:16	1.7
--- std_cstdio.h	2001/02/05 22:09:33
***************
*** 44,58 ****
  #include <stdio.h>
  
  // Get rid of those macros defined in <stdio.h> in lieu of real functions.
! #undef clearerr
! #undef feof
! #undef ferror
! #undef fileno
  #undef getc
  #undef getchar
  #undef putc
  #undef putchar
! #undef printf
  
  namespace std 
  {
--- 44,95 ----
  #include <stdio.h>
  
  // Get rid of those macros defined in <stdio.h> in lieu of real functions.
! #undef remove
! #undef rename
! #undef tmpfile
! #undef tmpnam
! #undef fclose
! #undef fflush
! #undef fopen
! #undef freopen
! #undef setbuf
! #undef setvbuf
! #undef fprintf
! #undef fscanf
! #undef printf
! #undef scanf
! #undef snprintf
! #undef sprintf
! #undef sscanf
! #undef vfprintf
! #undef vfscanf
! #undef vprintf
! #undef vscanf
! #undef vsnprintf
! #undef vsprintf
! #undef vsscanf
! #undef fgetc
! #undef fgets
! #undef fputc
! #undef fputs
  #undef getc
  #undef getchar
+ #undef gets
  #undef putc
  #undef putchar
! #undef puts
! #undef ungetc
! #undef fread
! #undef fwrite
! #undef fgetpos
! #undef fseek
! #undef fsetpos
! #undef ftell
! #undef rewind
! #undef clearerr
! #undef feof
! #undef ferror
! #undef perror
  
  namespace std 
  {
Index: include/c_std/bits/std_cstdlib.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cstdlib.h,v
retrieving revision 1.6
diff -c -p -r1.6 std_cstdlib.h
*** std_cstdlib.h	2001/01/02 07:38:47	1.6
--- std_cstdlib.h	2001/02/05 22:09:33
***************
*** 42,49 ****
  #pragma GCC system_header
  #include <stdlib.h>
  
! // Get rid of those macros defined in <stdio.h> in lieu of real functions.
  #undef mblen
  
  namespace std 
  {
--- 42,84 ----
  #pragma GCC system_header
  #include <stdlib.h>
  
! // Get rid of those macros defined in <stdlib.h> in lieu of real functions.
! #undef atof
! #undef atoi
! #undef atol
! #undef strtod
! #undef strtof
! #undef strtol
! #undef strtoul
! #undef rand
! #undef srand
! #undef calloc
! #undef free
! #undef malloc
! #undef realloc
! #undef abort
! #undef atexit
! #undef exit
! #undef _Exit
! #undef getenv
! #undef system
! #undef bsearch
! #undef qsort
! #undef abs
! #undef labs
! #undef llabs
! #undef div
! #undef ldiv
! #undef lldiv
  #undef mblen
+ #undef mbtowc
+ #undef wctomb
+ #undef mbstowcs
+ #undef wcstombs
+ #undef atoll
+ #undef strtoll
+ #undef strtoull
+ #undef strtold
  
  namespace std 
  {
Index: include/c_std/bits/std_cstring.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cstring.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cstring.h
*** std_cstring.h	2001/01/02 07:38:47	1.4
--- std_cstring.h	2001/02/05 22:09:33
***************
*** 42,47 ****
--- 42,71 ----
  #pragma GCC system_header
  #include <string.h>
  
+ // Get rid of those macros defined in <string.h> in lieu of real functions.
+ #undef memcpy
+ #undef memmove
+ #undef strcpy
+ #undef strncpy
+ #undef strcat
+ #undef strncat
+ #undef memcmp
+ #undef strcmp
+ #undef strcoll
+ #undef strncmp
+ #undef strxfrm
+ #undef memchr
+ #undef strchr
+ #undef strcspn
+ #undef strpbrk
+ #undef strrchr
+ #undef strspn
+ #undef strstr
+ #undef strtok
+ #undef memset
+ #undef strerror
+ #undef strlen
+ 
  namespace std 
  {
    extern "C" void* memcpy(void*, const void*, size_t); 
Index: include/c_std/bits/std_ctime.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_ctime.h,v
retrieving revision 1.5
diff -c -p -r1.5 std_ctime.h
*** std_ctime.h	2001/01/09 07:42:45	1.5
--- std_ctime.h	2001/02/05 22:09:34
***************
*** 42,48 ****
--- 42,57 ----
  #pragma GCC system_header
  #include <time.h>
  
+ // Get rid of those macros defined in <time.h> in lieu of real functions.
+ #undef clock
  #undef difftime
+ #undef mktime
+ #undef time
+ #undef asctime
+ #undef ctime
+ #undef gmtime
+ #undef localtime
+ #undef strftime
  
  namespace std
  {
Index: include/c_std/bits/std_cwchar.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cwchar.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cwchar.h
*** std_cwchar.h	2001/01/02 07:38:47	1.4
--- std_cwchar.h	2001/02/05 22:09:34
***************
*** 46,51 ****
--- 46,52 ----
  #include <wchar.h>
  #endif
  
+ 
  // Need to do a bit of trickery here with mbstate_t as char_traits
  // assumes it is in wchar.h, regardless of wchar_t specializations.
  #ifndef _GLIBCPP_HAVE_MBSTATE_T
*************** namespace std 
*** 64,70 ****
--- 65,114 ----
  }
  
  // Get rid of those macros defined in <wchar.h> in lieu of real functions.
+ #undef vwprintf
+ #undef vwscanf
+ #undef wprintf
+ #undef wscanf
+ #undef getwc
  #undef getwchar
+ #undef mbsinit
+ #undef mbrlen
+ #undef mbrtowc
+ #undef mbsrtowcs
+ #undef wcsrtombs
+ #undef putwc
+ #undef putwchar
+ #undef ungetwc
+ #undef wcrtomb
+ #undef wcstod
+ #undef wcstof
+ #undef wcstol
+ #undef wcstoul
+ #undef wcscpy
+ #undef wcsncpy
+ #undef wcscat
+ #undef wcsncat
+ #undef wcscmp
+ #undef wcscoll
+ #undef wcsncmp
+ #undef wcsxfrm
+ #undef wcschr
+ #undef wcscspn
+ #undef wcslen
+ #undef wcspbrk
+ #undef wcsrchr
+ #undef wcsspn
+ #undef wcsstr
+ #undef wcstok
+ #undef wmemchr
+ #undef wmemcmp
+ #undef wmemcpy
+ #undef wmemmove
+ #undef wmemset
+ #undef wcsftime
+ #undef wcstold
+ #undef wcstoll
+ #undef wcstoull
  
  #if _GLIBCPP_USE_WCHAR_T
  namespace std

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