use MAXPATHLEN for path buffer size

svn-id: r15319
This commit is contained in:
Jonathan Gray 2004-09-28 04:14:57 +00:00
parent 7ced14e961
commit ae73d1a4ee
3 changed files with 9 additions and 1 deletions

View File

@ -97,6 +97,7 @@
#undef CMD_INVALID
#endif
#if !defined(macintosh)
#include <sys/param.h>
#include <sys/types.h>
#include <sys/uio.h>
#endif

View File

@ -24,8 +24,12 @@
#include "common/scummsys.h"
template<typename T> inline T ABS (T x) { return (x>=0) ? x : -x; }
#if !defined(MIN)
template<typename T> inline T MIN (T a, T b) { return (a<b) ? a : b; }
#endif
#if !defined(MAX)
template<typename T> inline T MAX (T a, T b) { return (a>b) ? a : b; }
#endif
/**
* Template method which swaps the vaulues of its two parameters.

View File

@ -427,7 +427,10 @@ void GlobalOptionsDialog::open() {
_savePath->setLabel(dir);
} else {
// Default to the current directory...
char buf[256];
#if !(defined(MAXPATHLEN))
#define MAXPATHLEN 1024
#endif
char buf[MAXPATHLEN];
getcwd(buf, sizeof(buf));
_savePath->setLabel(buf);
}