* include/cygwin/stdlib.h (initstate, random, setstate, srandom):

Harden _XOPEN_SOURCE guard against applications defining _XOPEN_SOURCE
	with empty value.
This commit is contained in:
Corinna Vinschen 2013-12-09 10:12:42 +00:00
parent 4726a0e769
commit db0d50a67d
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-12-09 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/stdlib.h (initstate, random, setstate, srandom):
Harden _XOPEN_SOURCE guard against applications defining _XOPEN_SOURCE
with empty value.
2013-12-08 Corinna Vinschen <corinna@vinschen.de>
* include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 28.

View File

@ -31,7 +31,9 @@ void setprogname (const char *);
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))
#if !defined(__STRICT_ANSI__) \
|| (defined(_XOPEN_SOURCE) \
&& ((_XOPEN_SOURCE - 0 >= 500) || defined(_XOPEN_SOURCE_EXTENDED)))
char *initstate (unsigned seed, char *state, size_t size);
long random (void);
char *setstate (const char *state);