Commit Graph

58 Commits

Author SHA1 Message Date
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 384b7b4309 Move shared umount.c from hppa to mips.
This patch prepares for moving mips from ports to libc by reversing
the #include ordering between mips and hppa.

Reversing #include ordering for umount.c is the conservative change in
preparation for moving the mips port.  In fact, it appears there are
several redundant umount.c files all implementing umount in terms of
the umount2 syscall; I've filed bug 16552 for eliminating that
redundancy properly.

Tested that disassembly of shared libraries for mips (o32, n32, n64)
is the same before and after this patch.

	* sysdeps/unix/sysv/linux/hppa/umount.c: Move to
	sysdeps/unix/sysv/linux/mips/mips64/umount.c and #include that
	file.

	* sysdeps/unix/sysv/linux/mips/mips64/umount.c: Move from
	sysdeps/unix/sysv/linux/hppa/umount.c instead of #include of that
	file.
2014-02-10 22:25:42 +00:00
Carlos O'Donell 2efc59633e [hppa] Regenerate libm-test-ulps.
Regenerate libm-test-ulps from scratch.
2014-02-03 16:22:22 -05:00
Joseph Myers 3c1c46a64a Fix dbl-64 e_sqrt.c for non-default rounding modes (bug 16271). 2013-11-28 16:50:38 +00:00
Ondřej Bílka d1d9eaf478 Use __glibc_reserved instead __unused. 2013-11-26 12:32:28 +01:00
Guy Martin daf75146de Don't use broken DL_AUTO_FUNCTION_ADDRESS()
On hppa and ia64, the macro DL_AUTO_FUNCTION_ADDRESS() uses the
variable fptr[2] in it's own scope.

The content of fptr[] is thus undefined right after the macro exits.
Newer gcc's (>= 4.7) reuse the stack space of this variable triggering
a segmentation fault in dl-init.c:69.

To fix this we rewrite the macros to make the call directly to init
and fini without needing to pass back a constructed function pointer.
2013-11-21 15:52:31 -05:00
Mike Frysinger cb8a6dbd17 rename configure.in to configure.ac
Autoconf has been deprecating configure.in for quite a long time.
Rename all our configure.in and preconfigure.in files to .ac.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-30 17:32:08 +10:00
Joseph Myers de5d4f4c8a Move entries to correct port ChangeLog files. 2013-10-18 21:28:57 +00:00
Andreas Schwab ffdd31816a Add O_TMPFILE to <fcntl.h> 2013-09-11 11:52:46 +02:00
Ondřej Bílka 382466e04e Fix typos. 2013-08-30 18:08:59 +02:00
Ondřej Bílka c0c3f78afb Fix typos. 2013-08-21 19:48:48 +02:00
Carlos O'Donell cb821cb175 hppa: Regenerate libm-test-ulps. 2013-07-23 23:49:00 -04:00
Joseph Myers 5556231db2 Remove trailing whitespace in ports. 2013-06-05 20:26:40 +00:00
Siddhesh Poyarekar b937534868 Avoid crashing in LD_DEBUG when program name is unavailable
Resolves: #15465

The program name may be unavailable if the user application tampers
with argc and argv[].  Some parts of the dynamic linker caters for
this while others don't, so this patch consolidates the check and
fallback into a single macro and updates all users.
2013-05-29 21:34:12 +05:30
Joseph Myers b50a71810b Don't include expected results in libm-test test names. 2013-05-22 11:49:36 +00:00
Joseph Myers db62a90753 Handle sincos with generic libm-test logic. 2013-05-19 14:45:41 +00:00
Carlos O'Donell c5d9b39ce6 hppa: Cleanup libm-test-ulps.
Joseph Myers noted that there were several old and really very
incorrect values in the hppa libm-test-ulps. This patch removes
all of the ulps values for ceil, floor, rint, round, trun,
llrint, and llround, all of which were previously incorreclty
added (including some negative values which are really wrong).

---
ports/

2013-05-15  Carlos O'Donell  <carlos@redhat.com>

	* sysdeps/hppa/fpu/libm-test-ulps: Remove old values for ceil, floor,
	rint, round, trunc, llrint, and llround.
2013-05-15 17:19:20 -04:00
Carlos O'Donell 86ee76a086 hppa: Update libm-test-ulps
Update libm-test-ulps for hppa. There are a few entries
with 4 or 5 ulps, but these appear to be expected. A more
thorough review will be required if hppa switches long-double
to a different type.

---
ports/

2013-05-15  Carlos O'Donell  <carlos@redhat.com>

	* sysdeps/hppa/fpu/libm-test-ulps: Regenerate.
2013-05-15 12:42:59 -04:00
Carlos O'Donell b7f7d28b61 hppa: Fix _FPU_GETCW and _FPU_SETCW.
The following patch fixes both _FPU_GETCW and
_FPU_SETCW for hppa. The initial implementation was
flawed and not well tested. We failed to set cw,
and passed in the value of a register to fldd.
This patch fixes both of those errors and allows
the libm tests to pass without failure.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
Signed-off-by: Carlos O'Donell <carlos@redhat.com>
---

2013-05-15  Guy Martin  <gmsoft@tuxicoman.be>
	    Carlos O'Donell  <carlos@redhat.com>

	[BZ# 15000]
	* ports/sysdeps/hppa/fpu/fpu_control.h (_FPU_GETCW): Set cw.
	(_FPU_SETCW): Pass address to fldd.
2013-05-15 12:05:10 -04:00
Thomas Schwinge 572676160d New <math.h> macro named issignaling to check for a signaling NaN (sNaN).
It is based on draft TS 18661 and currently enabled as a GNU extension.
2013-04-02 13:51:02 +02:00
Andreas Jaeger 67525cb832 Sync with Linux 3.8 2013-03-06 16:35:19 +01:00
Carlos O'Donell dd395cf110 hppa: Remove unused lll_unlock_wake_cb.
There hasn't been a use for lll_unlock_wake_cb since it was
removed globally in 2007-05-29. This patch removes the
function from hppa's lowlevellock.[ch] implementation.
2013-02-14 10:34:48 -05:00
Joseph Myers 828beb132d Use __extension__ with long long in installed headers. 2013-01-10 20:19:45 +00:00
Andreas Jaeger c40ea3d9a3 BZ#14985: Remove erroneous EPOLL_NONBLOCK
[BZ# 14985]
	* sysdeps/unix/sysv/linux/sparc/bits/epoll.h (EPOLL_NONBLOCK):
	Remove.
	* sysdeps/unix/sysv/linux/bits/epoll.h (EPOLL_NONBLOCK):
	Likewise.
	* sysdeps/unix/sysv/linux/x86/bits/epoll.h (EPOLL_NONBLOCK):
	Likewise.

ChangeLog.mips:
	[BZ# 14985]
	* sysdeps/unix/sysv/linux/mips/bits/epoll.h (EPOLL_NONBLOCK):
	* Remove.

ChangeLog.hppa:
	[BZ# 14985]
	* sysdeps/unix/sysv/linux/hppa/sys/epoll.h (EPOLL_NONBLOCK):
	Remove.

ChangeLog.alpha:
	[BZ# 14985]
	* sysdeps/unix/sysv/linux/alpha/bits/epoll.h (EPOLL_NONBLOCK):
	Remove.
2013-01-08 19:32:00 +01:00
Joseph Myers 568035b787 Update copyright notices with scripts/update-copyrights. 2013-01-02 19:05:09 +00:00
Carlos O'Donell 9e4eee23af hppa: Fix ChangeLog format issues.
Remove trailing whitespace and canonicalize path names.
2012-11-29 14:53:57 -08:00
Carlos O'Donell 506fdf71df hppa: Remove socket.h and implement socket_type.h. 2012-11-29 18:00:01 -05:00
Carlos O'Donell 80ceeaeef9 hppa: Cleanup two build warnings for integer to pointers casts. 2012-11-29 17:59:59 -05:00
Carlos O'Donell 77a13b85e3 hppa: Add BZ#14447 to NEWS and ChangeLog.hppa. 2012-11-29 10:08:31 -05:00
Carlos O'Donell 6e63f4ff60 hppa: Mark __pthread_once as a hidden def. 2012-11-19 00:55:04 -05:00
Carlos O'Donell da66ca0fc0 hppa: Fix fesetenv for FE_DFL_ENV.
Switching back to FE_DFL_ENV should reset the FPU to the state
as it was at the start of the program.
2012-11-19 00:44:00 -05:00
Carlos O'Donell 886ce148c0 hppa: Implement get-rounding-mode.h
Implement get_rounding_mode using the new fpu_control.h
support. Use get_rounding_mode from fegetround.
2012-11-19 00:40:05 -05:00
Carlos O'Donell 030c5d66b8 hppa: Implement fpu_control.h.
The HP-PARISC processor has full IEEE-754 support
and we implement all of fpu_control.h.
2012-11-19 00:37:56 -05:00
Carlos O'Donell 320194d5b9 hppa: Implement __longjmp_chk.
Implement longjmp and the chk variant in C.
2012-11-19 00:28:30 -05:00
Joseph Myers acfa885ff1 Fix types of FE_DFL_ENV and FE_NOMASK_ENV (bug 14805). 2012-11-05 13:38:40 +00:00
Joseph Myers 5b5b04d628 Make fma use of Dekker and Knuth algorithms use round-to-nearest (bug 14796). 2012-11-03 19:48:53 +00:00
Joseph Myers fbeafedeea Make fenv.h FE_* macros usable in #if (bug 3439). 2012-11-03 17:07:56 +00:00
Joseph Myers 2a27fd6dae Fix strtod handling of underflow (bug 14047). 2012-10-30 13:51:27 +00:00
Carlos O'Donell 236bb0623d hppa: Add cfi direcvtives.
We add cfi directives to the syscall assembly.
2012-10-29 23:36:41 -04:00
Carlos O'Donell e22f413005 hppa: Fix r19 save and restore.
We must save and restore r19 in both PIC and non-PIC
situations since the kernel paths that clobber r19
are independent of that PIC-ness of userspace.
In addition we choose r4 as the temporary register over
r3 which is being used by recent gcc's as the frame
pointer.
2012-10-29 23:16:44 -04:00
Carlos O'Donell 4ebdb01027 hppa: Optimize syscall sequence.
We remove an extraneous nop from the syscall sequence.
No DO_CALL* may end in an instruction with a delay slot.
2012-10-29 23:11:06 -04:00
Carlos O'Donell f0b8ce0c73 Fix trailing whitespace. 2012-10-29 22:08:00 -04:00
Andreas Jaeger 76a82e29f8 HPPA: Use <bits/fcntl-linux.h>
* sysdeps/unix/sysv/linux/hppa/bits/fcntl.h: Remove all
	definitions and declarations that are provided by
	<bits/fcntl-linux.h> and include <bits/fcntl-linux.h>.
	(__O_PATH): Define.
2012-10-26 21:17:06 +02:00
Joseph Myers 0bf57f872c Don't set resource limits in tst-oddstacklimit-ENV. 2012-10-24 17:13:24 +00:00
Carlos O'Donell 9d9358f2eb hppa: Update pthread.h
Updates the hppa-specific pthread.h from the generic version.
After this update the only difference between the generic
version and the hppa version is the footer protected by the
_PTHREAD_H_HPPA_ guard.
2012-10-10 23:00:00 -04:00
Carlos O'Donell fd328df065 hppa: Remove pt-initfini.c
Rmoves the unused pt-initfini.c
2012-10-10 22:52:00 -04:00
Carlos O'Donell 0883bc35b4 hppa: Restore nptl/shlib-versions.
On 2012-01-07 the nptl/shlib-versions file removed the hppa entry.
This restores that entry in the hppa ports tree.
2012-10-10 22:42:52 -04:00
Siddhesh Poyarekar 40d4a87bb5 Split my last ChangeLog entry into respective arch-specific files 2012-10-02 09:28:18 +05:30
Carlos O'Donell 11aaf6ef2d hppa: Use __prlimit64 as the internal name.
Fix a build failure by using __prlimit64 as the internal
function name for the versioned symbol prlimit64. Without
this patch the build system attempts to alias prlimit64
to itself and that is invalid.
2012-09-20 10:39:27 -04:00
Carlos O'Donell eee7025916 hppa: Add EHWPOISON and bump errlist-compat to 260
Add errno EHWPOISON and bump the errlist-compat table to 260,
providing 2 padding entries for future use before bumping is
again required.
2012-09-20 03:18:47 -04:00