#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.
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());
// 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) {
* 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.
# define _WIN32_IE 0x0500
#endif
-#include <windef.h>
+#include <windows.h>
namespace lyx {
#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