diff --git a/build_w32.bat b/build_w32.bat index 5153ee8c..1ca7fe9e 100644 --- a/build_w32.bat +++ b/build_w32.bat @@ -313,21 +313,21 @@ if "%COMPILER%" == "tcc" goto TccCompile :: MSVC Compile if "%VERBOSE%" == "Y" echo on -call %COMPILER% /nologo /MT /W4 /EHsc %OPTS% /I %OUTDIR%/src /I src /I %OUTDIR%/lib /I lib /I src/w32/include /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.%O% /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c +call %COMPILER% /nologo /MT /W4 /EHsc %OPTS% /I %OUTDIR%/src /I src /I %OUTDIR%/lib /I lib /I src/w32/include /D _CONSOLE /D HAVE_CONFIG_H /FR%OUTDIR% /Fp%OUTDIR%\%MAKE%.pch /Fo%OUTDIR%\%1.%O% /Fd%OUTDIR%\%MAKE%.pdb %EXTRAS% /c %1.c @echo off goto CompileDone :GccCompile :: GCC Compile if "%VERBOSE%" == "Y" echo on -call %COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c +call %COMPILER% -mthreads -Wall -std=gnu99 -gdwarf-2 -g3 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c @echo off goto CompileDone :TccCompile :: TCC Compile if "%VERBOSE%" == "Y" echo on -call %COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -D_cdecl= -D_MSC_VER -DWINDOWS32 -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c +call %COMPILER% -mthreads -Wall -std=c11 %OPTS% -I%OUTDIR%/src -I./src -I%OUTDIR%/lib -I./lib -I./src/w32/include -D_cdecl= -D_MSC_VER -DHAVE_CONFIG_H %EXTRAS% -o %OUTDIR%/%1.%O% -c %1.c @echo off goto CompileDone diff --git a/configure.ac b/configure.ac index e9a66898..61670b8b 100644 --- a/configure.ac +++ b/configure.ac @@ -425,8 +425,8 @@ AS_CASE([$host], [*-*-mingw32], [AM_CONDITIONAL([WINDOWSENV], [true]) w32_target_env=yes - AC_DEFINE([WINDOWS32], [1], [Use platform specific coding]) - AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding]) + AC_DEFINE([WINDOWS32], [1], [Build for the WINDOWS32 API.]) + AC_DEFINE([HAVE_DOS_PATHS], [1], [Support DOS-style pathnames.]) ]) AC_DEFINE_UNQUOTED([PATH_SEPARATOR_CHAR],['$PATH_SEPARATOR'], @@ -435,6 +435,11 @@ AC_DEFINE_UNQUOTED([PATH_SEPARATOR_CHAR],['$PATH_SEPARATOR'], AC_DEFINE_UNQUOTED([HAVE_DECL_GETLOADAVG],[$HAVE_DECL_GETLOADAVG], [Define to 1 if you have the declaration of 'getloadavg'.]) +# Remember that we ran configure to generate config.h + +AC_DEFINE([MK_CONFIGURE], [1], + [Define to 1 if config.h is generated by running the configure script.]) + # Include the Maintainer's Makefile section, if it's here. MAINT_MAKEFILE=/dev/null diff --git a/src/config.ami b/src/config.ami index 503b4b03..5f32511c 100644 --- a/src/config.ami +++ b/src/config.ami @@ -16,6 +16,8 @@ this program. If not, see . */ #include "mkconfig.h" +#define MK_AMIGAOS 1 + /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ diff --git a/src/config.h-vms b/src/config.h-vms index 5c8ba49d..c7c1d0e8 100644 --- a/src/config.h-vms +++ b/src/config.h-vms @@ -17,6 +17,8 @@ this program. If not, see . */ #include "mkconfig.h" +#define MK_VMS 1 + /* Pull in types.h here to get __CRTL_VER defined for old versions of the compiler which don't define it. */ #ifdef __DECC diff --git a/src/config.h.W32 b/src/config.h.W32 index ecda22d8..32aa2545 100644 --- a/src/config.h.W32 +++ b/src/config.h.W32 @@ -17,6 +17,11 @@ this program. If not, see . */ #include "mkconfig.h" +#define MK_W32 1 + +/* Build for the WINDOWS32 API. */ +#define WINDOWS32 1 + /* Suppress some Visual C++ warnings. Maybe after the code cleanup for ISO C we can remove some/all of these. */ #if _MSC_VER > 1000 @@ -106,7 +111,7 @@ this program. If not, see . */ # define HAVE_DIRECT_H 1 #endif -/* Use platform specific coding */ +/* Support DOS-style pathnames. */ #define HAVE_DOS_PATHS 1 /* Define to 1 if you have the 'dup' function. */ diff --git a/src/configh.dos b/src/configh.dos index 068b865d..58e992f2 100644 --- a/src/configh.dos +++ b/src/configh.dos @@ -17,6 +17,8 @@ this program. If not, see . */ #include "mkconfig.h" +#define MK_DJGPP 1 + /* Include this header to make __DJGPP_MINOR__ available because DJGPP ports of GCC 4.3.0 and later no longer do it automatically. */ #include diff --git a/src/job.c b/src/job.c index a47824a7..4bbdc990 100644 --- a/src/job.c +++ b/src/job.c @@ -3480,7 +3480,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell, #ifdef WINDOWS32 /* Some shells do not work well when invoked as 'sh -c xxx' to run a - command line (e.g. Cygnus GNUWIN32 sh.exe on WIN32 systems). In these + command line (e.g. Cygnus GNUWIN32 sh.exe on W32 systems). In these cases, run commands via a script file. */ if (just_print_flag && !(flags & COMMANDS_RECURSE)) { diff --git a/src/main.c b/src/main.c index d9068ae0..8adce3a5 100644 --- a/src/main.c +++ b/src/main.c @@ -989,7 +989,7 @@ handle_runtime_exceptions (struct _EXCEPTION_POINTERS *exinfo) } /* - * On WIN32 systems we don't have the luxury of a /bin directory that + * On W32 systems we don't have the luxury of a /bin directory that * is mapped globally to every drive mounted to the system. Since make could * be invoked from any drive, and we don't want to propagate /bin/sh * to every single drive. Allow ourselves a chance to search for diff --git a/tests/scripts/features/default_names b/tests/scripts/features/default_names index 2e838806..3ecbaab9 100644 --- a/tests/scripts/features/default_names +++ b/tests/scripts/features/default_names @@ -15,7 +15,7 @@ open(MAKEFILE,"> makefile"); print MAKEFILE "SECOND: ; \@echo It chose makefile\n"; close(MAKEFILE); -# DOS/WIN32/MacOSX platforms are case-insensitive / case-preserving, so +# DOS/W32/MacOSX platforms are case-insensitive / case-preserving, so # Makefile is the same file as makefile. Just test what we can here. my $case_sensitive = 0;