Improve MinGW support.

- Code specific to Windows was #ifdef'ed with _MSC_VER so it wasn't included with MinGW. So _MSC_VER is replaced with _WIN32.
- MinGW doesn't support _get_pgmptr() so it is necessary to directly call the Win32 function GetModuleFileName(). This implies including windows.h which in turn causes a name clash with the Win32 function SearchPath(). So the cc65 type SearchPath is renamed to SearchPaths.
This commit is contained in:
Oliver Schmidt
2014-03-03 22:12:14 +01:00
parent fcc95f4c1c
commit 50c4fd1c4c
15 changed files with 73 additions and 77 deletions

View File

@@ -44,8 +44,8 @@
SearchPath* IncSearchPath; /* Standard include path */
SearchPath* BinSearchPath; /* Binary include path */
SearchPaths* IncSearchPath; /* Standard include path */
SearchPaths* BinSearchPath; /* Binary include path */
@@ -75,7 +75,7 @@ void FinishIncludePaths (void)
AddSubSearchPathFromEnv (IncSearchPath, "CC65_HOME", "asminc");
/* Add some compiled-in search paths if defined at compile time. */
#ifdef CA65_INC
#if defined(CA65_INC) && !defined(_WIN32)
AddSearchPath (IncSearchPath, STRINGIZE (CA65_INC));
#endif