build fix for files.c
Warwick's plname files.c addition broke the build on both win32 and CE because NAMES_MAX wasn't defined. In win32 it was defined in limits.h, but only when _POSIX_ was defined. In CE it just didn't exist in any of the header files. Since it was also complaining about strdup(), I #ifdef'd Warwick's code out under CE.
This commit is contained in:
@@ -42,6 +42,12 @@ extern int errno;
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#if defined(WIN32)
|
||||
#define _POSIX_
|
||||
#include <limits.h>
|
||||
#undef _POSIX_
|
||||
#endif
|
||||
|
||||
#ifdef PREFIXES_IN_USE
|
||||
#define FQN_NUMBUF 4
|
||||
static char fqn_filename_buffer[FQN_NUMBUF][FQN_MAX_FILENAME];
|
||||
@@ -808,6 +814,8 @@ restore_saved_game()
|
||||
return fd;
|
||||
}
|
||||
|
||||
#if !defined(WIN_CE)
|
||||
|
||||
static char*
|
||||
plname_from_file(filename)
|
||||
const char* filename;
|
||||
@@ -901,6 +909,7 @@ char** saved;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* !WIN_CE */
|
||||
|
||||
/* ---------- END SAVE FILE HANDLING ----------- */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user