]> git.lyx.org Git - lyx.git/commitdiff
Make things compile on MSVC:
authorAngus Leeming <leeming@lyx.org>
Sun, 2 Oct 2005 21:49:52 +0000 (21:49 +0000)
committerAngus Leeming <leeming@lyx.org>
Sun, 2 Oct 2005 21:49:52 +0000 (21:49 +0000)
There's no <windef.h>, so just use <windows.h>
s/PATH_MAX/MAX_PATH/

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10508 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/os_win32.C
src/support/os_win32.h
src/support/package.C.in

index bb840a9cc38120df0c8b96f1829495f2d8d97d61..462f6fe3c4351ae0e0caba264275840236a1cc33 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <string>
 
-#include <windows.h>
-
 /* The GetLongPathName macro may be defined on the compiling machine,
  * but we must use a bit of trickery if the resulting executable is
  * to run on a Win95 machine.
@@ -195,7 +193,7 @@ namespace {
 
 string const get_long_path(string const & short_path)
 {
-       std::vector<char> long_path(PATH_MAX);
+       std::vector<char> long_path(MAX_PATH);
        DWORD result = GetLongPathName(short_path.c_str(),
                                       &long_path[0], long_path.size());
 
@@ -312,7 +310,7 @@ GetFolderPath::~GetFolderPath()
 // Eg CSIDL_PERSONAL -> "C:/Documents and Settings/USERNAME/My Documents"
 string const GetFolderPath::operator()(folder_id _id) const
 {
-       char folder_path[PATH_MAX];
+       char folder_path[MAX_PATH];
 
        int id = 0;
        switch (_id) {
index 4933a2482e6456da937ff3aeec9b310ce5accbb1..77af7fb984e30c8026b9bbd8b67c3e37445020bc 100644 (file)
@@ -29,7 +29,7 @@
  * in <windef.h> under MinGW and Cygwin.
  * It is missing in earlier versions of the MinGW w32api headers.
  *
- * We need to #include <windef.h> now to make available the
+ * We need to #include <windows.h> now to make available the
  * DWORD, HMODULE et al. typedefs, so first define WINVER, _WIN32_IE.
  *
  * Note: __CYGWIN__ can be defined here if building in _WIN32 mode.
@@ -42,7 +42,7 @@
 # define _WIN32_IE 0x0500
 #endif
 
-#include <windef.h>
+#include <windows.h>
 
 
 namespace lyx {
index d9c275889325ae4d799d6d286578ebe3d063cf70..c055ce541fe2553331767f016bbeb99baa08df21 100644 (file)
@@ -40,9 +40,7 @@
 #error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX or POSIX.
 #endif
 
-#if defined (USE_WINDOWS_PACKAGING)
-# include <windows.h>
-#elif defined (USE_MACOSX_PACKAGING)
+#if defined (USE_MACOSX_PACKAGING)
 # include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath
 #endif