* Guarantee that PATH_MAX is large enough to use as the size for Windows API calls (since with MinGW it is 159 bytes while it should be 160)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3136 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-12-23 16:44:36 +00:00
parent 67d902a841
commit 798d10c6d8
1 changed files with 8 additions and 0 deletions

View File

@ -422,6 +422,14 @@
# define PATH_MAX MAX_PATH
# endif /* WZ_CC_MSVC */
/* 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
#elif defined(WZ_OS_UNIX)
# include <unistd.h>
# include <alloca.h>