From 390aa0b67fbbbe2998bb040795d585b1408866d7 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 29 Nov 2013 13:05:43 +0000 Subject: [PATCH] * include/cygwin/stdlib.h(initstate, random, setstate, srandom) : Prototype if not __STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/include/cygwin/stdlib.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 943d6b032..a97e03bf2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-11-13 Jon TURNEY + + * include/cygwin/stdlib.h(initstate, random, setstate, srandom) : + Prototype if not __STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately. + 2013-11-28 Alexey Pavlov * include/glob.h: Fix invalid use of 'restrict' error. diff --git a/winsup/cygwin/include/cygwin/stdlib.h b/winsup/cygwin/include/cygwin/stdlib.h index 79fa2b470..fb9c924a7 100644 --- a/winsup/cygwin/include/cygwin/stdlib.h +++ b/winsup/cygwin/include/cygwin/stdlib.h @@ -30,10 +30,14 @@ void setprogname (const char *); #ifndef __STRICT_ANSI__ char *canonicalize_file_name (const char *); int unsetenv (const char *); +#endif /*__STRICT_ANSI__*/ +#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 500) || (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) char *initstate (unsigned seed, char *state, size_t size); long random (void); char *setstate (const char *state); void srandom (unsigned); +#endif +#ifndef __STRICT_ANSI__ char *ptsname (int); int ptsname_r(int, char *, size_t); int getpt (void);