Mercurial > hg > openttd
changeset 15149:705c7db7523c draft
(svn r19778) -Change: use the value from PATH_MAX (POSIX) for MAX_PATH (Windows/OpenTTD) if it exists
author | rubidium <rubidium@openttd.org> |
---|---|
date | Mon, 10 May 2010 09:43:49 +0000 (2010-05-10) |
parents | 236482e2e554 |
children | 12944c945d4c |
files | src/stdafx.h |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stdafx.h +++ b/src/stdafx.h @@ -416,7 +416,13 @@ #define _stricmp strcasecmp #endif -#if !defined(MAX_PATH) +#if defined(MAX_PATH) + /* It's already defined, no need to override */ +#elif defined(PATH_MAX) && PATH_MAX > 0 + /* Use the value from PATH_MAX, if it exists */ + #define MAX_PATH PATH_MAX +#else + /* If all else fails, hardcode something :( */ #define MAX_PATH 260 #endif