Tweak png.h header order to avoid problems on some systems

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32017 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rmottola 2011-02-08 18:50:52 +00:00
parent 5825ad0e53
commit a59d311d4a
2 changed files with 21 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2011-02-08 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep+PNG.m:
Tweak png.h header order to avoid problems on some systems.
2011-02-08 Riccardo Mottola <rm@gnu.org>
* Source/NSBitmapImageRep+PNG.m:

View file

@ -29,14 +29,8 @@
#import "config.h"
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>
#import "AppKit/NSGraphics.h"
#import "NSBitmapImageRep+PNG.h"
/* we include PNG stuff only if required and before the resto to avoid header and
redeclaration problems (setjmp, etc) */
#ifdef HAVE_LIBPNG
#include <png.h>
@ -52,6 +46,20 @@
# define PNG_gAMA 0
#endif
#endif /* HAVE_LIBPNG */
/* we import all the standard headers to allow compilation without PNG */
#import <Foundation/NSData.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import <Foundation/NSValue.h>
#import "AppKit/NSGraphics.h"
#import "NSBitmapImageRep+PNG.h"
#ifdef HAVE_LIBPNG
@implementation NSBitmapImageRep (PNG)
+ (BOOL) _bitmapIsPNG: (NSData *)imageData