diff options
author | unknown <pekka@mysql.com> | 2004-08-26 14:06:39 +0200 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2004-08-26 14:06:39 +0200 |
commit | 536ce70814b71ddef63bfeda81e81a97ce13023b (patch) | |
tree | 6a751b9b1c12e1bc5ffe03cc220612172d5eb818 /ndb | |
parent | 76ec262247b2f39e65a9824e1cb1c273ca1807b8 (diff) | |
download | mariadb-git-536ce70814b71ddef63bfeda81e81a97ce13023b.tar.gz |
FileLogHandler.cpp, ndb_global.h:
sco and others: use PATH_MAX always
ndb/include/ndb_global.h:
sco and others: use PATH_MAX always
ndb/src/common/logger/FileLogHandler.cpp:
sco and others: use PATH_MAX always
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/include/ndb_global.h | 8 | ||||
-rw-r--r-- | ndb/src/common/logger/FileLogHandler.cpp | 9 |
2 files changed, 10 insertions, 7 deletions
diff --git a/ndb/include/ndb_global.h b/ndb/include/ndb_global.h index 038950a7a32..b8fcca6dbb1 100644 --- a/ndb/include/ndb_global.h +++ b/ndb/include/ndb_global.h @@ -94,6 +94,14 @@ extern int strcasecmp(const char *s1, const char *s2); extern int strncasecmp(const char *s1, const char *s2, size_t n); #endif +#ifdef SCO + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +#endif /* SCO */ + #ifdef __cplusplus } #endif diff --git a/ndb/src/common/logger/FileLogHandler.cpp b/ndb/src/common/logger/FileLogHandler.cpp index 1b5e8f8d8ca..632db71db15 100644 --- a/ndb/src/common/logger/FileLogHandler.cpp +++ b/ndb/src/common/logger/FileLogHandler.cpp @@ -14,15 +14,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include <FileLogHandler.hpp> - #include <File.hpp> -// alt use PATH_MAX -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif - // // PUBLIC // @@ -151,7 +146,7 @@ FileLogHandler::createNewFile() { bool rc = true; int fileNo = 1; - char newName[MAXPATHLEN]; + char newName[PATH_MAX]; do { |