try to ensure we get posix strerror_r

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34845 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-02-29 15:17:06 +00:00
parent 2c2bfccccb
commit b6015d2f0a
2 changed files with 19 additions and 3 deletions

View file

@ -23,12 +23,23 @@
*/
#import "common.h"
#ifndef _XOPEN_SOURCE
/* Carefully turn off _GNU_SOURCE and on _XOPEN_SOURCE for string.h so we
* get the POSIX strerror_r
*/
#ifdef _GNU_SOURCE
#undef _GNU_SOURCE
#define _GNU_SOURCE 0
#endif
#ifdef _XOPEN_SOURCE
#undef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600
#endif
#include <string.h>
#undef _GNU_SOURCE
#undef _XOPEN_SOURCE
#import "config.h"
#include <stdio.h>
#import "Foundation/NSDictionary.h"