experimental change to try to avoid non-standard extensions

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34852 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-03-01 09:14:08 +00:00
parent 50decd4014
commit bb610b0e30
8 changed files with 32 additions and 20 deletions

View file

@ -1,3 +1,14 @@
2012-03-01 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSRunLoopWatcher.h:
* Source/NSXMLPrivate.h:
* Source/GSRunLoopCtxt.h:
* Source/common.h:
* Source/Additions/NSError+GNUstepBase.m:
* Source/GSURLPrivate.h:
Include config.h via common.h ... and have that turn off _GNU_SOURCE
so GNU extensions aren't used and we stick to standard strerror_r
2012-03-01 Fred Kiefer <FredKiefer@gmx.de> 2012-03-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSXMLNode.m: More cleanup. * Source/NSXMLNode.m: More cleanup.

View file

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

View file

@ -25,10 +25,10 @@
$Date$ $Revision$ $Date$ $Revision$
*/ */
#include "config.h" #import "common.h"
#include <Foundation/NSException.h> #import "Foundation/NSException.h"
#include <Foundation/NSMapTable.h> #import "Foundation/NSMapTable.h"
#include <Foundation/NSRunLoop.h> #import "Foundation/NSRunLoop.h"
/* /*
* Setup for inline operation of arrays. * Setup for inline operation of arrays.

View file

@ -54,8 +54,8 @@
* NB. This class is private to NSRunLoop and must not be subclassed. * NB. This class is private to NSRunLoop and must not be subclassed.
*/ */
#include "config.h" #import "common.h"
#include <Foundation/NSRunLoop.h> #import "Foundation/NSRunLoop.h"
@class NSDate; @class NSDate;

View file

@ -27,7 +27,7 @@
/* /*
* Headers needed by many URL loading classes * Headers needed by many URL loading classes
*/ */
#import "config.h" #import "common.h"
#import "Foundation/NSArray.h" #import "Foundation/NSArray.h"
#import "Foundation/NSAutoreleasePool.h" #import "Foundation/NSAutoreleasePool.h"
#import "Foundation/NSData.h" #import "Foundation/NSData.h"

View file

@ -25,8 +25,7 @@
#ifndef _INCLUDED_NSXMLPRIVATE_H #ifndef _INCLUDED_NSXMLPRIVATE_H
#define _INCLUDED_NSXMLPRIVATE_H #define _INCLUDED_NSXMLPRIVATE_H
#import "config.h" #import "common.h"
#import "GNUstepBase/GSConfig.h"
#define EXPOSE_NSXMLDTD_IVARS 1 #define EXPOSE_NSXMLDTD_IVARS 1
#define EXPOSE_NSXMLDTDNode_IVARS 1 #define EXPOSE_NSXMLDTDNode_IVARS 1
@ -42,7 +41,9 @@
inline static unsigned char *XMLStringCopy(NSString *source) inline static unsigned char *XMLStringCopy(NSString *source)
{ {
char *xmlstr; char *xmlstr;
unsigned int len = [source maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1; unsigned int len;
len = [source maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1;
if (len == 0) if (len == 0)
return NULL; return NULL;
xmlstr = malloc(len); xmlstr = malloc(len);

View file

@ -4,6 +4,12 @@
* might be from an earlier build. * might be from an earlier build.
*/ */
// disable extensions ... we want to use standard code
#ifdef _GNU_SOURCE
#undef _GNU_SOURCE
#endif
#define _GNU_SOURCE 0
#import "config.h" #import "config.h"
/* If this is included in a file in the Additions subdirectory, and we are /* If this is included in a file in the Additions subdirectory, and we are

View file

@ -16,7 +16,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
#include "config.h" #import "common.h"
#include <ctype.h> #include <ctype.h>
#include <sys/types.h> #include <sys/types.h>