Mail Archives: djgpp/1997/01/05/10:54:43
On Sun, 5 Jan 1997, Murray Stokely wrote:
> the info entry for this says something like it expands the wildcards
> for you? So does this mean I can safely declare an empty
> __crt_setup_arguments and still use command line args (as long as i
> don't rely on wildcards)?
No, if you want to disable wildcard expansion, you need to define a
function called `__crt0_glob_function' which always returns a null
pointer. Defining an empty `__crt0_setup_arguments' will have a different
effect: you get `argc' and `argv' as passed to you by DOS. Programs which
are linked against an empty `__crt0_setup_arguments' cannot be reliably
invoked from other DJGPP programs, because DJGPP uses special tricks to
pass command line longer than 126 characters to subsidiary DJGPP programs,
and all those tricks are implemented inside `__crt0_setup_arguments'.
If you are sure your program will *never* be spawned by another DJGPP
program, you can define an empty function. See the library reference for
details.
Frankly, I think that the above complications make this method dangerous
in the long run and I don't recommend it. Are you really that annoyed by
the extra 18KB of these functions? If you are, just use DJP exe packer to
compress your programs. The real intent of letting you override those
functions is not to disable them, but to define custom startup code when
you need that. Typically, such customized functions do everything the
standard versions do, and then some.
- Raw text -