]> sourceware.org Git - newlib-cygwin.git/log
newlib-cygwin.git
8 years agoAdd missing long double functions to Cygwin
Corinna Vinschen [Mon, 28 Mar 2016 17:35:20 +0000 (19:35 +0200)]
Add missing long double functions to Cygwin

This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.

Cygwin:
* math: New subdir with math functions.
* Makefile.in (VPATH): Add math subdir.
(MATH_OFILES): List of object files collected from building files in
math subdir.
(DLL_OFILES): Add $(MATH_OFILES).
${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
* common.din: Add new functions from math subdir.
* i686.din: Align to new math subdir.  Remove functions now commonly
available.
* x86_64.din: Ditto.
* math.h: math.h wrapper to define mingw structs used in some files in
math subdir.
* include/cygwin/version.h: Bump API minor version.

newlib:
* libc/include/complex.h: Add prototypes for complex long double
functions.  Only define for Cygwin.
* libc/include/math.h: Additionally enable prototypes of long double
functions for Cygwin.  Add Cygwin-only prototypes for dreml, sincosl,
exp10l and pow10l.  Explain why we don't add them to newlib.
* libc/include/tgmath.h: Enable long double handling on Cygwin.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix Cygwin setstate definition
Corinna Vinschen [Tue, 29 Mar 2016 11:41:11 +0000 (13:41 +0200)]
Fix Cygwin setstate definition

setstate is supposed to take a char *, not a const char *.

* random.cc (setstate): Unconstify parameter to align to stdlib.h.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agocygwin: export __getpagesize
Yaakov Selkowitz [Mon, 28 Mar 2016 17:48:20 +0000 (12:48 -0500)]
cygwin: export __getpagesize

The inclusion of <sys/cygwin.h> by <sys/shm.h>, besides causing namespace
pollution, also makes it very difficult to get the WINVER-dependent parts
of the former.  This affects code (such as x11vnc -unixpw_nis) which use
both SysV shared memory (e.g. the X11 MIT-SHM extension) and user password
authentication.

getpagesize is the simplest function to retreive this information, but it
is a legacy function and would also pollute the global namespace. The LSB
lists another form which is in the implementation-reserved namespace:

http://refspecs.linuxfoundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/baselib---getpagesize.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoAdd simple versions of random() and srandom()
Joel Sherrill [Tue, 22 Mar 2016 22:50:48 +0000 (17:50 -0500)]
Add simple versions of random() and srandom()

Prototypes also added for initstate() and setstate() but they
were not implemented in the shared newlib code.

* newlib/libc/include/cygwin/stdlib.h: Prototypes added.
* winsup/cygwin/include/cygwin/stdlib.h: Prototypes removed.
* newlib/libc/stdlib/random.c: New file.
* newlib/libc/machine/epiphany/machine/stdlib.h: Removed
* newlib/libc/stdlib/Makefile.am: Added random.c.
* newlib/libc/stdlib/stdlib.tex: Added random.def.
* newlib/libc/stdlib/Makefile.in: Regenerated.

8 years agoAdd release text for 373f81d and 3e446e9
Corinna Vinschen [Sat, 26 Mar 2016 19:38:30 +0000 (20:38 +0100)]
Add release text for 373f81d and 3e446e9

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agomath.h: Use GCC builtins for C99 macros where available
Corinna Vinschen [Sat, 26 Mar 2016 19:33:46 +0000 (20:33 +0100)]
math.h: Use GCC builtins for C99 macros where available

GCCs builtin functions are mostly type agnostic and architecture
indepedent.  Prefer to use them if available.

* libc/include/math.h (fpclassify, isfinite, isinf, isnan,
isnormal): Use matching GCC builtin functions if built with
GCC 4.4 or later.
(signbit): Use matching GCC builtin functions if built with
GCC 4.0 or later.
(isgreater, isgreaterequal, isless, islessequal, islessgreater,
isunordered): Use matching GCC builtin functions if built with
GCC 2.97 or later.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agofinitel: Use correct GCC builtin
Corinna Vinschen [Sat, 26 Mar 2016 19:29:20 +0000 (20:29 +0100)]
finitel: Use correct GCC builtin

__builtin_isinf_sign doesn't reflect the correct return value for NaN
to emulate finite function.  Use __builtin_isfinite instead whichg is available
since GCC 4.4 just as __builtin_isinf_sign.

* libm/common/sl_finite.c (finitel): Use __builtin_isfinite.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agostrtold: Fix Infinity value.
Corinna Vinschen [Sat, 26 Mar 2016 19:27:18 +0000 (20:27 +0100)]
strtold: Fix Infinity value.

Infinity returned from strtold is recognized as NaN by GCC builtin
functions.  The reason is that ULtox is missing to set a bit.

* libc/stdlib/strtorx.c (ULtox): Set high bit in second word
to create valid Infinity value.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoInitializing TTBR0 to inner/outer WB
Jiong Wang [Thu, 24 Mar 2016 14:32:04 +0000 (14:32 +0000)]
Initializing TTBR0 to inner/outer WB

While running tests on internal systems, we identified an issue in the
startup code for newlib on AArch32 systems with Multiprocessor
Extensions to the architecture.

The issue is we were configuring page table flags to be Inner
cacheable/Outer non-cacheable, while for at least architectures with
Multiprocessor Extension, we'd configure it to Inner/Outer write-back, no
write-allocate, and cacheable.

The attached patch fixes this, and no regression on arm-none-eabi
bare-metal tests.

Adopted suggestion given by Richard offline to avoid using jump.

libgloss/
* arm/cpu-init/rdimon-aem.S: Set TTBR0 to inner/outer
cacheable WB, and no allocate on WB for arch with multiprocessor
extension.

8 years agoAdd missing OBJCOPY variable to Makefile.in
Corinna Vinschen [Sat, 26 Mar 2016 11:32:18 +0000 (12:32 +0100)]
Add missing OBJCOPY variable to Makefile.in

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoThroughout Cygwin, use u_intN_t or uintN_t
Corinna Vinschen [Thu, 24 Mar 2016 15:39:15 +0000 (16:39 +0100)]
Throughout Cygwin, use u_intN_t or uintN_t

Don't use u_char, u_short, u_int or u_long in Cygwin, unless it refers
to the Winsock types.  Use u_intN_t in BSD-based sources, unsigned char
where strings are concerned, uintN_t otherwise.  Also:

* net.cc: Fix comment, we're not using u_long anymore.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoChange definition of b64_pton from K&R to ANSI
Corinna Vinschen [Thu, 24 Mar 2016 15:25:00 +0000 (16:25 +0100)]
Change definition of b64_pton from K&R to ANSI

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix return type of get_routedst
Corinna Vinschen [Thu, 24 Mar 2016 15:23:50 +0000 (16:23 +0100)]
Fix return type of get_routedst

* net.cc (get_routedst): Correctly return in_addr_t.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRemove unused function convert_ifr_flags
Corinna Vinschen [Thu, 24 Mar 2016 15:22:30 +0000 (16:22 +0100)]
Remove unused function convert_ifr_flags

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix FIONBIO comments
Corinna Vinschen [Thu, 24 Mar 2016 14:32:33 +0000 (15:32 +0100)]
Fix FIONBIO comments

FIONBIO is defined in sys/termios.h and asm/socket.h.  Align the comments.
Remove unused REAL_FIONBIO.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDrop usage of old-age BSD types in generically used Cygwin headers
Corinna Vinschen [Thu, 24 Mar 2016 13:03:40 +0000 (14:03 +0100)]
Drop usage of old-age BSD types in generically used Cygwin headers

u_char, u_short, u_int, u_long are BSD-only types.  Remove them from
Cygwin headers which are supposed to be used in a non-BSD scenario.
Drop special Cygwin handling of those types in sys/types.h.

newlib:
* libc/include/sys/types.h (u_char,u_short,u_int,u_long): Drop
Cygwin exception.

cygwin:
* fhandler_socket.cc (fhandler_socket::ioctl): Accommodate change
in include/asm/socket.h.  Continue using u_long since that's the
MS type here.
* include/asm/socket.h: Since the type given in _IOR/_IOW macros
is only used for its sizeof, replace u_long with equivalent long.
* netdb.h (getnetbyaddr): Fix prototype.
* netinet/ip.h: Replace old BSD-only types with generically defined
old BSD types (u_char -> u_int8_t, etc).
* netinet/tcp.h: Ditto.
* netinet/udp.h: Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDefine BSD u_intN_t types indiscriminately
Corinna Vinschen [Thu, 24 Mar 2016 10:05:46 +0000 (11:05 +0100)]
Define BSD u_intN_t types indiscriminately

The u_intN_t types are BSD types but sanctioned by POSIX.  They are
always defined when using Glibc headers so we follow suit.

newlib:
* libc/include/sys/types.h: Drop outdated __INTTYPES_DEFINED__
macro.  Always define u_intN_t types.

cygwin:
* include/cygwin/types.h: Remove definition of u_intN_t types.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix coverity CID 143502: Null pointer dereference
Corinna Vinschen [Thu, 24 Mar 2016 09:06:50 +0000 (10:06 +0100)]
Fix coverity CID 143502: Null pointer dereference

* libc/locale/ldpart.c (split_lines): Don't dereference result
of strchr without checking for NULL pointer first.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFeature test macros overhaul: C++ TR1
Yaakov Selkowitz [Wed, 23 Mar 2016 21:14:00 +0000 (16:14 -0500)]
Feature test macros overhaul: C++ TR1

While C++11 was the first version of the standard to use C99 functionality,
TR1 (for C++03) also does, and G++ does not distinguish between C++98 and
C++03, or when TR1 is in use.  Therefore, while not strictly correct for
"pure" C++98, enabling C99 for all C++ usage is the simplest solution (and
much better than always using -D_GNU_SOURCE as on Linux).

See thread starting: https://sourceware.org/ml/newlib/2016/msg00297.html

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agotest
Corinna Vinschen [Wed, 23 Mar 2016 17:49:39 +0000 (18:49 +0100)]
test

8 years agoAdd release message for commit 59b3bd2
Corinna Vinschen [Wed, 23 Mar 2016 17:11:38 +0000 (18:11 +0100)]
Add release message for commit 59b3bd2

8 years agoOnly allow enabled groups as primary group
Corinna Vinschen [Wed, 23 Mar 2016 16:51:03 +0000 (17:51 +0100)]
Only allow enabled groups as primary group

So far any group in the user's token could be used as primary group.
Windows doesn't check if the primary group is enabled or not, it just
has no meaning.  From a POSIXy point of view it can lead to weird
results though.

* uinfo.cc (check_token_membership): New static function.
(internal_getlogin): Only allow enabled groups as primary group.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoUse 64K buffers for TOKEN_GROUPS
Corinna Vinschen [Wed, 23 Mar 2016 16:42:04 +0000 (17:42 +0100)]
Use 64K buffers for TOKEN_GROUPS

A user token can be up to 64K in size.  Using 32K buffers for TOKEN_GROUPS
may be insufficient.

* uinfo.cc (get_logon_sid): Use 64K buffers for the TOKEN_GROUPS
array.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAllocate temporary TOKEN_GROUP arrays using TLS
Corinna Vinschen [Wed, 23 Mar 2016 16:40:24 +0000 (17:40 +0100)]
Allocate temporary TOKEN_GROUP arrays using TLS

A user token can be up to 64K in size.  The group list might take a lot
of that so use tmp_pathbuf allocated space rather than stack space
allocted via alloca.  In create_token the TOKEN_GROUP was allocated via
malloc, but the code is needlessly complicated.  Simplify by using
tmp_pathbuf as well.

* sec_auth.cc (verify_token): Allocate TOKEN_GROUP via tmp_pathbuf.
(create_token): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agocxx.cc: Disable C++14 warning for new sized delete operator
Corinna Vinschen [Wed, 23 Mar 2016 10:58:21 +0000 (11:58 +0100)]
cxx.cc: Disable C++14 warning for new sized delete operator

As long as we're not building in C++14 mode, the definition of the
sized delete operator results in a compatibility warning.

* cxx.cc (operator delete): Disable C++14 warning for sized variant.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd c++14 sized deallocation operator
Peter Foley [Sat, 19 Mar 2016 17:45:55 +0000 (13:45 -0400)]
Add c++14 sized deallocation operator

When compiling with -std=c++14 (the default for gcc 6.0+), the sized
deallocation operator must be defined to prevent undefined symbols when
linking.

winsup/cygwin/ChangeLog:
cxx.cc (operator delete(void *p, size_t)): Define.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoDrop Cygwin-only posix_memalign prototype
Corinna Vinschen [Wed, 23 Mar 2016 10:50:27 +0000 (11:50 +0100)]
Drop Cygwin-only posix_memalign prototype

newlib:
* libc/include/stdlib.h (posix_memalign): Drop __rtmes__ guards.

cygwin:
* include/cygwin/stdlib.h (posix_memalign): Drop prototype.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoUse DnsFree instead of deprecated DnsRecordListFree
Peter Foley [Mon, 21 Mar 2016 20:41:25 +0000 (16:41 -0400)]
Use DnsFree instead of deprecated DnsRecordListFree

The latest version of the mingw headers have been updated to make
DnsRecordListFree an alias of DnsFree when targeting Windows XP or later.
Use DnsFree directly, avoiding the wrapper function.

/home/peter/cross/src/cygwin/winsup/cygwin/libc/minires-os-if.c:289:
undefined reference to `DnsFree'

winsup/cygwin/ChangeLog
autoload.cc: Load DnsFree rather then DnsRecordListFree
libc/minires-os-if.cc (cygwin_query): Use DnsFree rather then DnsRecordListFree

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoTarget/Host configuration elucidated
Konrad Schwarz [Wed, 23 Mar 2016 04:54:13 +0000 (05:54 +0100)]
Target/Host configuration elucidated

8 years agoGuard u_char,u_short,u_int,u_long with __MISC_VISIBLE
Corinna Vinschen [Wed, 23 Mar 2016 10:17:59 +0000 (11:17 +0100)]
Guard u_char,u_short,u_int,u_long with __MISC_VISIBLE

These types are available in SVID as well.

* libc/include/sys/types.h (u_char,u_short,u_int,u_long): Replace
__BSD_VISIBLE with __MISC_VISIBLE.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFix "/*" within comment warning
Sebastian Huber [Mon, 21 Mar 2016 11:07:52 +0000 (12:07 +0100)]
Fix "/*" within comment warning

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
8 years agostdio: fseeko/ftello are also POSIX.1-2001
Yaakov Selkowitz [Sun, 20 Mar 2016 19:21:59 +0000 (14:21 -0500)]
stdio: fseeko/ftello are also POSIX.1-2001

_LARGEFILE_SOURCE, which controls only these two functions, is implicitly
defined by _XOPEN_SOURCE >= 500.  However, they are also later added to
POSIX.1-2001 (and therefore available by default).

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agopthread.h: Mark pthread_exit() as not returning
Joel Sherrill [Mon, 21 Mar 2016 21:20:18 +0000 (16:20 -0500)]
pthread.h: Mark pthread_exit() as not returning

8 years agoepiphany/machine/stdlib.h: Disable epiphany unique random wrappers for RTEMS
Joel Sherrill [Sun, 20 Mar 2016 16:02:13 +0000 (11:02 -0500)]
epiphany/machine/stdlib.h: Disable epiphany unique random wrappers for RTEMS

8 years agonewlib/configure.host: Turn off sti/cli for i386 setjmp for i386-rtems*
Joel Sherrill [Thu, 25 Feb 2016 17:43:18 +0000 (11:43 -0600)]
newlib/configure.host: Turn off sti/cli for i386 setjmp for i386-rtems*

When running RTEMS paravirtualized in user space, the cli/sti instructions
can't be used. But I can't see why they are needed in either user or
supervisor state. Turning the use of them off for RTEMS.

This code is unmodified since the beginning of the repository, so I have
no insight into why it was done. I may even have been the one to add them.
Absolutely no idea except they aren't necessary.

8 years agoRemove spurious empty line in changelog entry.
Nick Clifton [Fri, 18 Mar 2016 13:09:03 +0000 (13:09 +0000)]
Remove spurious empty line in changelog entry.

8 years agoPR external/{16327,16328}: Remove etc/configure.texi and etc/standards.texi.
Ludovic Courtès [Mon, 5 May 2014 15:33:16 +0000 (17:33 +0200)]
PR external/{16327,16328}: Remove etc/configure.texi and etc/standards.texi.

etc/ChangeLog
2014-06-27  Ludovic Courtès  <ludo@gnu.org>

PR external/16327
PR external/16328
* Makefile.in (MAKEINFO, TEXI2DVI, TEXI2PDF, TEXI2HTML, DVIPS)
(TEXIDIR, INFOFILES, DVIFILES, PDFFILES, HTMLFILES): Remove.
(all): Remove dependency on 'info'.
(install): Remove dependency on 'install-info'.
(standards.info, standards.html, standards.dvi, standards.ps)
(standards.pdf, configure.info, configure.dvi, configure.ps)
(configure.pdf, configure.pdf): Remove.
(info, install-info, html, install-html, dvi, pdf, install-pdf)
clean, maintainer-clean, realclean): Remove body.
* etc/configbuild.ein, etc/configbuild.fig, etc/configbuild.jin,
etc/configbuild.tin, etc/configdev.ein, etc/configdev.fig,
etc/configdev.jin, etc/configdev.tin, etc/configure.texi,
etc/fdl.texi, etc/gnu-oids.texi, etc/make-stds.texi,
etc/standards.texi: Remove.

8 years agoFix generation of as.1 manual page so that it can be converted to DocBook format.
Nick Clifton [Fri, 18 Mar 2016 13:07:33 +0000 (13:07 +0000)]
Fix generation of as.1 manual page so that it can be converted to DocBook format.

etc * texi2pod.pl: Add TARGET to the list of recognised man page
sections.

8 years agoSync toplevel with upstream GCC.
Corinna Vinschen [Tue, 22 Mar 2016 09:25:20 +0000 (10:25 +0100)]
Sync toplevel with upstream GCC.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRemove Mingw.org from FAQ, or replace with Mingw-w64.
Corinna Vinschen [Mon, 21 Mar 2016 20:09:23 +0000 (21:09 +0100)]
Remove Mingw.org from FAQ, or replace with Mingw-w64.

* faq-api.xml: Change MingW to Mingw-w64.
* faq-programming.xml: Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd nonnull annotation to posix_memalign.
Peter Foley [Mon, 21 Mar 2016 17:15:42 +0000 (13:15 -0400)]
Add nonnull annotation to posix_memalign.

GCC 6.0+ asserts that the memptr argument to the builtin function
posix_memalign is nonnull.
Add the necessary annotation to the prototype and
remove the now unnecessary check to fix a warning.

newlib/Changelog
newlib/libc/include/stdlib.h: Annotate arg to posix_memalign as
non-null.

winsup/cygwin/ChangeLog
malloc_wrapper.cc (posix_memalign): Remove always true nonnull check.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoRemove misleading indentation
Peter Foley [Mon, 21 Mar 2016 17:15:44 +0000 (13:15 -0400)]
Remove misleading indentation

GCC 6.0+ warns on misleading indentation, so fix it.

winsup/cygserver/ChangeLog
* sysv_msg.cc (msgsnd): Fix misleading indentation.
* sysv_msg.cc (msgrcv): Ditto.
* sysv_sem.cc (semop): Ditto.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoMove arc4random Cygwin only code to Cygwin
Sebastian Huber [Mon, 21 Mar 2016 07:12:54 +0000 (08:12 +0100)]
Move arc4random Cygwin only code to Cygwin

Keep the Newlib arc4random.c identical to the OpenBSD upstream version.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>.
8 years agosrandom: Replace accessing /dev/random by equivalent getentropy call
Corinna Vinschen [Sun, 20 Mar 2016 21:29:03 +0000 (22:29 +0100)]
srandom: Replace accessing /dev/random by equivalent getentropy call

/dev/random calls getentropy.  So there's no good reason to go out of
our way to open /dev/random just to call getentropy anyway.

* random.cc (srandomdev): Drop opening /dev/random in favor of
calling getentropy.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRevert "Use high-resolution timebases for select()."
Corinna Vinschen [Sun, 20 Mar 2016 20:59:47 +0000 (21:59 +0100)]
Revert "Use high-resolution timebases for select()."

This reverts commit 6e70fd315a29578f090a98f84e9d8e95ddb156e3.

Revert accidental push

8 years agoRevert "Debug printfs."
Corinna Vinschen [Sun, 20 Mar 2016 20:59:43 +0000 (21:59 +0100)]
Revert "Debug printfs."

This reverts commit 9f82de59a07da145c177648fe474f19cd9def7a1.

Revert accidental push

8 years agoRevert "Improve and simplify select()."
Corinna Vinschen [Sun, 20 Mar 2016 20:59:27 +0000 (21:59 +0100)]
Revert "Improve and simplify select()."

This reverts commit 472d0a228c56bd4783ebb0561667cda2de3cd168.

Revert accidental push

8 years agoDrop redundant arc4random prototypes from cygwin/stdlib.h
Corinna Vinschen [Sun, 20 Mar 2016 20:30:58 +0000 (21:30 +0100)]
Drop redundant arc4random prototypes from cygwin/stdlib.h

Newlib's default stdlib.h now defines these functions so we can
drop them from the Cygwin-specific header.  Remove the arc4random_stir
and arc4random_uniform prototypes entirely.  They shouldn't be used
by applications anymore.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAllow machine-dependent arc4 locking
Corinna Vinschen [Fri, 18 Mar 2016 17:01:07 +0000 (18:01 +0100)]
Allow machine-dependent arc4 locking

newlib:
* libc/stdlib/arc4random.h: Remove Cygwin-specific locking code.
Conditionalize arc4 locking.  Check for _ARC4_LOCK_INIT being
undefined to fall back to default implementation.

cygwin:
* include/machine/_arc4random.h: New file.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoImprove and simplify select().
John Hood [Thu, 4 Feb 2016 05:44:56 +0000 (00:44 -0500)]
Improve and simplify select().

* cygwait.h (cygwait_us) Remove; this reverts previous changes.
* select.h: Eliminate redundant select_stuff::select_loop state.
* select.cc (select): Eliminate redundant
select_stuff::select_loop state.  Eliminate redundant code for
zero timeout.  Do not return early on early timer return.
(select_stuff::wait): Eliminate redundant
select_stuff::select_loop state.

8 years agoDebug printfs.
John Hood [Sat, 30 Jan 2016 22:37:33 +0000 (17:37 -0500)]
Debug printfs.

* fhandler.cc (fhandler_base::get_readahead): Add debug code.
* fhandler_console.cc (fhandler_console::read): Add debug code.
* select.cc (pselect): Add debug code.
(peek_console): Add debug code.

8 years agoUse high-resolution timebases for select().
John Hood [Thu, 28 Jan 2016 22:08:39 +0000 (17:08 -0500)]
Use high-resolution timebases for select().

* cygwait.h: Add cygwait_us() methods.
* select.h: Change prototype for select_stuff::wait() for larger
microsecond timeouts.
* select.cc (pselect): Convert from old cygwin_select().
Implement microsecond timeouts.
(cygwin_select): Rewrite as a wrapper on pselect().
(select): Implement microsecond timeouts.
(select_stuff::wait): Implement microsecond timeouts with a timer
object.

8 years ago* winsup/testsuite/configure: chmod a+x
John Hood [Fri, 18 Mar 2016 08:31:16 +0000 (04:31 -0400)]
* winsup/testsuite/configure: chmod a+x

8 years agoMove get_nonascii_key into fhandler_console.
John Hood [Sat, 30 Jan 2016 22:33:36 +0000 (17:33 -0500)]
Move get_nonascii_key into fhandler_console.

* fhandler.h (fhandler_console): Move get_nonascii_key() from
select.c into this class.
* select.cc (peek_console): Move get_nonascii_key() into
fhandler_console class.

8 years agorespect datarootdir
Peter Foley [Sat, 19 Mar 2016 17:45:57 +0000 (13:45 -0400)]
respect datarootdir

Recent versions of autoconf define datadir/infodir in terms of
datarootdir. Add it.

winsup/ChangeLog
* Makefile.in: define datarootdir

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoFix strict aliasing
Peter Foley [Sat, 19 Mar 2016 17:45:56 +0000 (13:45 -0400)]
Fix strict aliasing

Fix a strict aliasing error detected by gcc 6.0+

winsup/cygwin/ChangeLog
* pinfo.cc (winpids::enum_process): Fix strict aliasing.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoFix typoed comparison
Peter Foley [Sat, 19 Mar 2016 17:45:54 +0000 (13:45 -0400)]
Fix typoed comparison

winsup/cygwin/ChangeLog
* thread.cc (semaphore::open): Fix mistaken conditional.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoThe address of an class always evaluates to true
Peter Foley [Sat, 19 Mar 2016 17:45:53 +0000 (13:45 -0400)]
The address of an class always evaluates to true

winsup/cygwin/pinfo.cc:465:14: error: the compiler can assume that the
address of 'tc' will always evaluate to 'true' [-Werror=address]

winsup/cygwin/ChangeLog
* pinfo.cc (_pinfo::set_ctty): remove always true check.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoRemove misleading indentation
Peter Foley [Sun, 20 Mar 2016 10:58:35 +0000 (11:58 +0100)]
Remove misleading indentation

* syscalls.cc (getpriority): Fix misleading indentation.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoAdd necessary braces to if statements
Peter Foley [Sat, 19 Mar 2016 17:45:49 +0000 (13:45 -0400)]
Add necessary braces to if statements

The missing braces cause only the first expression to be guarded by the
else clause.

winsup/cygwin/ChangeLog
* fhandler_disk_file.cc (facl): Add missing braces to if statement.
* mount.cc (dos_drive_mappings): Add missing braces to if statement.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoRemove dead code from fhandler_console.
Peter Foley [Sat, 19 Mar 2016 17:45:48 +0000 (13:45 -0400)]
Remove dead code from fhandler_console.

This if is unconditionally false, so remove it.

winsup/cygwin/fhandler_console.cc: In member function 'bool dev_console::fillin(HANDLE)':
winsup/cygwin/fhandler_console.cc:740:22: error: self-comparison always evaluates to false [-Werror=tautological-compare]
       if (b.dwSize.Y != b.dwSize.Y || b.dwSize.X != b.dwSize.X)
           ~~~~~~~~~~~^~~~~~~~~~~~~
winsup/cygwin/fhandler_console.cc:740:50: error: self-comparison always evaluates to false [-Werror=tautological-compare]
       if (b.dwSize.Y != b.dwSize.Y || b.dwSize.X != b.dwSize.X)
                                       ~~~~~~~~~~~^~~~~~~~~~~~~

winsup/cygwin/ChangeLog
* fhandle_console.cc (fillin): remove dead code

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agoRemove unused and unsafe call to __builtin_frame_address
Peter Foley [Sat, 19 Mar 2016 17:45:47 +0000 (13:45 -0400)]
Remove unused and unsafe call to __builtin_frame_address

initial_sp has been unused since commit fbf23e3 back in 2000.
Keep the value, so as to avoid changing the offset of magic_biscuit.

winsup/cygwin/lib/_cygwin_crt0_common.cc:140:52:
error: calling 'void* __builtin_frame_address(unsigned int)' with a
nonzero argument is unsafe [-Werror=frame-address]
   u->initial_sp = (char *) __builtin_frame_address (1);

winsup/cygwin/ChangeLog
lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Initialize initial_sp
with nullptr.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
8 years agowinsup: Move all old CVS Changelogs into CVSChangeLogs.old dir
Corinna Vinschen [Sat, 19 Mar 2016 12:59:52 +0000 (13:59 +0100)]
winsup: Move all old CVS Changelogs into CVSChangeLogs.old dir

8 years agoRemove ill-advised cygwin_props
Corinna Vinschen [Sat, 19 Mar 2016 12:21:18 +0000 (13:21 +0100)]
Remove ill-advised cygwin_props

Cygwin_props have been invented to allow switching off the unique
installation keys in the first place, supposedly for debugging.
This never really was a good idea, after all we *want* the installations
to be independent and there's no good reason to break that, not even
for debugging purposes.

Other than that, cygwin_props were meant to be used for some other global
settings which never took place.  There's just no good reason to tweak
the DLL binary invisibly where a setting could be done in a file or the
environment.

This patch removes the cygwin_props entirely, including the related
settings in cygcheck.

cygwin:
* cygprops.h: Remove file.
* globals.cc (cygwin_props): Remove.
* cygheap.cc (init_cygheap::init_installation_root): Drop removing
installation key.

utils:
* cygcheck.cc: Drop including cygprops.h.  Remove now unused option
values.
(unique_object_name_opt): Remove.
(handle_unique_object_name): Remove function.
(usage): Remove text for unique-object-names options.
(longopts): Remove unique-object-names options.
(main): Drop handling unique-object-names options.

doc:
* utils.xml (cygcheck): Remove text for unique-object-names options.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoRegenerate configure script.
Jeff Johnston [Sat, 19 Mar 2016 04:27:59 +0000 (00:27 -0400)]
Regenerate configure script.

8 years agoRemove references to older Cygwin releases from documentation
Corinna Vinschen [Fri, 18 Mar 2016 21:52:04 +0000 (22:52 +0100)]
Remove references to older Cygwin releases from documentation

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agosparc64: move struct timeval to <sys/_timeval.h>
Yaakov Selkowitz [Fri, 18 Mar 2016 19:10:43 +0000 (14:10 -0500)]
sparc64: move struct timeval to <sys/_timeval.h>

commit bb0159489785d577ad0b8061a1ba7956ee0f89d0 moved the struct timeval
declaration from <sys/time.h> to <sys/_timeval.h>, and commit
01885f533de81ff73e9da1519a4b5f2316b49f86 changed <sys/select.h> to include
<sys/_timeval.h>.  Therefore, sparc64's own struct timeval needs to be
moved accordingly in order to avoid a conflict from the generic type.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Acked-by: Corinna Vinschen <vinschen@redhat.com>
8 years agoFeature test macros overhaul: sparc64
Yaakov Selkowitz [Fri, 18 Mar 2016 19:08:07 +0000 (14:08 -0500)]
Feature test macros overhaul: sparc64

sparc64 has a number of its own headers which override the generic ones.
These too need to use feature test macros properly.

These changes correspond to the generic fcntl.h and sys/stat.h changes
in commit d2df6d381b36f3f76420bc3bab965fbbdc3c3a8c and
commit 069e400c913659432c5d1953c4fa9a696b06e340.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Acked-by: Corinna Vinschen <vinschen@redhat.com>
8 years agoCleanup macros in chacha_private.h to be target-type independent
Howland, Craig D [Fri, 18 Mar 2016 18:18:15 +0000 (18:18 +0000)]
Cleanup macros in chacha_private.h to be target-type independent

* libc/stdlib/chacha_private.h (U8C, U32C): Remove un-necessary macros.
(U8V, U32V): Drop masking.

8 years agoOnly export arc4random_stir and arc4random_addrandom on Cygwin
Corinna Vinschen [Fri, 18 Mar 2016 20:12:12 +0000 (21:12 +0100)]
Only export arc4random_stir and arc4random_addrandom on Cygwin

Export to maintain backward compatibility, but don't let
them do anything useful.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoFeature test macros overhaul: signal.h (part 2)
Yaakov Selkowitz [Fri, 18 Mar 2016 04:21:49 +0000 (23:21 -0500)]
Feature test macros overhaul: signal.h (part 2)

Move the sig*set macros following the functions inside their feature
test macro conditional.

This fixes the build on bare-metal targets following
commit 5c78499ae2ae6ac28854b43a1ad73d917b40c62d.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Acked-by: Corinna Vinschen <vinschen@redhat.com>
8 years agoarm: fix build with newlib supplied syscalls enabled
Yaakov Selkowitz [Fri, 18 Mar 2016 03:11:14 +0000 (22:11 -0500)]
arm: fix build with newlib supplied syscalls enabled

In file included from libc/sys/arm/crt0.S:2:0:
libc/sys/arm/arm.h:32:25: fatal error: acle-compat.h: No such file or directory

acle-compat.h is libc/machine/arm.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoImplement getentropy for Cygwin
Corinna Vinschen [Fri, 18 Mar 2016 13:46:20 +0000 (14:46 +0100)]
Implement getentropy for Cygwin

* miscfuncs.cc (getentropy): Move fhandler_dev_random::crypt_gen_random
here and rename to getentropy.  Fix type and return values to match
getentropy requirements.
* miscfuncs.h (getentropy): Add prototype.
* fhandler.h (fhandler_dev_random::crypt_gen_random): Remove prototype.
* fhandler_random.cc (fhandler_dev_random::crypt_gen_random): Drop.
(fhandler_dev_random::write): Use getentropy instead.
(fhandler_dev_random::read): Ditto.
* fhandler_socket.cc (fhandler_socket::af_local_set_secret): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoDelete Cygwin's arc4random in favor of new Newlib implementation
Corinna Vinschen [Fri, 18 Mar 2016 13:41:33 +0000 (14:41 +0100)]
Delete Cygwin's arc4random in favor of new Newlib implementation

* Makefile.in (DLL_OFILES): Remove arc4random.o.
* libc/arc4random.c: Remove file.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoArc4random locking: Check for threaded application on Cygwin
Corinna Vinschen [Fri, 18 Mar 2016 13:40:26 +0000 (14:40 +0100)]
Arc4random locking: Check for threaded application on Cygwin

        libc/stdlib/arc4random.h (_ARC4_LOCK): Special case Cygwin.
        (_ARC4_UNLOCK): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd arc4random_stir and arc4random_addrandom for OpenBSD compatibility
Corinna Vinschen [Fri, 18 Mar 2016 13:39:58 +0000 (14:39 +0100)]
Add arc4random_stir and arc4random_addrandom for OpenBSD compatibility

        * libc/stdlib/arc4random.c (arc4random_stir): New function.
        (arc4random_addrandom): Ditto.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
8 years agoAdd arc4random() etc. from OpenBSD 5.8
Sebastian Huber [Fri, 18 Mar 2016 10:49:28 +0000 (11:49 +0100)]
Add arc4random() etc. from OpenBSD 5.8

According to the OpenBSD man page, "A Replacement Call for Random".  It
offers high quality random numbers derived from input data obtained by
the OpenBSD specific getentropy() system call which is declared in
<unistd.h> and must be implemented for each Newlib port externally.  The
arc4random() functions are used for example in LibreSSL and OpenSSH.

Cygwin provides currently its own implementation of the arc4random
family.  Maybe it makes sense to use this getentropy() implementation:

http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libcrypto/crypto/getentropy_win.c?rev=1.4&content-type=text/x-cvsweb-markup

* libc/include/stdlib.h (arc4random): Declare if __BSD_VISIBLE.
(arc4random_buf): Likewise.
(arc4random_uniform): Likewise.
* libc/include/sys/unistd.h (getentropy): Likewise.
* libc/include/machine/_arc4random.h: New file.
* libc/stdlib/arc4random.c: Likewise.
* libc/stdlib/arc4random.h: Likewise.
* libc/stdlib/arc4random_uniform.c: Likewise.
* libc/stdlib/chacha_private.h: Likewise.
* libc/sys/rtems/include/machine/_arc4random.h: Likewise.
* libc/stdlib/Makefile.am (EXTENDED_SOURCES): Add arc4random.c
and arc4random_uniform.c.
* libc/stdlib/Makefile.in: Regenerate.

8 years agoAdd timingsafe_memcmp()
Sebastian Huber [Fri, 18 Mar 2016 10:49:27 +0000 (11:49 +0100)]
Add timingsafe_memcmp()

This function is used by LibreSSL and OpenSSH and is provided by the
OpenBSD libc.

* libc/include/string.h (timingsafe_memcmp): Declare.
* libc/string/timingsafe_memcmp.c: New file.
* libc/string/Makefile.am: Add new file.
* libc/string/Makefile.in: Regenerate.

8 years agoAdd timingsafe_bcmp()
Sebastian Huber [Fri, 18 Mar 2016 10:49:26 +0000 (11:49 +0100)]
Add timingsafe_bcmp()

This function is used by LibreSSL and OpenSSH and is provided by the
OpenBSD libc.

* libc/include/string.h (timingsafe_bcmp): Declare.
* libc/string/timingsafe_bcmp.c: New file.
* libc/string/Makefile.am: Add new file.
* libc/string/Makefile.in: Regenerate.

8 years agoAdd explicit_bzero()
Sebastian Huber [Fri, 18 Mar 2016 10:49:25 +0000 (11:49 +0100)]
Add explicit_bzero()

This function is used by LibreSSL and OpenSSH and is provided by the
OpenBSD libc.

* libc/include/string.h (explicit_bzero): Declare.
* libc/string/explicit_bzero.c: New file.
* libc/string/Makefile.am: Add new file.
* libc/string/Makefile.in: Regenerate.

8 years agoGuard ssize_t definition by _SSIZE_T_DECLARED
Sebastian Huber [Fri, 18 Mar 2016 10:49:24 +0000 (11:49 +0100)]
Guard ssize_t definition by _SSIZE_T_DECLARED

This guard is used by FreeBSD <sys/socket.h> for example.  The FreeBSD
network stack is used in RTEMS.

* newlib/libc/include/sys/types.h (ssize_t): Guard by
_SSIZE_T_DECLARED.

8 years agoCygwin: define byteswap.h inlines as macros
Yaakov Selkowitz [Tue, 15 Mar 2016 03:11:20 +0000 (22:11 -0500)]
Cygwin: define byteswap.h inlines as macros

The bswap_* "functions" are macros in glibc, so they may be tested for
by the preprocessor (e.g. #ifdef bswap_16).

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: Cygwin headers
Yaakov Selkowitz [Tue, 15 Mar 2016 02:24:29 +0000 (21:24 -0500)]
Feature test macros overhaul: Cygwin headers

Use proper internal macros for BSD and GNU.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: sys/types.h
Yaakov Selkowitz [Tue, 15 Mar 2016 02:20:02 +0000 (21:20 -0500)]
Feature test macros overhaul: sys/types.h

The u_int/u_char/etc. BSD types are needed by Cygwin's netinet/*.h
headers, so they always need to be available.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoRevert "Remove inclusion of sys/select.h in sys/types.h for backward compat"
Yaakov Selkowitz [Tue, 15 Mar 2016 01:50:45 +0000 (20:50 -0500)]
Revert "Remove inclusion of sys/select.h in sys/types.h for backward compat"

This BSDism is still in use (e.g. putty).

This reverts commit 088f7a723962dd18dcae09e8e8fa168bbea6ed0b.

8 years agoFeature test macros overhaul: sys/time.h
Yaakov Selkowitz [Tue, 15 Mar 2016 02:14:39 +0000 (21:14 -0500)]
Feature test macros overhaul: sys/time.h

The inclusion of <sys/select.h> is required also by POSIX.1-2001.
setitimer is XSI, and futimesat is GNU.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: sys/stat.h
Yaakov Selkowitz [Tue, 15 Mar 2016 01:57:45 +0000 (20:57 -0500)]
Feature test macros overhaul: sys/stat.h

Replace all !_POSIX_SOURCE with BSD.  All *at functions depend on
ATFILE; futimens is POSIX.1-2008.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: sys/select.h
Yaakov Selkowitz [Mon, 14 Mar 2016 22:31:12 +0000 (17:31 -0500)]
Feature test macros overhaul: sys/select.h

Remove !_POSIX_SOURCE conditional; pselect is POSIX.1-2001.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: wchar.h
Yaakov Selkowitz [Mon, 14 Mar 2016 22:24:48 +0000 (17:24 -0500)]
Feature test macros overhaul: wchar.h

open_wmemstream is POSIX.1-2008.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: unistd.h
Yaakov Selkowitz [Tue, 15 Mar 2016 02:03:34 +0000 (21:03 -0500)]
Feature test macros overhaul: unistd.h

Throughout, use proper internal macros for functions, including those
marked as target-specific.  Use ATFILE for all *at functions.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: time.h
Yaakov Selkowitz [Mon, 14 Mar 2016 22:23:09 +0000 (17:23 -0500)]
Feature test macros overhaul: time.h

Throughout, replace __STRICT_ANSI__ with the proper internal macros.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: strings.h
Yaakov Selkowitz [Mon, 14 Mar 2016 22:20:38 +0000 (17:20 -0500)]
Feature test macros overhaul: strings.h

Replace __STRICT_ANSI__ with the proper internal macros for bcmp etc.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: string.h
Yaakov Selkowitz [Mon, 14 Mar 2016 22:13:42 +0000 (17:13 -0500)]
Feature test macros overhaul: string.h

Throughout, remove __STRICT_ANSI__ and use the proper internal macros.

bcmp, bcopy, bzero, index, and rindex were in POSIX prior to 2008.

memrchr is GNU.

strdup and strndup are POSIX.1-2008.

The int-returning form of strerror_r is POSIX.1-2001.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: stdlib.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:55:26 +0000 (16:55 -0500)]
Feature test macros overhaul: stdlib.h

Throughout, simplify the C99/C11 conditionals, and replace
__STRICT_ANSI__ with the proper internal POSIX macros.  The _*_r
reentrant functions need not be guarded (and most haven't been) because
such names in the global scope are reserved to the implementation.

atoff is unique to newlib.

dtoa is not actually exported (_dtoa_r is used internally), is
nonstandard, and the declaration conflicts with the code included in
MySQL, NSPR, and SpiderMonkey.

mktemp was removed in POSIX.1-2001.

The qsort_r declarations are reordered so that the GNU version retains
precedence.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: stdio.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:40:44 +0000 (16:40 -0500)]
Feature test macros overhaul: stdio.h

Throughout, remove references to __STRICT_ANSI__ and use the proper
internal macros and versions for C99, POSIX, ATFILE for the various *at
functions, or LARGEFILE for fseeko and ftello.

[v]asprintf are GNU extensions, but the *iprintf, *iscanf, and
*asnprintf functions are unique to newlib.

getw and putw were removed from POSIX.1-2001. funopen is BSD, and
fopencookie is GNU.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: signal.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:39:56 +0000 (16:39 -0500)]
Feature test macros overhaul: signal.h

Use proper internal macros for BSD sig_t and GNU sighandler_t.

sigaltstack and friends are XSI even in SUSv4 but in glibc are
nonetheless handled as POSIX.1-2008 (not 2001).

The requirement for the ucontext_t typedef in signal.h was XSI prior to
POSIX.1-2008.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: pwd.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:36:13 +0000 (16:36 -0500)]
Feature test macros overhaul: pwd.h

getpw*_r dates back to POSIX.1c, and *pwent to XPG4v2.  Both are also BSD.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: pthread.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:35:32 +0000 (16:35 -0500)]
Feature test macros overhaul: pthread.h

Use internal macros for GNU extensions.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: math.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:26:18 +0000 (16:26 -0500)]
Feature test macros overhaul: math.h

Simplify the C99 conditionals.  Mark the drem and gamma functions as
BSD|SVID, the Bessel double functions also XSI and the floats also SUSv3.
signgam is BSD|SVID|XSI, and matherr is SVID.  Finally, use the internal
macros to control the symbolic constants.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
8 years agoFeature test macros overhaul: limits.h
Yaakov Selkowitz [Mon, 14 Mar 2016 21:25:18 +0000 (16:25 -0500)]
Feature test macros overhaul: limits.h

Simplify the C99 conditional, and use the internal macro for GNU extensions.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This page took 0.07769 seconds and 5 git commands to generate.