Mail Archives: cygwin/1999/11/02/16:48:18
<banders AT ec DOT rockwell DOT com> 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:
<install_root>/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 <install_root>\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 <stdio.h>
#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
- Raw text -