From: Roland McGrath Date: Tue, 19 Mar 1996 21:59:41 +0000 (+0000) Subject: * features.h (__FAVOR_BSD): Define only if _BSD_SOURCE is defined X-Git-Tag: upstream/2.20~22617 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d3669add24e6ebc86ed25683ff4d4eb7c67e4d56;p=platform%2Fupstream%2Flinaro-glibc.git * features.h (__FAVOR_BSD): Define only if _BSD_SOURCE is defined and no other _*_SOURCE macro is. (_GNU_SOURCE): Don't define by default. * libc-symbols.h (_GNU_SOURCE): Define it. --- diff --git a/ChangeLog b/ChangeLog index 3e38860..45095cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ Tue Mar 19 14:18:42 1996 Roland McGrath + * features.h (__FAVOR_BSD): Define only if _BSD_SOURCE is defined + and no other _*_SOURCE macro is. + (_GNU_SOURCE): Don't define by default. + * libc-symbols.h (_GNU_SOURCE): Define it. + * configure.in (alpha*-*-linux*): Unset $gnu_ld and $elf. * config.make.in (weak-symbols): Variable removed. diff --git a/NEWS b/NEWS index 7fb49b6..ec8589b 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ Please send GNU C library bug reports to bug-glibc@prep.ai.mit.edu. Version 1.10 +* GNU extensions are no longer declared by default. To enable them you + must define the macro `_GNU_SOURCE' in your program or compile with + `-D_GNU_SOURCE'. + * The library has changed from using GNU ld symbol aliases to using weak symbols where available. The ELF object file format supports weak symbols; GNU ld also supports weak symbols in the a.out format. (There @@ -34,8 +38,9 @@ Version 1.10 * The C library now provides the run-time support code for profiling executables compiled with `-pg'. Programs can control the profiling code - through the interface in . The profiling code was adapted - from 4.4 BSD-Lite. + through the interface in . The `gmon.out' files written by + the GNU C library can be read only by GNU `gprof' (from GNU binutils); + the support for this file format was contributed by David Mosberger-Tang. * The math code has been replaced with a math library based on fdlibm from Sun, and modified by JT Conklin with i387 support and by Ian Taylor with @@ -142,6 +147,10 @@ Version 1.10 The GNU library now supports Linux versions 1.3.29 and later, using the ELF object file format (i[345]86-*-linux). +* Andreas Schwab has ported the C library to Linux/m68k (m68k-*-linux). + +* David Mosberger-Tang has ported the C library to Linux/Alpha (alpha-*-linux). + * Ulrich Drepper has contributed a new set of message catalog functions to support multiple languages, for use with his new package GNU gettext. diff --git a/features.h b/features.h index 1249bb5..675eac5 100644 --- a/features.h +++ b/features.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1993, 1995 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 93, 95, 96 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 @@ Cambridge, MA 02139, USA. */ _GNU_SOURCE All of the above, plus GNU extensions. The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__. - If none of these are defined, the default is _GNU_SOURCE. + If none of these are defined, the default is all but _GNU_SOURCE. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ANSI C, 1003.1, and 1003.2, but nothing else. @@ -69,20 +69,14 @@ Cambridge, MA 02139, USA. */ #undef __FAVOR_BSD -/* If nothing is defined, define _GNU_SOURCE. */ -#if (!defined(_GNU_SOURCE) && !defined(__STRICT_ANSI__) && \ - !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) && \ - !defined(_BSD_SOURCE) && !defined(_SVID_SOURCE)) -#define _GNU_SOURCE 1 -#endif - - /* Always use ANSI things. */ #define __USE_ANSI 1 /* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ -#ifdef _BSD_SOURCE +#if defined (_BSD_SOURCE) && \ + !(defined (_POSIX_SOURCE) || defined (_POSIX_C_SOURCE) || + defiend (_GNU_SOURCE) || defined (_SVID_SOURCE)) #define __FAVOR_BSD 1 #endif diff --git a/libc-symbols.h b/libc-symbols.h index f7231f9..7405e67 100644 --- a/libc-symbols.h +++ b/libc-symbols.h @@ -46,6 +46,9 @@ Cambridge, MA 02139, USA. */ itself is being compiled, or just some generator program. */ #define _LIBC 1 +/* Enable declarations of GNU extensions, since we are compiling them. */ +#define _GNU_SOURCE 1 + #include /* This disables sccsid/rcsid strings in lots of code of non-GNU origin. */