glibc/sysdeps/unix/sysv/linux
Zack Weinberg fd860eaaa8 Remove __need macros from errno.h (__need_Emath, __need_error_t).
This is fairly complicated, not because the users of __need_Emath and
__need_error_t have complicated requirements, but because the core
changes had a lot of fallout.

__need_error_t exists for gnulib compatibility in argz.h and argp.h.
error_t itself is a Hurdism, an enum containing all the E-constants,
so you can do 'p (error_t) errno' in gdb and get a symbolic value.
argz.h and argp.h use it for function return values, and they want to
fall back to 'int' when that's not available.  There is no reason why
these nonstandard headers cannot just go ahead and include all of
errno.h; so we do that.

__need_Emath is defined only by .S files; what they _really_ need is
for errno.h to avoid declaring anything other than the E-constants
(e.g. 'extern int __errno_location(void);' is a syntax error in
assembly language). This is replaced with a check for __ASSEMBLER__ in
errno.h, plus a carefully documented requirement for bits/errno.h not
to define anything other than macros.  That in turn has the
consequence that bits/errno.h must not define errno - fortunately, all
live ports use the same definition of errno, so I've moved it to
errno.h.  The Hurd bits/errno.h must also take care not to define
error_t when __ASSEMBLER__ is defined, which involves repeating all of
the definitions twice, but it's a generated file so that's okay.

	* stdlib/errno.h: Remove __need_Emath and __need_error_t logic.
	Reorganize file.  Declare errno here.  When __ASSEMBLER__ is
	defined, don't declare anything other than the E-constants.

	* include/errno.h: Change conditional for exposing internal
	declarations to (not _ISOMAC and not __ASSEMBLER__).
	* bits/errno.h: Remove logic for __need_Emath.  Document
	requirements for a port-specific bits/errno.h.

	* sysdeps/unix/sysv/linux/bits/errno.h
	* sysdeps/unix/sysv/linux/alpha/bits/errno.h
	* sysdeps/unix/sysv/linux/hppa/bits/errno.h
	* sysdeps/unix/sysv/linux/mips/bits/errno.h
	* sysdeps/unix/sysv/linux/sparc/bits/errno.h:
	Add multiple-include guard and check against improper inclusion.
	Remove __need_Emath logic.  Don't declare errno here.  Ensure all
	constants are defined as simple integer literals.  Consistent
	formatting.
	* sysdeps/mach/hurd/errnos.awk: Likewise.  Only define error_t and
	enum __error_t_codes if __ASSEMBLER__ is not defined.
	* sysdeps/mach/hurd/bits/errno.h: Regenerate.

	* argp/argp.h, string/argz.h: Don't define __need_error_t before
	including errno.h.
	* sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S
	* sysdeps/i386/i686/fpu/multiarch/s_sincosf-sse2.S
	* sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S
	* sysdeps/x86_64/fpu/s_cosf.S
	* sysdeps/x86_64/fpu/s_sincosf.S
	* sysdeps/x86_64/fpu/s_sinf.S:
	Just include errno.h; don't define __need_Emath or include
	bits/errno.h directly.
2017-06-14 08:14:34 -04:00
..
aarch64 aarch64: Fix undefined behavior in _dl_procinfo 2017-06-09 14:18:12 +05:30
alpha Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
arm posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
bits Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
generic posix: Consolidate Linux pause syscall 2017-05-18 18:06:47 -03:00
hppa Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
i386 Add include guards to dl-procinfo.h 2017-06-07 11:11:38 +05:30
ia64 Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
include Add shim header for bits/syscall.h. 2017-06-01 10:56:10 -04:00
m68k Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
microblaze Avoid tickling a linker bug from microblaze pt-vfork.S. 2017-06-01 08:53:56 -04:00
mips Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
net
netash
netatalk
netax25
neteconet
netinet
netipx
netiucv
netpacket
netrom
netrose
nfs
nios2 Update nios2, sparc32 localplt.data files for recent GCC change. 2017-06-09 16:26:06 +00:00
powerpc PowerPC64 FRAME_PARM_SAVE 2017-06-14 10:43:33 +09:30
s390 Add include guards to dl-procinfo.h 2017-06-07 11:11:38 +05:30
scsi
sh Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
sparc Remove __need macros from errno.h (__need_Emath, __need_error_t). 2017-06-14 08:14:34 -04:00
sys Fix struct sigaltstack namespace (bug 21517). 2017-06-05 10:17:46 +00:00
tile posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
wordsize-64 Consolidate Linux creat implementation 2017-05-11 17:27:27 -03:00
x86 Fix more namespace issues in sys/ucontext.h (bug 21457). 2017-06-01 14:07:40 +00:00
x86_64 x86-64: Update LO_HI_LONG for p{readv,writev}{64}v2 2017-06-05 07:21:57 -07:00
Implies
Makefile Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
Versions
_G_config.h Remove __need macros from stdio.h and wchar.h. 2017-06-08 13:58:17 -04:00
_exit.c
a.out.h
accept.c
accept4.c Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
access.c
adjtime.c
aio_misc.h
aio_sigqueue.c
arch-fork.h
bind.c
check_native.c Create more sockets with SOCK_CLOEXEC [BZ #15722] 2017-04-19 07:45:04 +02:00
check_pf.c
clock.c
clock_getcpuclockid.c
clock_getres.c
clock_gettime.c
clock_nanosleep.c
clock_settime.c
close.c Consolidate Linux close syscall generation 2017-05-11 15:49:10 -03:00
cmsg_nxthdr.c
configure
configure.ac
connect.c
creat.c Consolidate Linux creat implementation 2017-05-11 17:27:27 -03:00
creat64.c Consolidate Linux creat implementation 2017-05-11 17:27:27 -03:00
createthread.c
default-sched.h
device-nrs.h
dl-brk.c
dl-execstack.c
dl-fxstatat64.c
dl-getcwd.c
dl-librecon.h ld.so: Consolidate 2 strtouls into _dl_strtoul [BZ #21528] 2017-06-08 12:52:42 -07:00
dl-openat64.c
dl-opendir.c
dl-origin.c
dl-osinfo.h
dl-sbrk.c
dl-sysdep.c
dl-sysdep.h
dl-vdso.c
dl-vdso.h
dl-writev.h
epoll_pwait.c
epoll_wait.c Consolidate Linux epoll_wait syscall 2017-05-03 10:36:43 -03:00
errqueue.h
eventfd_read.c
eventfd_write.c
exit-thread.h
faccessat.c
fallocate.c
fallocate64.c
fatal-prepare.h
fchmodat.c
fcntl.c
fd_to_filename.h
fdatasync.c posix: Consolidate Linux fdatasync syscall 2017-05-18 18:06:47 -03:00
fexecve.c
fips-private.h
fpathconf.c
fstatfs64.c
fstatvfs.c
fstatvfs64.c
fsync.c posix: Consolidate Linux fsync syscall 2017-05-18 18:06:47 -03:00
ftime.c
ftruncate.c
ftruncate64.c
futex-internal.h
futimens.c
futimes.c
futimesat.c
fxstat.c
fxstat64.c
fxstatat.c
fxstatat64.c
gai_sigqueue.c
getclktck.c
getcwd.c
getdents.c
getdents64.c
getdirentries.c
getdirentries64.c
getdtsz.c
getentropy.c
gethostid.c
getipv4sourcefilter.c
getloadavg.c
getlogin.c
getlogin_r.c
getpagesize.c
getpeername.c
getpriority.c
getpt.c
getrandom.c
getrlimit.c
getrlimit64.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
getsockname.c
getsockopt.c
getsourcefilter.c
getsysstats.c
gettimeofday.c
grantpt.c
if_index.c
ifaddrs.c Create more sockets with SOCK_CLOEXEC [BZ #15722] 2017-04-19 07:45:04 +02:00
ifreq.c
internal_statvfs.c Remove __ASSUME_STATFS_F_FLAGS. 2017-05-12 11:48:37 +00:00
internal_statvfs64.c
ipc_ops.h
ipc_priv.h
kernel-features.h posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
kernel-posix-cpu-timers.h
kernel-posix-timers.h
kernel_sigaction.h
kernel_stat.h
kernel_termios.h
ldd-rewrite.sed
lddlibc4.c
ldsodefs.h
libc_fatal.c
linux_fsinfo.h
listen.c
local-setxid.h
lowlevellock-futex.h
lseek.c
lseek64.c
lutimes.c
lxstat.c
lxstat64.c
malloc-sysdep.h
mmap.c Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
mmap64.c Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
mmap_internal.h Consolidate Linux mmap implementation (BZ#21270) 2017-04-12 11:04:28 -03:00
mq_close.c
mq_getattr.c
mq_notify.c
mq_open.c
mq_receive.c
mq_send.c
mq_timedreceive.c posix: Consolidate Linux mq_timedreceive syscall 2017-05-18 18:06:47 -03:00
mq_timedsend.c posix: Consolidate Linux mq_timedsend syscall 2017-05-18 18:06:47 -03:00
mq_unlink.c
msgctl.c
msgget.c
msgrcv.c
msgsnd.c
msync.c posix: Consolidate Linux msync syscall 2017-05-18 18:06:47 -03:00
nanosleep.c posix: Consolidate Linux nanosleep syscall 2017-05-18 18:06:47 -03:00
netlink_assert_response.c
netlinkaccess.h
nice.c
not-cancel.h
nptl-signals.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
nscd_setup_thread.c
ntp_gettime.c
ntp_gettimex.c
open.c Consolidate Linux open implementation 2017-05-11 15:49:10 -03:00
open64.c Consolidate Linux open implementation 2017-05-11 15:49:10 -03:00
open_by_handle_at.c linux: Consolidate Linux open_by_handle_at syscall 2017-05-18 18:06:47 -03:00
openat.c
openat64.c
opendir.c
opensock.c
pathconf.c
pathconf.h
paths.h
pause.c posix: Consolidate Linux pause syscall 2017-05-18 18:06:47 -03:00
personality.c
poll.c Consolidate Linux poll implementation 2017-05-03 10:36:01 -03:00
posix_fadvise.c
posix_fadvise64.c
posix_fallocate.c
posix_fallocate64.c
posix_madvise.c
ppoll.c
pread.c posix: Fix internal p{read,write} plt usage 2017-05-02 14:57:40 -03:00
pread64.c posix: Fix internal p{read,write} plt usage 2017-05-02 14:57:40 -03:00
preadv.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv64.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
preadv64v2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
prlimit.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
prof-freq.c
profil.c
pselect.c
pt-raise.c
pthread-pids.h
pthread_getaffinity.c
pthread_getcpuclockid.c
pthread_getname.c
pthread_kill.c
pthread_setaffinity.c
pthread_setname.c
pthread_sigmask.c
pthread_sigqueue.c
ptrace.c
ptsname.c Remove check for NULL buffer passed to `ptsname_r' 2017-06-07 17:37:59 +02:00
pwrite.c posix: Fix internal p{read,write} plt usage 2017-05-02 14:57:40 -03:00
pwrite64.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev64.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
pwritev64v2.c posix: Implement preadv2 and pwritev2 2017-05-31 17:35:46 -03:00
raise.c
read.c Consolidate Linux read syscall 2017-05-11 17:27:30 -03:00
readahead.c
readdir64.c
readdir64_r.c
readonly-area.c
readv.c Consolidate Linux readv implementation 2017-05-11 17:27:31 -03:00
reboot.c
recv.c
recvfrom.c
recvmmsg.c Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
recvmsg.c
remove.c
rename.c
renameat.c
sa_len.c
safe-fatal.h
sched_getaffinity.c
sched_getcpu.c
sched_setaffinity.c
segfault.c
select.c Consolidate Linux select implementation 2017-05-03 10:36:36 -03:00
semctl.c
semget.c
semop.c
semtimedop.c
send.c
sendmmsg.c Simplify accept4, recvmmsg, sendmmsg code. 2017-05-09 21:59:36 +00:00
sendmsg.c
sendto.c
setegid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
seteuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setgid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setgroups.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
sethostid.c
setipv4sourcefilter.c
setregid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setresgid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setresuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setreuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
setrlimit.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
setrlimit64.c Assume prlimit64 is available. 2017-05-09 14:05:09 +00:00
setsockopt.c
setsourcefilter.c
setuid.c Consolidate set* Linux implementation 2017-03-28 12:29:27 -03:00
shlib-versions
shm-directory.c
shmat.c
shmctl.c
shmdt.c
shmget.c
shutdown.c
sigaction.c
siglist.h
signal.c
signalfd.c
sigpending.c
sigprocmask.c
sigqueue.c
sigreturn.c
sigset-cvt-mask.h
sigsetops.h Remove __need macros from signal.h. 2017-05-20 19:04:43 -04:00
sigstack.c
sigsuspend.c posix: Consolidate Linux sigsuspend implementation 2017-05-18 18:06:47 -03:00
sigtimedwait.c
sigwait.c
sigwaitinfo.c
sizes.h
socket.c
socketcall.h
socketpair.c
spawni.c posix: Remove ununsed posix_spawn internal assignment 2017-04-25 08:51:21 -03:00
speed.c
splice.c linux: Consolidate Linux splice syscall 2017-05-18 18:06:47 -03:00
statfs64.c
statvfs.c
statvfs64.c
sync_file_range.c
syscalls.list posix: Consolidate Linux mq_timedsend syscall 2017-05-18 18:06:47 -03:00
sysconf.c
sysctl.c
sysctl.mk
sysdep-vdso.h
sysdep.h
syslog.c
system.c
tcdrain.c
tcflow.c
tcflush.c
tcgetattr.c
tcgetpgrp.c
tcsendbrk.c
tcsetattr.c
tcsetpgrp.c
tee.c linux: Consolidate Linux tee implementation 2017-05-18 18:06:47 -03:00
termio.h
test-errno-linux.c Fix more test-errno issues 2017-03-30 18:23:43 -03:00
time.c
timer_create.c
timer_delete.c
timer_getoverr.c
timer_gettime.c
timer_routines.c
timer_settime.c
times.c
timespec_get.c
truncate.c
truncate64.c
tst-affinity-pid.c
tst-affinity.c
tst-align-clone.c
tst-clone.c
tst-clone2.c Use test-driver in sysdeps/unix/sysv/linux/tst-clone2.c 2017-06-07 14:05:42 +02:00
tst-fallocate-common.c
tst-fallocate.c
tst-fallocate64.c
tst-fanotify.c
tst-getpid1.c
tst-personality.c
tst-quota.c
tst-setgetname.c Remove __ASSUME_PROC_PID_TASK_COMM. 2017-05-08 16:44:54 +00:00
tst-skeleton-affinity.c
tst-skeleton-thread-affinity.c
tst-sync_file_range.c
tst-thread-affinity-pthread.c
tst-thread-affinity-pthread2.c
tst-thread-affinity-sched.c
ttyname.c linux ttyname and ttyname_r: do not return wrong results 2017-03-19 17:36:13 +00:00
ttyname.h linux ttyname and ttyname_r: do not return wrong results 2017-03-19 17:36:13 +00:00
ttyname_r.c linux ttyname and ttyname_r: do not return wrong results 2017-03-19 17:36:13 +00:00
ualarm.c
umount.S
umount2.S
unlockpt.c
updwtmp.c
ustat.c
utimensat.c
utimes.c
utmp_file.c
vfork.c
vmsplice.c linux: Consolidate Linux vmsplice syscall 2017-05-18 18:06:47 -03:00
wait.c
wait3.c
waitid.c
waitpid.c
write.c Consolidate Linux write syscall 2017-05-11 17:27:30 -03:00
writev.c Consolidate Linux writev implementation 2017-05-11 17:27:31 -03:00
xmknod.c
xmknodat.c
xstat.c
xstat64.c
xstatconv.c
xstatconv.h