2007-01-15 12:09:25 -08:00
/*
This file is part of Warzone 2100.
2007-11-10 05:25:02 -08:00
Copyright ( C ) 1992 - 2007 Trolltech ASA .
2007-01-15 12:09:25 -08:00
Copyright ( C ) 2005 - 2007 Warzone Resurrection Project
Warzone 2100 is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
Warzone 2100 is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with Warzone 2100 ; if not , write to the Free Software
Foundation , Inc . , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
*/
2006-09-25 09:46:28 -07:00
/*! \file wzglobal.h
2007-08-21 05:30:00 -07:00
* \ brief Platform detection , workarounds and compat fixes
*
* OS and CC detection code shamelessly stolen from Qt4 ( Qt / qglobal . h ) by Dennis .
* This has been stripped down , feel free to add checks as you need them .
*/
2006-09-23 10:24:55 -07:00
# ifndef WZGLOBAL_H
# define WZGLOBAL_H
2008-03-21 09:38:57 -07:00
# if defined(HAVE_CONFIG_H)
2006-09-23 10:24:55 -07:00
# include "config.h"
2008-03-21 09:38:57 -07:00
# elif defined(__MACOSX__)
2007-12-24 14:05:15 -08:00
# include "config-macosx.h"
2007-04-17 20:10:53 -07:00
# endif
2006-09-23 10:24:55 -07:00
2007-08-21 05:30:00 -07:00
/* ---- Platform detection ---- */
2006-09-23 10:24:55 -07:00
/*
The operating system , must be one of : ( WZ_OS_x )
2008-08-11 08:29:44 -07:00
DARWIN - Darwin OS ( synonym for WZ_OS_MAC )
OS2 - OS / 2
OS2EMX - XFree86 on OS / 2 ( not PM )
WIN32 - Win32 ( Windows 95 / 98 / ME and Windows NT / 2000 / XP )
CYGWIN - Cygwin
SOLARIS - Sun Solaris
HPUX - HP - UX
ULTRIX - DEC Ultrix
LINUX - Linux
FREEBSD - FreeBSD
GNU_kFREEBSD - GNU / kFreeBSD
NETBSD - NetBSD
OPENBSD - OpenBSD
BSDI - BSD / OS
IRIX - SGI Irix
OSF - HP Tru64 UNIX
SCO - SCO OpenServer 5
UNIXWARE - UnixWare 7 , Open UNIX 8
AIX - AIX
HURD - GNU Hurd
DGUX - DG / UX
RELIANT - Reliant UNIX
DYNIX - DYNIX / ptx
QNX - QNX
QNX6 - QNX RTP 6.1
LYNX - LynxOS
BSD4 - Any BSD 4.4 system
UNIX - Any UNIX BSD / SYSV system
2006-09-23 10:24:55 -07:00
*/
2007-08-21 04:21:20 -07:00
# if defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__) || defined(__xlc__))
# define WZ_OS_DARWIN
# define WZ_OS_BSD4
# ifdef __LP64__
# define WZ_OS_DARWIN64
# else
# define WZ_OS_DARWIN32
# endif
2006-09-23 10:24:55 -07:00
# elif defined(__CYGWIN__)
# define WZ_OS_CYGWIN
2007-08-21 04:21:20 -07:00
# elif defined(__OS2__)
# if defined(__EMX__)
# define WZ_OS_OS2EMX
# else
# define WZ_OS_OS2
# endif
2006-09-23 10:24:55 -07:00
# elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
# define WZ_OS_WIN32
# define WZ_OS_WIN64
# elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
# define WZ_OS_WIN32
# elif defined(__MWERKS__) && defined(__INTEL__)
# define WZ_OS_WIN32
2007-08-21 04:21:20 -07:00
# elif defined(__sun) || defined(sun)
# define WZ_OS_SOLARIS
# elif defined(hpux) || defined(__hpux)
# define WZ_OS_HPUX
# elif defined(__ultrix) || defined(ultrix)
# define WZ_OS_ULTRIX
# elif defined(sinix)
# define WZ_OS_RELIANT
2006-09-23 10:24:55 -07:00
# elif defined(__linux__) || defined(__linux)
# define WZ_OS_LINUX
# elif defined(__FreeBSD__) || defined(__DragonFly__)
# define WZ_OS_FREEBSD
2007-08-21 04:21:20 -07:00
# define WZ_OS_BSD4
2008-08-11 08:29:44 -07:00
# elif defined(__FreeBSD_kernel__) && !defined(__FreeBSD__)
/* We're running a non-FreeBSD system with a FreeBSD kernel. Find out what C
* library we ' re using to detect the system we ' re running on . */
# include <stdlib.h>
# if defined(__GLIBC__)
/* We're running GNU/kFreeBSD */
# define WZ_OS_GNU_kFREEBSD
# endif
2006-09-23 10:24:55 -07:00
# elif defined(__NetBSD__)
# define WZ_OS_NETBSD
2007-08-21 04:21:20 -07:00
# define WZ_OS_BSD4
2006-09-23 10:24:55 -07:00
# elif defined(__OpenBSD__)
# define WZ_OS_OPENBSD
2007-08-21 04:21:20 -07:00
# define WZ_OS_BSD4
2006-09-23 10:24:55 -07:00
# elif defined(__bsdi__)
# define WZ_OS_BSDI
2007-08-21 04:21:20 -07:00
# define WZ_OS_BSD4
# elif defined(__sgi)
# define WZ_OS_IRIX
# elif defined(__osf__)
# define WZ_OS_OSF
# elif defined(_AIX)
# define WZ_OS_AIX
# elif defined(__Lynx__)
# define WZ_OS_LYNX
# elif defined(__GNU__)
# define WZ_OS_HURD
# elif defined(__DGUX__)
# define WZ_OS_DGUX
2006-09-23 10:24:55 -07:00
# elif defined(__QNXNTO__)
# define WZ_OS_QNX6
# elif defined(__QNX__)
# define WZ_OS_QNX
2007-08-21 04:21:20 -07:00
# elif defined(_SEQUENT_)
# define WZ_OS_DYNIX
# elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
# define WZ_OS_SCO
# elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
# define WZ_OS_UNIXWARE
# elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
# define WZ_OS_UNIXWARE
# elif defined(__INTEGRITY)
# define WZ_OS_INTEGRITY
# elif defined(__MAKEDEPEND__)
2006-09-23 10:24:55 -07:00
# else
# error "Warzone has not been tested on this OS. Please contact warzone-dev@gna.org"
# endif /* WZ_OS_x */
# if defined(WZ_OS_WIN32) || defined(WZ_OS_WIN64)
# define WZ_OS_WIN
# endif /* WZ_OS_WIN32 */
2007-08-21 04:21:20 -07:00
# if defined(WZ_OS_DARWIN)
# define WZ_OS_MAC /* WZ_OS_MAC is mostly for compatibility, but also more clear */
# define WZ_OS_MACX /* WZ_OS_MACX is only for compatibility.*/
# if defined(WZ_OS_DARWIN64)
# define WZ_OS_MAC64
# elif defined(WZ_OS_DARWIN32)
# define WZ_OS_MAC32
# endif
# endif /* WZ_OS_DARWIN */
2006-09-23 10:24:55 -07:00
2007-08-21 04:21:20 -07:00
# if defined(WZ_OS_MSDOS) || defined(WZ_OS_OS2) || defined(WZ_OS_WIN)
2006-09-23 10:24:55 -07:00
# undef WZ_OS_UNIX
# elif !defined(WZ_OS_UNIX)
# define WZ_OS_UNIX
2007-08-21 04:21:20 -07:00
# endif /* WZ_OS_* */
2006-09-23 10:24:55 -07:00
/*
The compiler , must be one of : ( WZ_CC_x )
2007-08-21 04:21:20 -07:00
MSVC - Microsoft Visual C / C + + , Intel C + + for Windows
2006-09-23 10:24:55 -07:00
GNU - GNU C + +
2007-08-21 04:21:20 -07:00
INTEL - Intel C + + for Linux , Intel C + + for Windows
2007-11-10 04:10:54 -08:00
TINYC - Fabrice Bellard ' s Tiny C Compiler
2006-09-23 10:24:55 -07:00
Should be sorted most to least authoritative .
*/
# if defined(_MSC_VER)
# define WZ_CC_MSVC
2008-04-29 07:32:14 -07:00
/* All ISO C89 compliant compilers _should_ define the macro __STDC__, MSVC
* however is known _not_ to do this , so work around that here . */
# if !defined(__STDC__)
2008-04-29 08:05:08 -07:00
# define __STDC__ 1
2008-04-29 07:32:14 -07:00
# endif
2006-09-23 10:24:55 -07:00
/* Visual C++.Net issues for _MSC_VER >= 1300 */
# if _MSC_VER >= 1300
# define WZ_CC_MSVC_NET
# endif
2007-08-21 04:21:20 -07:00
/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
# if defined(__INTEL_COMPILER)
# define WZ_CC_INTEL
# endif
/* x64 does not support mmx intrinsics on windows */
# if (defined(ZS_OS_WIN64) && defined(_M_X64))
# undef ZS_HAVE_SSE
# undef ZS_HAVE_SSE2
# undef ZS_HAVE_MMX
# undef ZS_HAVE_3DNOW
# endif
2006-09-23 10:24:55 -07:00
# elif defined(__GNUC__)
# define WZ_CC_GNU
2007-08-21 04:21:20 -07:00
# if defined(__MINGW32__)
# define WZ_CC_MINGW
# endif
# if defined(__INTEL_COMPILER)
/* Intel C++ also masquerades as GCC 3.2.0 */
# define WZ_CC_INTEL
# endif
2007-11-10 04:10:54 -08:00
# elif defined(__TINYC__)
# define WZ_CC_TINYC
2007-11-09 16:31:43 -08:00
2006-09-23 10:24:55 -07:00
# else
# error "Warzone has not been tested on this compiler. Please contact warzone-dev@gna.org"
# endif /* WZ_CC_x */
2007-11-09 16:31:43 -08:00
/*
The window system , must be one of : ( WZ_WS_x )
MACX - Mac OS X
WIN32 - Windows
X11 - X Window System
QNX - QNX
*/
# if defined(_WIN32_X11_)
# define WZ_WS_X11
# elif defined(WZ_OS_WIN32)
# define WZ_WS_WIN32
# if defined(WZ_OS_WIN64)
# define WZ_WS_WIN64
# endif
# elif defined(WZ_OS_MAC)
# define WZ_WS_MAC
# define WZ_WS_MACX
# if defined(WZ_OS_MAC64)
# define WZ_WS_MAC64
# elif defined(WZ_OS_MAC32)
# define WZ_WS_MAC32
# endif
# elif defined(WZ_OS_QNX)
# define WZ_WS_QNX
# elif defined(WZ_OS_UNIX)
# define WZ_WS_X11
# else
# error "Warzone has not been tested on this window system. Please contact warzone-dev@gna.org"
# endif /* WZ_WS_x */
# if defined(WZ_WS_WIN16) || defined(WZ_WS_WIN32)
# define WZ_WS_WIN
# endif
2007-05-29 07:55:24 -07:00
/*
The supported C standard , must be one of : ( WZ_Cxx )
99 - ISO / IEC 9899 : 1999 / C99
*/
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# define WZ_C99
2008-09-05 12:38:22 -07:00
# else
/**
* Implements the interface of the C99 macro va_copy such that we can use it on
* non - C99 systems as well .
*
* This implementation assumes that va_list is just a pointer to the stack
* frame of the variadic function . This is by far the most common setup , though
* it might not always work .
*/
# define va_copy(dest, src) (void)((dest) = (src))
2007-05-29 07:55:24 -07:00
# endif /* WZ_Cxx */
2007-08-21 05:30:00 -07:00
/*
Convenience macros to test the versions of gcc .
Copied from glibc ' s features . h .
*/
# if defined(WZ_CC_GNU) && defined __GNUC__ && defined __GNUC_MINOR__
# define WZ_CC_GNU_PREREQ(maj, min) \
( ( __GNUC__ < < 16 ) + __GNUC_MINOR__ > = ( ( maj ) < < 16 ) + ( min ) )
# else
# define WZ_CC_GNU_PREREQ(maj, min) 0
# endif
2007-10-15 11:09:18 -07:00
/*
Convenience macros to test the versions of icc .
*/
# if defined(WZ_CC_INTEL) && defined __ICC
# define WZ_CC_INTEL_PREREQ(maj, min) \
( ( __ICC ) > = ( ( maj ) * 100 ) + ( min ) )
# else
# define WZ_CC_INTEL_PREREQ(maj, min) 0
# endif
2007-08-21 05:30:00 -07:00
/* ---- Declaration attributes ---- */
/*!
2007-02-19 09:46:06 -08:00
* \ def WZ_DECL_DEPRECATED
2006-09-23 10:24:55 -07:00
*
2007-02-19 09:46:06 -08:00
* The WZ_DECL_DEPRECATED macro can be used to trigger compile - time warnings
2006-09-23 10:24:55 -07:00
* with newer compilers when deprecated functions are used .
*
* For non - inline functions , the macro gets inserted at front of the
* function declaration , right before the return type :
*
* \ code
2007-02-19 09:46:06 -08:00
* WZ_DECL_DEPRECATED void deprecatedFunctionA ( ) ;
* WZ_DECL_DEPRECATED int deprecatedFunctionB ( ) const ;
2006-09-23 10:24:55 -07:00
* \ endcode
*
* For functions which are implemented inline ,
2007-02-19 09:46:06 -08:00
* the WZ_DECL_DEPRECATED macro is inserted at the front , right before the return
2006-09-23 10:24:55 -07:00
* type , but after " static " , " inline " or " virtual " :
*
* \ code
2007-02-19 09:46:06 -08:00
* WZ_DECL_DEPRECATED void deprecatedInlineFunctionA ( ) { . . }
* virtual WZ_DECL_DEPRECATED int deprecatedInlineFunctionB ( ) { . . }
* static WZ_DECL_DEPRECATED bool deprecatedInlineFunctionC ( ) { . . }
* inline WZ_DECL_DEPRECATED bool deprecatedInlineFunctionD ( ) { . . }
2006-09-23 10:24:55 -07:00
* \ endcode
*
* You can also mark whole structs or classes as deprecated , by inserting the
2007-02-19 09:46:06 -08:00
* WZ_DECL_DEPRECATED macro after the struct / class keyword , but before the
2006-09-23 10:24:55 -07:00
* name of the struct / class :
*
* \ code
2007-02-19 09:46:06 -08:00
* class WZ_DECL_DEPRECATED DeprecatedClass { } ;
* struct WZ_DECL_DEPRECATED DeprecatedStruct { } ;
2006-09-23 10:24:55 -07:00
* \ endcode
*
* \ note
* Description copied from KDE4 , code copied from Qt4 .
*
*/
2007-10-15 11:09:18 -07:00
# if WZ_CC_GNU_PREREQ(3,2) || WZ_CC_INTEL_PREREQ(10,0)
2008-05-04 04:43:28 -07:00
# define WZ_DECL_DEPRECATED __attribute__((deprecated))
2006-09-23 10:24:55 -07:00
# elif defined(WZ_CC_MSVC) && (_MSC_VER >= 1300)
# define WZ_DECL_DEPRECATED __declspec(deprecated)
# else
# define WZ_DECL_DEPRECATED
# endif
2007-05-25 10:21:13 -07:00
/*!
* \ def WZ_DECL_UNUSED
* This function is not used , but shall not generate an unused warning either .
*/
2007-10-15 11:09:18 -07:00
# if WZ_CC_GNU_PREREQ(3,2) || WZ_CC_INTEL_PREREQ(10,0)
2008-05-04 04:43:28 -07:00
# define WZ_DECL_UNUSED __attribute__((unused))
2007-02-19 09:46:06 -08:00
# else
2007-03-10 11:43:02 -08:00
# define WZ_DECL_UNUSED
2007-02-19 09:46:06 -08:00
# endif
2006-09-23 10:24:55 -07:00
2007-05-25 10:21:13 -07:00
2007-12-30 13:44:14 -08:00
/*!
* \ def WZ_DECL_WARN_UNUSED_RESULT
* Warn if return value is unused .
*/
# if defined(WZ_CC_GNU)
2008-05-04 04:43:28 -07:00
# define WZ_DECL_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
2007-12-30 13:44:14 -08:00
# else
# define WZ_DECL_WARN_UNUSED_RESULT
# endif
2007-05-25 10:21:13 -07:00
/*!
* \ def WZ_DECL_PURE
2008-05-04 04:43:28 -07:00
* " Many functions have no effects except the return value and their return value depends only on the parameters and/or global variables. Such a function can
* be subject to common subexpression elimination and loop optimization just as an arithmetic operator would be . "
2007-05-25 10:21:13 -07:00
*/
2008-03-11 08:53:45 -07:00
# if WZ_CC_GNU_PREREQ(2,96) && !defined(WZ_CC_INTEL)
2008-05-04 04:43:28 -07:00
# define WZ_DECL_PURE __attribute__((pure))
2007-05-25 10:21:13 -07:00
# else
# define WZ_DECL_PURE
# endif
2008-04-05 04:45:29 -07:00
/*!
* \ def WZ_DECL_RESTRICT
*/
2008-04-14 14:39:14 -07:00
# if WZ_CC_GNU_PREREQ(4,1) && !defined(WZ_CC_INTEL) && !defined(__cplusplus)
2008-04-05 04:45:29 -07:00
# define WZ_DECL_RESTRICT restrict
2008-05-04 04:43:28 -07:00
# elif defined(WZ_CC_MSVC) && (_MSC_VER >= 1300)
# define WZ_DECL_RESTRICT __restrict
2008-04-05 04:45:29 -07:00
# else
# define WZ_DECL_RESTRICT
# endif
2007-05-25 10:21:13 -07:00
/*!
* \ def WZ_DECL_CONST
2008-05-04 04:43:28 -07:00
* GCC : " Many functions do not examine any values except their arguments, and have no effects except the return value. Basically this is just slightly more strict
* class than the pure attribute below , since function is not allowed to read global memory . "
2007-05-25 10:21:13 -07:00
*/
2008-03-11 08:53:45 -07:00
# if WZ_CC_GNU_PREREQ(2,5) && !defined(WZ_CC_INTEL)
2008-05-04 04:43:28 -07:00
# define WZ_DECL_CONST __attribute__((const,warn_unused_result))
2007-05-25 10:21:13 -07:00
# else
# define WZ_DECL_CONST
# endif
2007-06-05 05:01:59 -07:00
2007-08-21 04:21:20 -07:00
/*! \def WZ_DECL_FORMAT
* " The format attribute specifies that a function takes printf, scanf, strftime or strfmon style arguments which should be type-checked against a format string. "
*/
2008-03-11 08:53:45 -07:00
# if WZ_CC_GNU_PREREQ(2,5) && !defined(WZ_CC_INTEL)
2007-08-21 04:21:20 -07:00
# define WZ_DECL_FORMAT(archetype, string_index, first_to_check) \
2008-05-04 04:43:28 -07:00
__attribute__ ( ( format ( archetype , string_index , first_to_check ) ) )
2007-08-21 04:21:20 -07:00
# else
2007-08-22 11:04:07 -07:00
# define WZ_DECL_FORMAT(archetype, string_index, first_to_check)
2007-08-21 04:21:20 -07:00
# endif
2008-03-11 08:53:45 -07:00
/*! \def WZ_DECL_MAY_ALIAS
* " Accesses to objects with types with this attribute are not subjected to type-based alias analysis, but are instead assumed to be able to alias any other type of objects, just like the char type. See -fstrict-aliasing for more information on aliasing issues. "
*/
# if WZ_CC_GNU_PREREQ(3,3) && !defined(WZ_CC_INTEL)
2008-05-04 04:43:28 -07:00
# define WZ_DECL_MAY_ALIAS __attribute__((may_alias))
2008-03-11 08:53:45 -07:00
# else
# define WZ_DECL_MAY_ALIAS
# endif
2008-05-04 04:43:28 -07:00
/*! \def WZ_DECL_THREAD
* Declares a variable to be local to the running thread , and not shared between threads .
*/
# if defined(WZ_CC_GNU) || defined(WZ_CC_INTEL)
# define WZ_DECL_THREAD __thread
# elif defined(WZ_CC_MSVC)
# define __declspec(thread)
# else
# error "Thread local storage attribute required"
# endif
/*! \def WZ_ASSERT_STATIC_STRING
* Asserts that two types are equal
*/
# if defined(WZ_CC_GNU) || defined(WZ_CC_INTEL)
# define WZ_ASSERT_STATIC_STRING(_var) assert(__builtin_types_compatible_p(typeof(_var), char[]))
# else
2008-05-04 05:55:05 -07:00
# define WZ_ASSERT_STATIC_STRING(_var) (void)_var
2008-05-04 04:43:28 -07:00
# endif
2008-03-21 16:02:22 -07:00
/* ---- Global constants ---- */
# define MAX_STR_LENGTH 256
2007-08-21 05:30:00 -07:00
/* ---- Platform specific setup ---- */
# if defined(WZ_OS_WIN)
# if defined(WZ_CC_MINGW)
2007-08-21 07:52:50 -07:00
# include <unistd.h>
# include <sys / param.h>
2007-08-21 05:30:00 -07:00
# include <w32api.h>
# define _WIN32_IE IE5
2007-11-11 12:04:50 -08:00
// Required for alloca
# include <malloc.h>
2007-08-21 05:30:00 -07:00
2007-08-21 07:52:50 -07:00
# elif defined(WZ_CC_MSVC)
2007-08-21 05:30:00 -07:00
# if defined(_DEBUG)
# define DEBUG
# define _CRTDBG_MAP_ALLOC
# include <stdlib.h>
# include <crtdbg.h>
# endif /* _DEBUG */
2007-08-21 07:52:50 -07:00
# endif /* WZ_CC_* */
2007-08-21 05:30:00 -07:00
# define WIN32_LEAN_AND_MEAN
# define WIN32_EXTRA_LEAN
# include <windows.h>
# if defined(WZ_CC_MSVC)
2008-03-09 03:06:05 -07:00
// notify people we are disabling these warning messages.
2008-05-11 03:17:49 -07:00
# pragma message (" *** Warnings 4018,4100,4127,4204,4244,4267,4389 have been squelched. ***")
# pragma warning (disable : 4018) // Shut up: '>' : signed/unsigned mismatch
2008-03-07 13:51:53 -08:00
# pragma warning (disable : 4100) // Shut up: unreferenced formal parameter (FIXME)
# pragma warning (disable : 4127) // Shut up: conditional expression is constant (eg. "while(0)")
# pragma warning (disable : 4204) // Shut up: non-constant aggregate initializer
# pragma warning (disable : 4244) // Shut up: conversion from 'float' to 'int', possible loss of data
2008-05-11 03:17:49 -07:00
# pragma warning (disable : 4267) // Shut up: conversion from 'size_t' to 'type', possible loss of data
# pragma warning (disable : 4389) // Shut up: '==' : signed/unsigned mismatch
2008-03-07 13:51:53 -08:00
2007-08-21 05:30:00 -07:00
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
2007-11-06 10:30:19 -08:00
# define inline __inline
2007-11-11 12:04:50 -08:00
# define alloca _alloca
2007-08-21 05:30:00 -07:00
# define fileno _fileno
# define isfinite _finite
2007-08-21 05:59:05 -07:00
# define PATH_MAX MAX_PATH
2007-08-21 05:30:00 -07:00
# endif /* WZ_CC_MSVC */
2007-12-23 08:44:36 -08:00
/* Make sure that PATH_MAX is large enough to use as the size for return
* buffers for Windows API calls
*/
# if (PATH_MAX < MAX_PATH)
# undef PATH_MAX
# define PATH_MAX MAX_PATH
# endif
2007-08-21 05:30:00 -07:00
# elif defined(WZ_OS_UNIX)
2007-08-21 05:59:05 -07:00
# include <unistd.h>
2007-11-11 12:04:50 -08:00
# include <alloca.h>
2007-08-21 05:30:00 -07:00
# endif /* WZ_OS_* */
2006-09-23 10:24:55 -07:00
# endif /* WZGLOBAL_H */