Commit Graph

343 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
Joseph Myers 8756f74004 Stop io/ftwtest deleting its own output.
If you rerun "make check" in a tree where some tests have already been
run, it will rerun io/ftwtest-sh because that test uses ftwtest.out,
the same name to which output is redirected, as its internal temporary
file, and then removes it on exit.

Clearly tests should not be removing the files to which their output
is redirected like that.  This patch changes the script to use a
different file as its internal temporary file, so the actual output
referenced in the makefile isn't removed.

Tested x86_64.

	* io/ftwtest-sh (testout): Change to $tmp/ftwtest-tmp.out.
2014-02-12 20:52:19 +00:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Roland McGrath 53234cc3a3 Make stub lxstat64 call xstat64, like stub lxstat calls xstat. 2013-08-26 15:11:47 -07:00
Ondřej Bílka c0c3f78afb Fix typos. 2013-08-21 19:48:48 +02:00
Joseph Myers 2e09a79ada Avoid use of "register" as optimization hint. 2013-06-07 22:24:35 +00:00
Roland McGrath 355f916505 Fix poll stub implementation. 2013-05-06 15:23:51 -07:00
Roland McGrath cc0e6ed81f Consolidate definitions of _FORTIFY_SOURCE wrappers for open{,64}{,at}. 2013-05-03 16:33:26 -07:00
Roland McGrath a6a242fe7c Make stub fchdir.c define __fchdir. 2013-04-29 14:30:37 -07:00
Patsy Franklin 39120df9b9 T_REMOVEDIR and AT_EACCESS have the same value.
Add comments to fcntl.h explaining why AT_REMOVEDIR
and AT_EACCESS can have the same value.
2013-03-06 13:39:16 -05:00
Roland McGrath b2e25af00c Fix aliases in stub lseek. 2013-02-05 11:39:20 -08:00
H.J. Lu 740b3dbee8 Add --enable-hardcoded-path-in-tests configure option 2013-01-11 07:14:18 -08:00
Joseph Myers eede9df980 Don't check __GNUC__ together with __USE_EXTERN_INLINES. 2013-01-08 20:08:56 +00:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Marcus Shawcroft c485e4d2cc Adding missing -fexception CFLAGS 2012-11-14 12:35:10 +00:00
Thomas Schwinge b830319d49 [BZ #157] Remove include/stub-tag.h for good. 2012-11-04 19:59:40 +01:00
Joseph Myers 10b40d8567 Use build directory instead of `pwd` in ftwtest-sh. 2012-10-24 11:48:00 +00:00
Andreas Jaeger 3a8db22f07 Always define off_t, mode_t, pid_t
* io/fcntl.h: Always define mode_t, off_t, pid_t and use these
	types for creat, creat64, lockf, posix_fadvise, posix_fallocate.
	[__USE_LARGEFILE64 && !__off64_t_defined]: Define off64_t.
	[__USE_LARGEFILE64]: Use off64_t in declaration of lock64,
	posix_fadvise64, posix_fallocate64.
2012-10-24 08:57:47 +02:00
Joseph Myers 03ac099f6b Define and use $(run-built-tests). 2012-10-24 00:08:46 +00:00
Roland McGrath ac5c94d31d Alsways include <bits/types.h> in <fcntl.h>.
Move include of <bits/types.h> to the top and include it unconditionally.
2012-10-20 12:53:58 +02:00
Joseph Myers 89f1c38881 Use $(built-program-cmd) in io/ftwtest-sh. 2012-10-19 23:31:28 +00:00
Joseph Myers d528cdcfde Use working directory, not /tmp, in io/ftwtest-sh. 2012-10-19 20:01:45 +00:00
Roland McGrath 497a03d6f1 Define __have_atfcts global in stub openat implementation. 2012-10-01 13:07:58 -07:00
Roland McGrath 28c195f756 Fix stub open.c to define __libc_open. 2012-09-28 15:04:26 -07:00
Pino Toscano 72581615f5 tst-mknodat: create a FIFO instead of a socket
A FIFO is the only special file which is guaranteed to be created with mknod/mknodat.
2012-09-28 21:33:52 +02:00
Dmitry V. Levin 57c69bef13 Set "fail on error" mode directly in testsuite shell scripts 2012-09-25 02:48:31 +00:00
Dmitry V. Levin 9a9028b1fe Add copyright notices to testsuite shell scripts 2012-09-25 02:48:13 +00:00
Roland McGrath 952bf94a28 Move stub lseek.c to the right directory. 2012-08-15 15:40:06 -07:00
Roland McGrath 03af952060 Clean up lockf64, fseeko64, ftello64, fgetpos64, fsetpos64 for off64_t == off_t. 2012-08-06 16:48:14 -07:00
Roland McGrath bea9b19322 Fix lots of bitrot for stub configurations. 2012-07-30 16:34:33 -07:00
Thomas Schwinge dc70356cbf Avoid dup3 PLT usage.
Fixes fallout from 5aa3a74a59.
2012-05-12 10:53:04 +08:00
Samuel Thibault f42d41d107 Hurd: Define some posix types 2012-05-10 15:57:29 -07:00
Marek Polacek 5ac3ea17df Fix attributes for fortify functions. 2012-04-29 15:34:20 +02:00
Ulrich Drepper a4300c7a4d Remove distribute variable from Makefiles 2012-03-07 05:17:13 -05:00
Ulrich Drepper d94a467080 Add first fixes for conformtest for POSIX2008 2012-02-26 21:32:56 -05:00
Ulrich Drepper 4efeffc1d5 Fix up POSIX testing in conformtest 2012-02-26 13:17:27 -05:00
Paul Eggert 59ba27a63a Replace FSF snail mail address with URLs. 2012-02-09 23:18:22 +00:00
Ulrich Drepper e5f484c622 bits/poll2.h needs __BEGIN/__END_DECLS 2012-01-08 21:57:15 -05:00
Ulrich Drepper d5835c2642 Install bits/poll2.h 2012-01-08 21:50:21 -05:00
Ulrich Drepper d9a216c037 Add checking versions of poll and ppoll 2012-01-08 11:55:32 -05:00
Ulrich Drepper a784e50247 Remove pre-ISO C support
No more __const.
2012-01-07 23:57:22 -05:00
Roland McGrath 5615eaf264 Quash some new warnings from GCC 4.6. 2011-06-10 22:44:20 -07:00
Ulrich Drepper 94b7cc3711 Fix a few problems in fopen and freopen
fopen should set the FD_CLOEXEC flag if requested evenif the kernel does
not support an aotmic operation.

freopen should reuse the file descriptor for the stream.  This is
especially important for calls to change the standard streams (stin,
stdout, stderr).
2011-05-15 15:28:46 -04:00
Jim Meyering ded5b9b7c7 Remove doubled words. 2011-04-22 21:34:32 -04:00
Ulrich Drepper 748876bf1c Really implement fallocate{,64} and sync_file_range as cancellation points. 2011-04-01 11:15:08 -04:00
Ulrich Drepper 4c1423edfb Fix typos in comments. 2011-04-01 10:39:30 -04:00
Ulrich Drepper 46998f7457 Define AT_EMPTY_PATH. 2011-04-01 08:22:49 -04:00
Ulrich Drepper 620a05296f Define AT_NO_AUTOMOUNT. 2011-01-17 18:36:39 -05:00
Ulrich Drepper 952df0afdc Fix definition and testing of S_ISSOCK. 2010-04-04 01:51:01 -07:00