Skip to content

Commit 0ed5803

Browse files
echoixrkanavath
andcommitted
Support for MSVC. Use _WIN32 instead of __MINGW32__
This is not a search and replace of __MING32__ with _WIN32. There are places where __MINGW32__ is still used and all changes are tested with MSVC 2019 compiler. Although, this commit alone will not work on MSVC because there are plenty of other things to be done which are seperated into multiple PR. PR #289 is the one that "works" on MSVC and unix as well. But that contains too many changes which shouldn't in a single PR. Even though this PR alone won't compile GRASS GIS on MSVC, it sure will not break existing compilers which I think is very important. Complete support for MSVC will be ready after 2/3 PRs OSGeo#289 Co-authored-by: Rashad Kanavath <[email protected]>
1 parent 1f72eec commit 0ed5803

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/grass/gis.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static const char *GRASS_copyright UNUSED = "GRASS GNU GPL licensed Software";
8585

8686
/*! \brief Cross-platform Newline Character */
8787
#define NEWLINE '\n'
88-
#ifdef __MINGW32__
88+
#ifdef _WIN32
8989
#define HOST_NEWLINE "\r\n"
9090
#else
9191
#define HOST_NEWLINE "\n"
@@ -228,7 +228,7 @@ static const char *GRASS_copyright UNUSED = "GRASS GNU GPL licensed Software";
228228

229229
/* Cross-platform Directory Separator Character and null device stuff */
230230
#define GRASS_DIRSEP '/'
231-
#ifdef __MINGW32__
231+
#ifdef _WIN32
232232
#define HOST_DIRSEP '\\'
233233
#define G_DEV_NULL "NUL:"
234234
#else
@@ -634,7 +634,7 @@ typedef float FCELL;
634634
#if HAVE_INT64_T
635635
#include <sys/types.h>
636636
typedef int64_t grass_int64;
637-
#elif defined(__MINGW32__)
637+
#elif defined(_WIN32)
638638
typedef __int64 grass_int64;
639639
#elif HAVE_LONG_LONG_INT
640640
typedef long long int grass_int64;

0 commit comments

Comments
 (0)