mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
improve system error messages
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35764 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
21bd77c921
commit
3f773a24fc
9 changed files with 65 additions and 36 deletions
|
@ -4,31 +4,41 @@
|
|||
* might be from an earlier build.
|
||||
*/
|
||||
|
||||
/* disable extensions ... we want to use standard code
|
||||
#import "config.h"
|
||||
|
||||
/* Disable extensions (config.h may have turned them on) ...
|
||||
* we want to use standard code.
|
||||
*/
|
||||
#ifdef _GNU_SOURCE
|
||||
#undef _GNU_SOURCE
|
||||
#if defined(_GNU_SOURCE)
|
||||
# undef _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
|
||||
/* Ensure we have _XOPEN_SOURCE turned on at the appropriate
|
||||
* level for the facilities we need.
|
||||
*
|
||||
* Minimum of 600 for string.h so we get the POSIX strerror_r() behavior
|
||||
* on systems using glibc.
|
||||
*
|
||||
* Any systems where using XOPEN causes problems can define GSXOPEN to 0
|
||||
*/
|
||||
/* This hack work around for glibc breaks FreeBSD and probably other platforms.
|
||||
*/
|
||||
#if (defined(__linux__) &&!defined(__GNU__)) || defined(__QNXNTO__)
|
||||
# if defined(_XOPEN_SOURCE)
|
||||
# if _XOPEN_SOURCE < 600
|
||||
# undef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE 600
|
||||
# endif
|
||||
# else
|
||||
# define _XOPEN_SOURCE 600
|
||||
# endif
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
# define GSXOPEN 0
|
||||
#else
|
||||
# define GSXOPEN 600
|
||||
#endif
|
||||
|
||||
#import "config.h"
|
||||
#if GSXOPEN > 0
|
||||
# if defined(_XOPEN_SOURCE)
|
||||
# if _XOPEN_SOURCE < GSXOPEN
|
||||
# undef _XOPEN_SOURCE
|
||||
# define _XOPEN_SOURCE GSXOPEN
|
||||
# endif
|
||||
# else
|
||||
# define _XOPEN_SOURCE GSXOPEN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STRING_H)
|
||||
/* For POSIX strerror_r() and others
|
||||
|
@ -36,6 +46,12 @@
|
|||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
/* For strcasecmp() and others
|
||||
*/
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
/* If this is included in a file in the Additions subdirectory, and we are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue