Cleaned and simplified includes to fix possible and actual problems with PATH_MAX
This commit is contained in:
parent
3ed285f469
commit
5611e1c110
|
@ -3,6 +3,7 @@ D1X-Rebirth Changelog
|
||||||
20100809
|
20100809
|
||||||
--------
|
--------
|
||||||
d1x-rebirth.xcodeproj/project.pbxproj, include/physfsx.h, include/pstypes.h, misc/physfsx.c, SConstruct: Add 'Resources' in .app bundle to searchpath for Mac; move bigger functions from physfsx.h to physfsx.c; resolve conflict with definition of 'bool'
|
d1x-rebirth.xcodeproj/project.pbxproj, include/physfsx.h, include/pstypes.h, misc/physfsx.c, SConstruct: Add 'Resources' in .app bundle to searchpath for Mac; move bigger functions from physfsx.h to physfsx.c; resolve conflict with definition of 'bool'
|
||||||
|
include/pstypes.h: Cleaned and simplified includes to fix possible and actual problems with PATH_MAX
|
||||||
|
|
||||||
20100806
|
20100806
|
||||||
--------
|
--------
|
||||||
|
|
|
@ -1,26 +1,15 @@
|
||||||
/* $Id: pstypes.h,v 1.1.1.1 2006/03/17 20:01:30 zicodxx Exp $ */
|
|
||||||
/*
|
|
||||||
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
||||||
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
||||||
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
||||||
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
||||||
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
||||||
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
||||||
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
||||||
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
||||||
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
||||||
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Common types for use in Miner
|
* Common types and defines
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TYPES_H
|
#ifndef _TYPES_H
|
||||||
#define _TYPES_H
|
#define _TYPES_H
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
// define a dboolean
|
// define a dboolean
|
||||||
typedef int dboolean;
|
typedef int dboolean;
|
||||||
|
|
||||||
|
@ -61,23 +50,8 @@ typedef unsigned int uint;
|
||||||
#define max(a,b) (((a)<(b))?(b):(a))
|
#define max(a,b) (((a)<(b))?(b):(a))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef PATH_MAX
|
||||||
# ifndef __MINGW32__
|
#define PATH_MAX 4096
|
||||||
# define PATH_MAX _MAX_PATH
|
|
||||||
# endif
|
|
||||||
# define FNAME_MAX 256
|
|
||||||
#elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
|
||||||
# include <sys/types.h>
|
|
||||||
# ifndef PATH_MAX
|
|
||||||
# define PATH_MAX 1024
|
|
||||||
# endif
|
|
||||||
# define FNAME_MAX 256
|
|
||||||
#elif defined __DJGPP__
|
|
||||||
# include <sys/types.h>
|
|
||||||
# define FNAME_MAX 9 // excluding extension
|
|
||||||
#elif defined(macintosh)
|
|
||||||
# define PATH_MAX 256
|
|
||||||
# define FNAME_MAX 32
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef bool
|
#ifndef bool
|
||||||
|
@ -89,25 +63,6 @@ typedef ubyte bool;
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
# ifndef __MINGW32__
|
|
||||||
# define PATH_MAX _MAX_PATH
|
|
||||||
# endif
|
|
||||||
# define FNAME_MAX 256
|
|
||||||
#elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
|
||||||
# include <sys/types.h>
|
|
||||||
# ifndef PATH_MAX
|
|
||||||
# define PATH_MAX 1024
|
|
||||||
# endif
|
|
||||||
# define FNAME_MAX 256
|
|
||||||
#elif defined __DJGPP__
|
|
||||||
# include <sys/types.h>
|
|
||||||
# define FNAME_MAX 9 // excluding extension
|
|
||||||
#elif defined(macintosh)
|
|
||||||
# define PATH_MAX 256
|
|
||||||
# define FNAME_MAX 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// the following stuff has nothing to do with types but needed everywhere,
|
// the following stuff has nothing to do with types but needed everywhere,
|
||||||
// and since this file is included everywhere, it's here.
|
// and since this file is included everywhere, it's here.
|
||||||
#if defined(__i386__) || defined(__ia64__) || defined(WIN32) || \
|
#if defined(__i386__) || defined(__ia64__) || defined(WIN32) || \
|
||||||
|
|
Loading…
Reference in a new issue