From b73c78a6f5977ece78c7db4cff26c693c3528182 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Wed, 28 Jan 2004 00:56:26 +0000 Subject: * win/nmakehlp.c: Use '.\nul' as the sourcefile name instead of 'nul' so VC 5.2 doesn't try searching the path for it and failing with a possible dialogbox popping up about having to add a CD to an empty drive. Also added a SetErrorMode() call to disable any dialogs. [Bug 885537] --- win/nmakehlp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/win/nmakehlp.c b/win/nmakehlp.c index c6b5a5a..eee6b75 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -9,7 +9,7 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * ---------------------------------------------------------------------------- - * RCS: @(#) $Id: nmakehlp.c,v 1.4 2003/12/23 03:58:58 davygrvy Exp $ + * RCS: @(#) $Id: nmakehlp.c,v 1.5 2004/01/28 00:56:26 davygrvy Exp $ * ---------------------------------------------------------------------------- */ #include @@ -43,6 +43,9 @@ main (int argc, char *argv[]) DWORD dwWritten; int chars; + /* make sure children (cl.exe and link.exe) are kept quiet. */ + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + if (argc > 1 && *argv[1] == '-') { switch (*(argv[1]+1)) { case 'c': @@ -137,7 +140,7 @@ CheckForCompilerFeature (const char *option) /* append our option for testing */ strcat(cmdline, option); /* filename to compile, which exists, but is nothing and empty. */ - strcat(cmdline, " nul"); + strcat(cmdline, " .\nul"); ok = CreateProcess( NULL, /* Module name. */ @@ -232,7 +235,7 @@ CheckForLinkerFeature (const char *option) /* append our option for testing */ strcat(cmdline, option); /* filename to compile, which exists, but is nothing and empty. */ -// strcat(cmdline, " nul"); +// strcat(cmdline, " .\nul"); ok = CreateProcess( NULL, /* Module name. */ -- cgit v0.12