#include <crt0.h> int _crt0_startup_flags = ...;
This variable can be used to determine what the startup code will (or will not) do when the program begins. This can be used to tailor the startup environment to a particular program.
_CRT0_FLAG_PRESERVE_UPPER_CASE
argv[0]
is left in whatever case it was. If not set, all
characters are mapped to lower case. Note that if the argv0
field in the stubinfo structure is present, the case of that part
of argv[0]
is not affected.
_CRT0_FLAG_USE_DOS_SLASHES
argv[0]
. If
not set, all reverse slashes are replaced with unix-style slashes.
_CRT0_FLAG_DROP_EXE_SUFFIX
argv[0]
. If not set, the suffix remains.
_CRT0_FLAG_DROP_DRIVE_SPECIFIER
argv[0]
(if present). If not set, the drive
specifier remains.
_CRT0_FLAG_DISALLOW_RESPONSE_FILES
_CRT0_FLAG_KEEP_QUOTES
argv[]
elements when processing command lines passed
by DOS and via system
. This is used by the redir
program,
and should only be needed if you want to get the original command line
exactly as it was passed by the caller.
_CRT0_FLAG_FILL_SBRK_MEMORY
sbrk
'd memory with a constant value. If not, memory
gets whatever happens to have been in there, which breaks some
applications.
_CRT0_FLAG_FILL_DEADBEEF
0xdeadbeef
, else fill with zero.
This is especially useful for debugging uninitialized memory problems.
_CRT0_FLAG_NEARPTR
_CRT0_FLAG_NULLOK
_CRT0_FLAG_NMI_SIGNAL
_CRT0_FLAG_NO_LFN
LFN
.
_CRT0_FLAG_NONMOVE_SBRK
sbrk
algorithm uses multiple DPMI memory blocks which
makes sure the base of CS/DS/SS does not change. This may cause
problems with sbrk(0)
values and programs with other assumptions
about sbrk
behavior. This flag is useful with near pointers,
since a constant pointer to DOS/Video memory can be computed without
needing to reload it after any routine which might call sbrk
.
_CRT0_FLAG_UNIX_SBRK
sbrk
algorithm resizes memory blocks so that the
layout of memory is set up to be the most compatible with Unix
sbrk
expectations. This mode should not be used with hardware
interrupts, near pointers, and may cause problems with QDPMI virtual
memory. On NT, this is the recommended algorithm.
If your program requires a specific sbrk
behavior, you
should set either this or the previous flag, since the default may
change in different libc releases.
_CRT0_FLAG_LOCK_MEMORY
sbrk
'ed, so the locking may fail. This bit may be set or cleared
during execution. When sbrk
uses multiple memory zones, it can be
difficult to lock all memory since the memory block size and location is
impossible to determine.
_CRT0_FLAG_PRESERVE_FILENAME_CASE
getcwd
, _fixpath
and others. Note that when this flag is
set, ALL filenames on MSDOS systems will appear in upper-case, which is
both ugly and will break many Unix-born programs. Use only if you know
exactly what you are doing!
This flag overrides the value of the environment variable `FNCASE',
See section _preserve_fncase.
not ANSI, not POSIX
Go to the first, previous, next, last section, table of contents.