mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
Rearrange preprocessor guards. Improve commentary.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10504 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ae1bb7eec4
commit
4c3d5ba560
@ -3,20 +3,6 @@
|
|||||||
// Various OS specific functions
|
// Various OS specific functions
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
/* The GetLongPathNameA function declaration in
|
|
||||||
* <winbase.h> under MinGW or Cygwin is protected
|
|
||||||
* by the WINVER macro which is defined in <windef.h>
|
|
||||||
*
|
|
||||||
* SHGFP_TYPE_CURRENT is defined in <shlobj.h> for __W32API_VERSION >= 3.2
|
|
||||||
* where it is protected by _WIN32_IE.
|
|
||||||
* It is missing in earlier versions of the MinGW w32api headers.
|
|
||||||
*/
|
|
||||||
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__CYGWIN32__)
|
|
||||||
# include <w32api.h>
|
|
||||||
# define WINVER 0x0500
|
|
||||||
# define _WIN32_IE 0x0500
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "support/os_win32.h"
|
#include "support/os_win32.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
@ -48,12 +34,13 @@
|
|||||||
#include <direct.h> // _getdrive
|
#include <direct.h> // _getdrive
|
||||||
#include <shlobj.h> // SHGetFolderPath
|
#include <shlobj.h> // SHGetFolderPath
|
||||||
|
|
||||||
// Needed by older versions of MinGW.
|
// Must define SHGFP_TYPE_CURRENT for older versions of MinGW.
|
||||||
#if defined (__W32API_MAJOR_VERSION) && \
|
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||||
defined (__W32API_MINOR_VERSION) && \
|
# include <w32api.h>
|
||||||
(__W32API_MAJOR_VERSION < 3 || \
|
# if __W32API_MAJOR_VERSION < 3 || \
|
||||||
__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 2)
|
__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION < 2
|
||||||
# define SHGFP_TYPE_CURRENT 0
|
# define SHGFP_TYPE_CURRENT 0
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
string const os::nulldev_ = "nul";
|
string const os::nulldev_ = "nul";
|
||||||
|
@ -21,18 +21,25 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The GetLongPathNameA function declaration in
|
/* The GetLongPathNameA function declaration in
|
||||||
* winbase.h under MinGW or Cygwin is protected
|
* <winbase.h> is protected by the WINVER macro which is
|
||||||
* by the WINVER macro which is defined in windef.h
|
* defined to a default value in <windef.h> under MinGW and Cygwin.
|
||||||
*
|
*
|
||||||
* We need to #include this file to make available the
|
* SHGFP_TYPE_CURRENT is defined in <shlobj.h> for __W32API_VERSION >= 3.2
|
||||||
* DWORD, HMODULE et al. typedefs, so check WINVER now.
|
* where it is protected by _WIN32_IE, also defined to a default value
|
||||||
|
* 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
|
||||||
|
* DWORD, HMODULE et al. typedefs, so first define WINVER, _WIN32_IE.
|
||||||
*
|
*
|
||||||
* Note: __CYGWIN__ can be defined here if building in _WIN32 mode.
|
* Note: __CYGWIN__ can be defined here if building in _WIN32 mode.
|
||||||
*/
|
*/
|
||||||
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__CYGWIN32__)
|
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__CYGWIN32__)
|
||||||
# if !defined(WINVER) || WINVER < 0x0500
|
# if defined(WINVER) && WINVER < 0x0500
|
||||||
# error WINVER must be >= 0x0500
|
# error WINVER must be >= 0x0500
|
||||||
# endif
|
# endif
|
||||||
|
# define WINVER 0x0500
|
||||||
|
# define _WIN32_IE 0x0500
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <windef.h>
|
#include <windef.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user