Commit Graph

709 Commits

Author SHA1 Message Date
Joseph Myers ed9a38e21b Clean up trivially redundant __USE_MISC conditionals.
This patch cleans up cases of __USE_MISC that are trivially redundant
after the recent substitution of __USE_MISC for __USE_BSD and
__USE_SVID: either in constructs such as "defined __USE_MISC ||
defined __USE_MISC", or else (in the bits/mman.h case) a conditional
on __USE_MISC nested inside another __USE_MISC conditional.  (The
cleanups remaining after this patch are still quite large, but it
seems a reasonable piece to separate out.)

Tested x86_64.

	* bits/mman.h [__USE_MISC]: Remove redundant conditionals.
	* ctype/ctype.h [__USE_MISC]: Likewise.
	* dirent/dirent.h [__USE_MISC]: Likewise.
	* grp/grp.h [__USE_MISC]: Likewise.
	* io/fcntl.h [__USE_MISC]: Likewise.
	* io/sys/stat.h [__USE_MISC]: Likewise.
	* libio/stdio.h [__USE_MISC]: Likewise.
	* posix/unistd.h [__USE_MISC]: Likewise.
	* pwd/pwd.h [__USE_MISC]: Likewise.
	* stdlib.h [__USE_MISC]: Likewise.
	* string/bits/string2.h [__USE_MISC]: Likewise.
	* string/string.h [__USE_MISC]: Likewise.
	* time/time.h [__USE_MISC]: Likewise.
2014-02-13 22:07:53 +00:00
Joseph Myers 498afc54df Combine __USE_BSD and __USE_SVID into __USE_MISC.
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.

The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros.  Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name.  This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch.  (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)

Tested x86_64.

	* include/features.h (__USE_BSD): Remove macro definitions.
	(__USE_SVID): Likewise.
	(_BSD_SOURCE): Likewise.
	(_SVID_SOURCE): Likewise.
	[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
	from definition of _DEFAULT_SOURCE.
	[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
	[_DEFAULT_SOURCE].
	* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
	* bits/mman.h [__USE_BSD]: Likewise.
	* bits/termios.h [__USE_BSD]: Likewise.
	* bits/waitstatus.h [__USE_BSD]: Likewise.
	* ctype/ctype.h [__USE_SVID]: Likewise.
	* dirent/dirent.h [__USE_BSD]: Likewise.
	* grp/grp.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* inet/netinet/igmp.h [__USE_BSD]: Likewise.
	* io/fcntl.h [__USE_BSD]: Likewise.
	* io/ftw.h [__USE_BSD]: Likewise.
	* io/sys/stat.h [__USE_BSD]: Likewise.
	* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
	* libio/bits/stdio2.h [__USE_BSD]: Likewise.
	* libio/stdio.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* math/math.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
	* misc/bits/syslog.h [__USE_BSD]: Likewise.
	* misc/search.h [__USE_SVID]: Likewise.
	* misc/sys/mman.h [__USE_BSD]: Likewise.
	* misc/sys/syslog.h [__USE_BSD]: Likewise.
	* misc/sys/uio.h [__USE_BSD]: Likewise.
	* posix/bits/unistd.h [__USE_BSD]: Likewise.
	* posix/glob.h [__USE_BSD]: Likewise.
	* posix/regex.h [__USE_BSD]: Likewise.
	* posix/sys/types.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* posix/sys/utsname.h [__USE_SVID]: Likewise.
	* posix/sys/wait.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* posix/unistd.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* pwd/pwd.h [__USE_SVID]: Likewise.
	* resolv/netdb.h [__USE_BSD]: Likewise.
	* setjmp/setjmp.h [__USE_BSD]: Likewise.
	* signal/signal.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* socket/sys/socket.h [__USE_BSD]: Likewise.
	* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
	* stdlib/stdlib.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* string/bits/string2.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.
	* string/bits/string3.h [__USE_BSD]: Likewise.
	* string/endian.h [__USE_BSD]: Likewise.
	* string/string.h [__USE_SVID]: Likewise.
	[__USE_BSD]: Likewise.
	* string/strings.h [__USE_BSD]: Likewise.
	* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
	* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
	* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
	* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
	Likewise.
	* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
	* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
	* termios/termios.h [__USE_BSD]: Likewise.
	* time/sys/time.h [__USE_BSD]: Likewise.
	* time/time.h [__USE_BSD]: Likewise.
	[__USE_SVID]: Likewise.

	* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
	condition to [__USE_MISC].
2014-02-12 23:41:01 +00:00
Ondřej Bílka 83a3406e0f Remove unused variable from stdlib/setenv.c 2014-02-11 12:43:49 +01:00
Ondřej Bílka a1ffb40e32 Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
Ondřej Bílka 1448f32447 Fix previous commit. 2014-02-10 14:22:31 +01:00
Ondřej Bílka f3d338c9f3 Deduplicate setenv.
Setenv contained a code path that was redundant as it could be handled
in general case.
2014-02-10 12:54:10 +01:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers ab07cea8bb Update longlong.h from GCC. 2013-12-04 17:40:43 +00:00
Andreas Schwab a7931fcfba Properly handle unavailable elements in LC_MONETARY category 2013-11-18 12:50:09 +01:00
Joseph Myers 9310c284ae Fix strtod rounding of half the least subnormal (bug 16151). 2013-11-13 12:59:54 +00:00
Ondřej Bílka bbea82f7fe Remove code from div that is by C99 obsolete. Fixes bug 15799 2013-10-30 16:08:12 +01:00
Liubov Dmitrieva d84f25c7d8 Fix buffer overrun in strtod_l 2013-09-19 16:52:04 +04:00
Allan McRae 34829bc28f Fix memory leak in stdlib/isomac.c 2013-09-09 22:53:46 +10:00
Ondřej Bílka f24a6d086b Fix then/than typos. 2013-08-30 18:10:31 +02:00
Thomas Schwinge 0007fc9bdd [BZ #15522] strtod ("nan(N)") returning a sNaN in some cases 2013-08-29 12:22:10 +02:00
Ondřej Bílka 6f65e66895 Fix typos. 2013-08-29 09:11:45 +02:00
Andreas Schwab ffabd3937a Fix dependencies for stdlib/tst-tls-atexit 2013-08-26 10:21:59 +02:00
Ondřej Bílka c0c3f78afb Fix typos. 2013-08-21 19:48:48 +02:00
Joseph Myers 1b2feed264 Make tst-strtod-round use ROUNDING_TESTS. 2013-06-14 17:58:41 +00:00
Joseph Myers 1f24b9ad0f Rework tst-strtod-round handling of inexact results. 2013-06-13 15:41:58 +00:00
Joseph Myers 60d2f8f3c7 Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
Joseph Myers 2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Ondrej Bilka 350635a59a Fix leading whitespaces. 2013-06-06 20:36:07 +02:00
Joseph Myers 9c84384cc1 Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
Joseph Myers fab7ce3f5b Link extra-libs consistently with libc and ld.so. 2013-05-31 16:16:33 +00:00
Ryan S. Arnold e054f49430 Add #include <stdint.h> for uint[32|64]_t usage (except installed headers). 2013-05-16 11:32:54 -05:00
Andreas Jaeger 9ce3b2cbd2 BZ#15380: Fix initstate error return
[BZ #15380]
	* stdlib/random.c (__initstate): Return NULL if
	__initstate fails.
2013-04-29 21:02:16 +02:00
Andreas Jaeger 4220c3ef77 Fix guards for qecvt
[BZ #15007]
	* stdlib/stdlib.h: Update guards for qecvt.
	* stdlib/bits/stdlib-ldbl.h: Sync guards for qecvt etc with
	<stdlib.h>.
2013-04-27 16:21:53 +02:00
Thomas Schwinge ee091edf1a More tests for external charater sequences representing NaNs. 2013-04-05 22:41:20 +02:00
Roland McGrath e57b0c6100 Avoid unconditional __call_tls_dtors calls in static linking. 2013-03-28 16:52:57 -07:00
Ondrej Bilka a065ceffdf Do not warn about mblen, mbtowc and wctomb unused result. 2013-03-20 08:08:27 +01:00
Jakub Jelinek 2389741abb * stdlib/strtod_l.c (__mpn_lshift_1): Rewritten as function-like
macro.
2013-02-19 17:56:59 +01:00
Siddhesh Poyarekar 2016b3cd19 Fix copyright year in new files 2013-02-19 09:21:52 +05:30
Mike Frysinger 4be9b544ea stdlib.h: use existing malloc/alloc_size attribute defines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-18 17:19:00 -05:00
Siddhesh Poyarekar ba384f6ed9 C++11 thread_local destructors support
This feature is specifically for the C++ compiler to offload calling
thread_local object destructors on thread program exit, to glibc.
This is to overcome the possible complication of destructors of
thread_local objects getting called after the DSO in which they're
defined is unloaded by the dynamic linker.  The DSO is marked as
'unloadable' if it has a constructed thread_local object and marked as
'unloadable' again when all the constructed thread_local objects
defined in it are destroyed.
2013-02-18 19:08:21 +05:30
Ondrej Bilka cc7834d65e Install stdlib-bsearch.h header 2013-02-13 13:44:36 +01:00
Ondrej Bilka 41eda41d74 Add inline bsearch expansion. 2013-02-11 23:18:09 +01:00
Carlos O'Donell 9a0d1941d3 getenv: Remove check for non-standard endianness.
stdlib/getenv.c (getenv): Assume __BIG_ENDIAN in the
else clause and remove check for non-standard endianness.
2013-02-04 20:11:36 -05:00
Joseph Myers 6a57d93130 Remove __GLIBC_HAVE_LONG_LONG. 2013-01-11 21:13:25 +00:00
H.J. Lu 740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Joseph Myers 828beb132d Use __extension__ with long long in installed headers. 2013-01-10 20:19:45 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Joseph Myers f4cf5f2d8b Add script to update copyright notices and reformat some to facilitate its use. 2013-01-01 16:29:10 +00:00
Joseph Myers 9bde902c76 Declare ecvt, fcvt, gcvt, mktemp in stdlib.h for XOPEN2K (bug 14824). 2012-11-09 21:16:58 +00:00
Thomas Schwinge b830319d49 [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
H.J. Lu f62c8abcfb Compile x86 rtld with -mno-sse -mno-mmx 2012-11-02 18:43:27 -07:00
Joseph Myers 2a27fd6dae Fix strtod handling of underflow (bug 14047). 2012-10-30 13:51:27 +00:00
Joseph Myers 03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
Dmitry V. Levin 57c69bef13 Set "fail on error" mode directly in testsuite shell scripts 2012-09-25 02:48:31 +00:00
Joseph Myers 6c9b0f6826 Make strtod respect the rounding mode (bug 14518). 2012-09-12 23:36:19 +00:00