summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-15 11:53:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-06-15 11:53:04 +0000
commitd62febcf8fe60caefce741c7b531bfeda4eb0ec3 (patch)
treefecf3f234bf5043fe21d716603ce1ee219012607 /src
parent46235defb1b414497a6bf44f2af1127e02ab4ff8 (diff)
Define PATH_MAX if its not already defined
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9907 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 19f5cc21c..ad0e972f9 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -2071,7 +2071,7 @@ bool ServerConfig::DirValid(const char* dirandfile)
std::string ServerConfig::GetFullProgDir()
{
- char buffer[4096];
+ char buffer[PATH_MAX];
#ifdef WINDOWS
/* Windows has specific api calls to get the exe path that never fail.
* For once, windows has something of use, compared to the POSIX code
@@ -2085,7 +2085,7 @@ std::string ServerConfig::GetFullProgDir()
}
#else
// Get the current working directory
- if (getcwd(buffer, 4096))
+ if (getcwd(buffer, PATH_MAX))
{
std::string remainder = this->argv[0];