Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199911022147.PAA16264@mercury.xraylith.wisc.edu> To: banders AT ec DOT rockwell DOT com cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: command line globbing In-Reply-To: Your message of "Tue, 02 Nov 1999 21:34:47 GMT." Date: Tue, 02 Nov 1999 15:47:26 -0600 From: Mumit Khan writes: > I am trying to get shmsdos from netscape's win32 tools to work with > mingw32. > It seems that globbing is enabled by default in mingw32. Is there a way to > turn it off. > I understand there is a way to do it for cygwin, with a variable, but have > not seen how it > would be done for mingw32. > It's quite easy to turn off globbing for Mingw32. There are two ways, both of which are trivial: 1. Add the following object file to your link list: /i386-mingw32/lib/CRT_noglob.o Where install_root is where you installed Mingw32 (eg., c:\gcc-2.95). You can of course always just copy the file to your directory and then you can omit the long path. C:\> gcc -o foo foo.o \i386-mingw32\lib\CRT_noglob.o 2. Define a variable _CRT_glob and initialize it to 0 at file scope in any of your source modules. /* file/global scope. */ int _CRT_glob = 0; /* rest of file. */ eg., try the following example: /* glob-test.c */ #include #if GLOB_ON int _CRT_glob = 1; #else int _CRT_glob = 0; #endif int main (int argc, char *argv[]) { int i; for (i = 1; i < argc; i++) { printf ("%d: %s\n", i, argv[i]); } return 0; } To turn globbing on: C:\> gcc -DGLOB_ON=1 -o glob-on.exe glob-test.c To turn it off: C:\> gcc -DGLOB_ON=0 -o glob-off.exe glob-test.c Test it: C:\> glob-on * C:\> glob-off * Regards, Mumit -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com