Browse Source

Enable _GNU_SOURCE build wide, trying to get consistent interfaces, else IMA is a useless attempt

Peter S. Mazinger 18 years ago
parent
commit
df31d32b41
100 changed files with 11 additions and 136 deletions
  1. 0 5
      extra/locale/gen_collate.c
  2. 0 1
      extra/locale/gen_locale.c
  3. 0 1
      extra/locale/gen_wc8bit.c
  4. 0 2
      extra/locale/gen_wctype.c
  5. 0 2
      extra/locale/tst_nl_langinfo.c
  6. 1 1
      include/libc-symbols.h
  7. 1 1
      ldso/ldso/Makefile.in
  8. 3 2
      ldso/libdl/libdl.c
  9. 0 1
      libc/inet/addr.c
  10. 0 1
      libc/inet/gai_strerror.c
  11. 0 1
      libc/inet/getaddrinfo.c
  12. 0 1
      libc/inet/getproto.c
  13. 0 1
      libc/inet/getservice.c
  14. 0 1
      libc/inet/if_index.c
  15. 0 1
      libc/inet/ifaddrs.c
  16. 0 2
      libc/inet/rpc/rcmd.c
  17. 0 1
      libc/inet/rpc/svc.c
  18. 0 1
      libc/inet/rpc/svc_auth_unix.c
  19. 0 1
      libc/inet/rpc/svc_run.c
  20. 0 1
      libc/inet/rpc/svc_simple.c
  21. 0 1
      libc/inet/rpc/svc_tcp.c
  22. 0 1
      libc/inet/rpc/svc_udp.c
  23. 0 1
      libc/inet/rpc/xdr.c
  24. 0 1
      libc/inet/rpc/xdr_array.c
  25. 0 1
      libc/inet/rpc/xdr_float.c
  26. 0 1
      libc/inet/rpc/xdr_mem.c
  27. 0 1
      libc/inet/rpc/xdr_rec.c
  28. 0 1
      libc/inet/rpc/xdr_reference.c
  29. 0 1
      libc/misc/ctype/ctype.c
  30. 0 1
      libc/misc/error/err.c
  31. 0 2
      libc/misc/file/lockf64.c
  32. 0 5
      libc/misc/fnmatch/fnmatch.c
  33. 0 5
      libc/misc/fnmatch/fnmatch_old.c
  34. 0 1
      libc/misc/ftw/ftw.c
  35. 0 1
      libc/misc/glob/glob.c
  36. 0 1
      libc/misc/glob/glob64.c
  37. 0 2
      libc/misc/locale/locale.c
  38. 0 1
      libc/misc/pthread/no-tsd.c
  39. 0 1
      libc/misc/pthread/weaks.c
  40. 0 1
      libc/misc/regex/regex.c
  41. 0 4
      libc/misc/regex/regex_old.c
  42. 0 4
      libc/misc/search/hsearch.c
  43. 0 4
      libc/misc/search/hsearch_r.c
  44. 0 4
      libc/misc/search/insremque.c
  45. 0 1
      libc/misc/search/tsearch.c
  46. 0 2
      libc/misc/statfs/fstatvfs.c
  47. 0 1
      libc/misc/statfs/fstatvfs64.c
  48. 0 2
      libc/misc/statfs/statvfs.c
  49. 0 1
      libc/misc/statfs/statvfs64.c
  50. 0 1
      libc/misc/syslog/syslog.c
  51. 0 1
      libc/misc/time/time.c
  52. 0 1
      libc/misc/ttyent/getttyent.c
  53. 0 1
      libc/misc/wchar/wchar.c
  54. 0 1
      libc/misc/wchar/wstdio.c
  55. 0 1
      libc/misc/wctype/wctype.c
  56. 0 1
      libc/misc/wordexp/wordexp.c
  57. 0 1
      libc/pwd_grp/pwd_grp.c
  58. 0 1
      libc/pwd_grp/pwd_grp_internal.c
  59. 0 1
      libc/signal/sigandset.c
  60. 0 1
      libc/signal/sighold.c
  61. 0 1
      libc/signal/sigignore.c
  62. 0 1
      libc/signal/sigisempty.c
  63. 0 1
      libc/signal/sigorset.c
  64. 2 0
      libc/signal/sigpause.c
  65. 0 1
      libc/signal/sigrelse.c
  66. 0 1
      libc/signal/sigset.c
  67. 0 2
      libc/stdio/_stdio.h
  68. 0 1
      libc/stdio/old_vfprintf.c
  69. 0 1
      libc/stdio/scanf.c
  70. 0 1
      libc/stdio/vfprintf.c
  71. 0 1
      libc/stdlib/abort.c
  72. 0 1
      libc/stdlib/atexit.c
  73. 0 1
      libc/stdlib/getpt.c
  74. 0 1
      libc/stdlib/lldiv.c
  75. 0 1
      libc/stdlib/malloc-simple/alloc.c
  76. 0 1
      libc/stdlib/malloc-standard/malloc.c
  77. 0 1
      libc/stdlib/ptsname.c
  78. 0 1
      libc/stdlib/random.c
  79. 0 1
      libc/stdlib/random_r.c
  80. 0 1
      libc/stdlib/setenv.c
  81. 0 1
      libc/stdlib/stdlib.c
  82. 0 1
      libc/stdlib/strtod.c
  83. 1 2
      libc/string/__xpg_strerror_r.c
  84. 0 1
      libc/string/_string.h
  85. 0 1
      libc/string/generic/memmem.c
  86. 0 1
      libc/string/generic/mempcpy.c
  87. 0 1
      libc/string/generic/memrchr.c
  88. 0 1
      libc/string/generic/rawmemchr.c
  89. 0 1
      libc/string/generic/strchrnul.c
  90. 0 1
      libc/string/generic/strnlen.c
  91. 0 1
      libc/string/generic/strtok_r.c
  92. 0 1
      libc/string/i386/strnlen.c
  93. 0 1
      libc/string/psignal.c
  94. 0 1
      libc/string/strsignal.c
  95. 0 1
      libc/sysdeps/linux/common/_exit.c
  96. 2 4
      libc/sysdeps/linux/common/bits/errno.h
  97. 1 1
      libc/sysdeps/linux/common/bits/uClibc_stdio.h
  98. 0 1
      libc/sysdeps/linux/common/clock_getres.c
  99. 0 1
      libc/sysdeps/linux/common/clock_gettime.c
  100. 0 1
      libc/sysdeps/linux/common/clock_settime.c

+ 0 - 5
extra/locale/gen_collate.c

@@ -15,11 +15,6 @@
  *
  */
 
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>

+ 0 - 1
extra/locale/gen_locale.c

@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 0 - 1
extra/locale/gen_wc8bit.c

@@ -1,4 +1,3 @@
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 0 - 2
extra/locale/gen_wctype.c

@@ -1,5 +1,3 @@
-
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 0 - 2
extra/locale/tst_nl_langinfo.c

@@ -1,5 +1,3 @@
-#define _GNU_SOURCE
-
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>

+ 1 - 1
include/libc-symbols.h

@@ -24,7 +24,7 @@
 #define _LIBC 1
 
 /* Enable declarations of GNU extensions, since we are compiling them.  */
-/* #define _GNU_SOURCE 1 */
+#define _GNU_SOURCE 1
 
 /* Prepare for the case that `__builtin_expect' is not available.  */
 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96

+ 1 - 1
ldso/ldso/Makefile.in

@@ -5,7 +5,7 @@
 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
 #
 
-CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS) -D_GNU_SOURCE
+CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS)
 
 # This stuff will not work with -fomit-frame-pointer
 CFLAGS-ldso += -fno-omit-frame-pointer

+ 3 - 2
ldso/libdl/libdl.c

@@ -3,7 +3,7 @@
  * Program to load an ELF binary on a linux system, and run it
  * after resolving ELF shared library symbols
  *
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
  * Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
  *				David Engel, Hongjiu Lu and Mitch D'Souza
  *
@@ -30,7 +30,6 @@
  */
 
 
-#define _GNU_SOURCE
 #include <ldso.h>
 #include <stdio.h>
 
@@ -599,6 +598,7 @@ char *dlerror(void)
 /*
  * Dump information to stderrr about the current loaded modules
  */
+#ifdef __USE_GNU
 static char *type[] = { "Lib", "Exe", "Int", "Mod" };
 
 int dlinfo(void)
@@ -703,3 +703,4 @@ int dladdr(const void *__address, Dl_info * __info)
 		return 1;
 	}
 }
+#endif

+ 0 - 1
libc/inet/addr.c

@@ -16,7 +16,6 @@
  * Changed to use _int10tostr.
  */
 
-#define _GNU_SOURCE
 #define __FORCE_GLIBC
 #include <features.h>
 #include <stdio.h>

+ 0 - 1
libc/inet/gai_strerror.c

@@ -17,7 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #define __FORCE_GLIBC
 #include <features.h>
 #include <stdio.h>

+ 0 - 1
libc/inet/getaddrinfo.c

@@ -49,7 +49,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
   If these license terms cause you a real problem, contact the author.  */
 
-#define _GNU_SOURCE
 #define __FORCE_GLIBC
 #include <features.h>
 #include <assert.h>

+ 0 - 1
libc/inet/getproto.c

@@ -52,7 +52,6 @@
 */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 #include <sys/types.h>
 #include <sys/socket.h>

+ 0 - 1
libc/inet/getservice.c

@@ -52,7 +52,6 @@
 */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 #include <sys/types.h>
 #include <sys/socket.h>

+ 0 - 1
libc/inet/if_index.c

@@ -22,7 +22,6 @@
 
 #define __FORCE_GLIBC
 #include <features.h>
-#define __USE_GNU
 #include <string.h>
 #include <alloca.h>
 #include <errno.h>

+ 0 - 1
libc/inet/ifaddrs.c

@@ -19,7 +19,6 @@
 
 #define __FORCE_GLIBC
 #include <features.h>
-#define __USE_GNU
 #include <alloca.h>
 #include <assert.h>
 #include <errno.h>

+ 0 - 2
libc/inet/rpc/rcmd.c

@@ -38,8 +38,6 @@ static char sccsid[] = "@(#)rcmd.c	8.3 (Berkeley) 3/26/94";
 #define __UCLIBC_HIDE_DEPRECATED__
 #define __FORCE_GLIBC
 #include <features.h>
-
-#define __USE_GNU
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>

+ 0 - 1
libc/inet/rpc/svc.c

@@ -37,7 +37,6 @@
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <errno.h>

+ 0 - 1
libc/inet/rpc/svc_auth_unix.c

@@ -39,7 +39,6 @@
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/svc_run.c

@@ -32,7 +32,6 @@
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <errno.h>

+ 0 - 1
libc/inet/rpc/svc_simple.c

@@ -39,7 +39,6 @@ static char sccsid[] = "@(#)svc_simple.c 1.18 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/svc_tcp.c

@@ -42,7 +42,6 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/svc_udp.c

@@ -40,7 +40,6 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/xdr.c

@@ -42,7 +42,6 @@ static char sccsid[] = "@(#)xdr.c 1.35 87/08/12";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/xdr_array.c

@@ -41,7 +41,6 @@ static char sccsid[] = "@(#)xdr_array.c 1.10 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/xdr_float.c

@@ -42,7 +42,6 @@ static char sccsid[] = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/inet/rpc/xdr_mem.c

@@ -39,7 +39,6 @@
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 

+ 0 - 1
libc/inet/rpc/xdr_rec.c

@@ -45,7 +45,6 @@
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 

+ 0 - 1
libc/inet/rpc/xdr_reference.c

@@ -41,7 +41,6 @@ static char sccsid[] = "@(#)xdr_reference.c 1.11 87/08/11 SMI";
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 
 #include <stdio.h>

+ 0 - 1
libc/misc/ctype/ctype.c

@@ -26,7 +26,6 @@
  *
  *  ATTENTION!   ATTENTION!   ATTENTION!   ATTENTION!   ATTENTION! */
 
-#define _GNU_SOURCE
 #define __NO_CTYPE
 
 #include <ctype.h>

+ 0 - 1
libc/misc/error/err.c

@@ -5,7 +5,6 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 0 - 2
libc/misc/file/lockf64.c

@@ -31,8 +31,6 @@
 #endif
 #endif
 
-#define __USE_GNU
-
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>

+ 0 - 5
libc/misc/fnmatch/fnmatch.c

@@ -21,11 +21,6 @@
 # include <config.h>
 #endif
 
-/* Enable GNU extensions in fnmatch.h.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
 #include <features.h>
 #ifdef __UCLIBC__
 # undef _LIBC

+ 0 - 5
libc/misc/fnmatch/fnmatch_old.c

@@ -19,11 +19,6 @@ Cambridge, MA 02139, USA.  */
 # include <config.h>
 #endif
 
-/* Enable GNU extensions in fnmatch.h.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE
-#endif
-
 #include <errno.h>
 #include <fnmatch.h>
 #include <ctype.h>

+ 0 - 1
libc/misc/ftw/ftw.c

@@ -22,7 +22,6 @@
 # include <config.h>
 #endif
 
-#define _GNU_SOURCE
 #define _XOPEN_SOURCE 500
 #include <features.h>
 #ifdef __UCLIBC__

+ 0 - 1
libc/misc/glob/glob.c

@@ -15,7 +15,6 @@ License along with this library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <stdlib.h>
 #include <string.h>

+ 0 - 1
libc/misc/glob/glob64.c

@@ -4,7 +4,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 
 #ifdef __UCLIBC_HAS_LFS__

+ 0 - 2
libc/misc/locale/locale.c

@@ -46,8 +46,6 @@
  *    locale support had (8-bit codesets only).
  */
 
-#define _GNU_SOURCE
-
 #define __CTYPE_HAS_8_BIT_LOCALES 1
 
 #include <string.h>

+ 0 - 1
libc/misc/pthread/no-tsd.c

@@ -17,7 +17,6 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define _GNU_SOURCE
 #include <bits/libc-tsd.h>
 
 /* This file provides uinitialized (common) definitions for the

+ 0 - 1
libc/misc/pthread/weaks.c

@@ -17,7 +17,6 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define _GNU_SOURCE
 #include <libc-internal.h>
 
 /* Weaks for internal library use only.

+ 0 - 1
libc/misc/regex/regex.c

@@ -23,7 +23,6 @@
 #endif
 
 /* uClibc addons */
-#define _GNU_SOURCE
 #include <features.h>
 
 #ifdef __UCLIBC__

+ 0 - 4
libc/misc/regex/regex_old.c

@@ -22,7 +22,6 @@
 
 /* To exclude some unwanted junk.... */
 #undef emacs
-#define _GNU_SOURCE
 #include <features.h>
 #ifdef __UCLIBC__
 # undef _LIBC
@@ -49,9 +48,6 @@ libc_hidden_proto(abort)
   #pragma alloca
 #endif
 
-#undef	_GNU_SOURCE
-#define _GNU_SOURCE
-
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif

+ 0 - 4
libc/misc/search/hsearch.c

@@ -17,10 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include <search.h>
 
 libc_hidden_proto(hdestroy_r)

+ 0 - 4
libc/misc/search/hsearch_r.c

@@ -17,10 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
 #include <errno.h>
 #include <malloc.h>
 #include <string.h>

+ 0 - 4
libc/misc/search/insremque.c

@@ -17,11 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <features.h>
-#define __USE_GNU
 #include <stddef.h>
-#ifndef _SVID_SOURCE
-#define _SVID_SOURCE 1
-#endif
 #include <search.h>
 
 #ifdef L_insque

+ 0 - 1
libc/misc/search/tsearch.c

@@ -28,7 +28,6 @@ Cambridge, MA 02139, USA.  */
  */
 /*LINTLIBRARY*/
 
-#define _GNU_SOURCE
 #include <search.h>
 #include <stdlib.h>
 

+ 0 - 2
libc/misc/statfs/fstatvfs.c

@@ -18,8 +18,6 @@
    02111-1307 USA.  */
 
 #include <features.h>
-
-#define __USE_GNU
 #include <errno.h>
 #include <mntent.h>
 #include <paths.h>

+ 0 - 1
libc/misc/statfs/fstatvfs64.c

@@ -30,7 +30,6 @@
 # define __USE_LARGEFILE64	1
 #endif
 
-#define __USE_GNU
 #include <errno.h>
 #include <mntent.h>
 #include <paths.h>

+ 0 - 2
libc/misc/statfs/statvfs.c

@@ -18,8 +18,6 @@
    02111-1307 USA.  */
 
 #include <features.h>
-
-#define __USE_GNU
 #include <errno.h>
 #include <mntent.h>
 #include <paths.h>

+ 0 - 1
libc/misc/statfs/statvfs64.c

@@ -32,7 +32,6 @@
 #endif
 #endif
 
-#define __USE_GNU
 #include <errno.h>
 #include <mntent.h>
 #include <paths.h>

+ 0 - 1
libc/misc/syslog/syslog.c

@@ -59,7 +59,6 @@
  */
 
 #define __FORCE_GLIBC
-#define _GNU_SOURCE
 #include <features.h>
 #include <sys/types.h>
 #include <sys/socket.h>

+ 0 - 1
libc/misc/time/time.c

@@ -129,7 +129,6 @@
  *            differs (intentionally) from glibc's behavior.
  */
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <stddef.h>

+ 0 - 1
libc/misc/ttyent/getttyent.c

@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <ttyent.h>
 #include <stdio.h>

+ 0 - 1
libc/misc/wchar/wchar.c

@@ -98,7 +98,6 @@
  * Manuel
  */
 
-#define _GNU_SOURCE
 #define _ISOC99_SOURCE
 #include <errno.h>
 #include <stddef.h>

+ 0 - 1
libc/misc/wchar/wstdio.c

@@ -49,7 +49,6 @@
  * Should auto_wr_transition init the mbstate object?
 */
 
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <wchar.h>
 #include <limits.h>

+ 0 - 1
libc/misc/wctype/wctype.c

@@ -26,7 +26,6 @@
  *
  *  ATTENTION!   ATTENTION!   ATTENTION!   ATTENTION!   ATTENTION! */
 
-#define _GNU_SOURCE
 #define __NO_CTYPE
 
 #include <wctype.h>

+ 0 - 1
libc/misc/wordexp/wordexp.c

@@ -19,7 +19,6 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <sys/types.h>
 #include <sys/wait.h>

+ 0 - 1
libc/pwd_grp/pwd_grp.c

@@ -18,7 +18,6 @@
  *
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <stdio.h>
 #include <stdlib.h>

+ 0 - 1
libc/pwd_grp/pwd_grp_internal.c

@@ -18,7 +18,6 @@
  *
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <stdio.h>
 #include <stdlib.h>

+ 0 - 1
libc/signal/sigandset.c

@@ -17,7 +17,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#define __USE_GNU
 #include <signal.h>
 #define __need_NULL
 #include <stddef.h>

+ 0 - 1
libc/signal/sighold.c

@@ -20,7 +20,6 @@
 
 #define __need_NULL
 #include <stddef.h>
-#define _GNU_SOURCE
 #include <signal.h>
 
 libc_hidden_proto(sigprocmask)

+ 0 - 1
libc/signal/sigignore.c

@@ -18,7 +18,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <errno.h>
 #define __need_NULL
 #include <stddef.h>

+ 0 - 1
libc/signal/sigisempty.c

@@ -17,7 +17,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#define __USE_GNU
 #include <signal.h>
 #define __need_NULL
 #include <stddef.h>

+ 0 - 1
libc/signal/sigorset.c

@@ -17,7 +17,6 @@
    02111-1307 USA.  */
 
 #include <errno.h>
-#define __USE_GNU
 #include <signal.h>
 #define __need_NULL
 #include <stddef.h>

+ 2 - 0
libc/signal/sigpause.c

@@ -18,6 +18,8 @@
    02111-1307 USA.  */
 
 #define __UCLIBC_HIDE_DEPRECATED__
+/* psm: need the BSD version of sigpause here */
+#undef _GNU_SOURCE
 #define _BSD_SOURCE
 #include <errno.h>
 #include <signal.h>

+ 0 - 1
libc/signal/sigrelse.c

@@ -20,7 +20,6 @@
 
 #define __need_NULL
 #include <stddef.h>
-#define _GNU_SOURCE
 #include <signal.h>
 
 libc_hidden_proto(sigprocmask)

+ 0 - 1
libc/signal/sigset.c

@@ -19,7 +19,6 @@
 #include <errno.h>
 #define __need_NULL
 #include <stddef.h>
-#define __USE_XOPEN_EXTENDED
 #include <signal.h>
 #include <string.h>	/* For the real memset prototype.  */
 

+ 0 - 2
libc/stdio/_stdio.h

@@ -5,8 +5,6 @@
  * Dedicated to Toni.  See uClibc/DEDICATION.mjn3 for details.
  */
 
-#define _GNU_SOURCE
-
 #include <features.h>
 #include <assert.h>
 #include <errno.h>

+ 0 - 1
libc/stdio/old_vfprintf.c

@@ -128,7 +128,6 @@
 /**************************************************************************/
 
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
-#define _GNU_SOURCE				/* for strnlen */
 #include "_stdio.h"
 /* #include <stdio.h> */
 #include <stdarg.h>

+ 0 - 1
libc/stdio/scanf.c

@@ -44,7 +44,6 @@
  */
 
 #define _ISOC99_SOURCE			/* for LLONG_MAX primarily... */
-#define _GNU_SOURCE
 #include <features.h>
 #include "_stdio.h"
 #include <stdlib.h>

+ 0 - 1
libc/stdio/vfprintf.c

@@ -89,7 +89,6 @@
  */
 
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
-#define _GNU_SOURCE
 #include <features.h>
 #include "_stdio.h"
 #include <stdlib.h>

+ 0 - 1
libc/stdlib/abort.c

@@ -18,7 +18,6 @@ Cambridge, MA 02139, USA.  */
 
 /* Hacked up for uClibc by Erik Andersen */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <signal.h>
 #include <stdio.h>

+ 0 - 1
libc/stdlib/atexit.c

@@ -37,7 +37,6 @@
  *
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <unistd.h>
 #include <stdlib.h>

+ 0 - 1
libc/stdlib/getpt.c

@@ -17,7 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>

+ 0 - 1
libc/stdlib/lldiv.c

@@ -17,7 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <stdlib.h>
 

+ 0 - 1
libc/stdlib/malloc-simple/alloc.c

@@ -6,7 +6,6 @@
  * Parts of the memalign code were stolen from malloc-930716.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <unistd.h>
 #include <stdio.h>

+ 0 - 1
libc/stdlib/malloc-standard/malloc.c

@@ -14,7 +14,6 @@
   Hacked up for uClibc by Erik Andersen <andersen@codepoet.org>
 */
 
-#define _GNU_SOURCE
 #include "malloc.h"
 
 

+ 0 - 1
libc/stdlib/ptsname.c

@@ -18,7 +18,6 @@
    02111-1307 USA.  */
 
 #define _ISOC99_SOURCE
-#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <paths.h>

+ 0 - 1
libc/stdlib/random.c

@@ -22,7 +22,6 @@
  * Rewritten to use reentrant functions by Ulrich Drepper, 1995.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <limits.h>
 #include <stddef.h>

+ 0 - 1
libc/stdlib/random_r.c

@@ -22,7 +22,6 @@
  * Rewritten to be reentrant by Ulrich Drepper, 1995
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <errno.h>
 #include <limits.h>

+ 0 - 1
libc/stdlib/setenv.c

@@ -19,7 +19,6 @@
    modified for uClibc by Erik Andersen <andersen@codepoet.org>
    */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <errno.h>
 #include <stdlib.h>

+ 0 - 1
libc/stdlib/stdlib.c

@@ -33,7 +33,6 @@
  */
 
 #define _ISOC99_SOURCE			/* for ULLONG primarily... */
-#define _GNU_SOURCE
 #include <limits.h>
 #include <stdint.h>
 #include <inttypes.h>

+ 0 - 1
libc/stdlib/strtod.c

@@ -96,7 +96,6 @@
 /**********************************************************************/
 
 #define _ISOC99_SOURCE 1
-#define _GNU_SOURCE
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>

+ 1 - 2
libc/string/__xpg_strerror_r.c

@@ -1,11 +1,10 @@
 /*
  * Copyright (C) 2002     Manuel Novoa III
- * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  *
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <errno.h>
 #include <string.h>

+ 0 - 1
libc/string/_string.h

@@ -8,7 +8,6 @@
 #ifndef __STRING_H
 #define __STRING_H
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <string.h>
 #include <limits.h>

+ 0 - 1
libc/string/generic/memmem.c

@@ -16,7 +16,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <string.h>
 #include <stddef.h>
 

+ 0 - 1
libc/string/generic/mempcpy.c

@@ -5,7 +5,6 @@
 
 /* Ditch the glibc version and just wrap memcpy. */
 
-#define _GNU_SOURCE
 #include <string.h>
 
 libc_hidden_proto(mempcpy)

+ 0 - 1
libc/string/generic/memrchr.c

@@ -22,7 +22,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <string.h>
 #include <stdlib.h>
 #include <limits.h>

+ 0 - 1
libc/string/generic/rawmemchr.c

@@ -21,7 +21,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <string.h>
 #include <stdlib.h>
 #include <limits.h>

+ 0 - 1
libc/string/generic/strchrnul.c

@@ -21,7 +21,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <string.h>
 #include <stdlib.h>
 

+ 0 - 1
libc/string/generic/strnlen.c

@@ -21,7 +21,6 @@
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-#define _GNU_SOURCE
 #include <string.h>
 #include <stdlib.h>
 

+ 0 - 1
libc/string/generic/strtok_r.c

@@ -17,7 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-#define _GNU_SOURCE
 #include <string.h>
 
 libc_hidden_proto(strtok_r)

+ 0 - 1
libc/string/i386/strnlen.c

@@ -30,7 +30,6 @@
  *  -Erik
  */
 
-#define _GNU_SOURCE
 #include <string.h>
 
 libc_hidden_proto(strnlen)

+ 0 - 1
libc/string/psignal.c

@@ -5,7 +5,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <stdio.h>
 #include <string.h>

+ 0 - 1
libc/string/strsignal.c

@@ -13,7 +13,6 @@
 
 /* TODO: make a threadsafe version? */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <string.h>
 #include <bits/uClibc_uintmaxtostr.h>

+ 0 - 1
libc/sysdeps/linux/common/_exit.c

@@ -7,7 +7,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include <features.h>
 #include <errno.h>
 #include <unistd.h>

+ 2 - 4
libc/sysdeps/linux/common/bits/errno.h

@@ -37,15 +37,13 @@ extern int errno;
 /* Function to get address of global `errno' variable.  */
 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
 
-# if defined _LIBC
-#ifdef IS_IN_libc
+# if defined _LIBC && ( defined IS_IN_libc || defined NOT_IN_libc )
 libc_hidden_proto(__errno_location)
-#endif
 /* We wouldn't need a special macro anymore but it is history.  */
 #  define __set_errno(val) ((errno) = (val))
 # endif /* _LIBC */
 
-# if defined __UCLIBC_HAS_THREADS__
+# ifdef __UCLIBC_HAS_THREADS__
 /* When using threads, errno is a per-thread value.  */
 #  define errno (*__errno_location ())
 # endif

+ 1 - 1
libc/sysdeps/linux/common/bits/uClibc_stdio.h

@@ -237,7 +237,7 @@ typedef struct {
 	__io_close_fn *close;
 } _IO_cookie_io_functions_t;
 
-#if defined(_LIBC) || defined(_GNU_SOURCE)
+#ifdef __USE_GNU
 
 typedef __io_read_fn cookie_read_function_t;
 typedef __io_write_fn cookie_write_function_t;

+ 0 - 1
libc/sysdeps/linux/common/clock_getres.c

@@ -7,7 +7,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include "syscalls.h"
 #include <time.h>
 #include <unistd.h>

+ 0 - 1
libc/sysdeps/linux/common/clock_gettime.c

@@ -8,7 +8,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include "syscalls.h"
 #include <time.h>
 #include <sys/time.h>

+ 0 - 1
libc/sysdeps/linux/common/clock_settime.c

@@ -7,7 +7,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#define _GNU_SOURCE
 #include "syscalls.h"
 #include <time.h>
 #include <sys/time.h>

Some files were not shown because too many files changed in this diff