summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2010-07-02 14:45:15 +0200
committerAlbert Astals Cid <aacid@kde.org>2010-07-12 23:18:39 +0100
commite3663a855a9c86f0a3988a7a50fa40d37d0ea069 (patch)
treef95ded2dfe20ef68cd3fcbb1ba4fb6585dd12354
parent7227c407d23a37f5d95e6c01cb7411be2f82ca85 (diff)
Use MAX_PATH instead of _MAX_PATH everywhere
_MAX_PATH is compiler specific and not availble with the mingw compiler in ansi mode. MAX_PATH is in the Windows api and thus always available when windows.h is included.
-rw-r--r--goo/gfile.cc4
-rw-r--r--poppler/GlobalParams.cc2
-rw-r--r--poppler/PDFDoc.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/goo/gfile.cc b/goo/gfile.cc
index e8756305..ff23aae0 100644
--- a/goo/gfile.cc
+++ b/goo/gfile.cc
@@ -376,11 +376,11 @@ GooString *makePathAbsolute(GooString *path) {
#elif defined(_WIN32)
//---------- Win32 ----------
- char buf[_MAX_PATH];
+ char buf[MAX_PATH];
char *fp;
buf[0] = '\0';
- if (!GetFullPathName(path->getCString(), _MAX_PATH, buf, &fp)) {
+ if (!GetFullPathName(path->getCString(), MAX_PATH, buf, &fp)) {
path->clear();
return path;
}
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 293d7f3d..473eab74 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -172,7 +172,7 @@ DllMain (HINSTANCE hinstDLL,
static char *
get_poppler_datadir (void)
{
- static char retval[_MAX_PATH];
+ static char retval[MAX_PATH];
static int beenhere = 0;
unsigned char *p;
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index b6504808..ade5fe45 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -131,7 +131,7 @@ PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword,
PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
GooString *userPassword, void *guiDataA) {
OSVERSIONINFO version;
- wchar_t fileName2[_MAX_PATH + 1];
+ wchar_t fileName2[MAX_PATH + 1];
Object obj;
int i;
@@ -146,7 +146,7 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
}
// zero-terminate the file name string
- for (i = 0; i < fileNameLen && i < _MAX_PATH; ++i) {
+ for (i = 0; i < fileNameLen && i < MAX_PATH; ++i) {
fileName2[i] = fileNameA[i];
}
fileName2[i] = 0;