summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-26 20:10:53 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-26 20:10:53 +0000
commitb86a95c7016748add7d0a746b4dc6b2a4e3ddc43 (patch)
tree47a74f7a1a65ff492a3510802deec24acd875b04
parentb4f3cb5c4b25be311952216fab1c66007a9691e7 (diff)
This should do it
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7158 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/configreader.cpp4
-rw-r--r--win/inspircd_win32wrapper.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 1976baf37..2f484293f 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1602,10 +1602,10 @@ bool ServerConfig::DirValid(const char* dirandfile)
std::string ServerConfig::GetFullProgDir()
{
- char buffer[1024];
+ char buffer[PATH_MAX];
// Get the current working directory
- if (getcwd(buffer, 1024))
+ if (getcwd(buffer, PATH_MAX))
{
std::string remainder = this->argv[0];
diff --git a/win/inspircd_win32wrapper.h b/win/inspircd_win32wrapper.h
index dc1157545..c8075b902 100644
--- a/win/inspircd_win32wrapper.h
+++ b/win/inspircd_win32wrapper.h
@@ -25,6 +25,9 @@
/* Make builds smaller, leaner and faster */
#define VC_EXTRALEAN
+/* They just have to be *different*, don't they. */
+#define PATH_MAX MAX_PATH
+
/* Begone shitty 'safe STL' warnings */
#define _SCL_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS