This is ../../../info/kb.info, produced by makeinfo version 4.6 from
kb.txi.


File: kb.info,  Node: Top,  Prev: (dir),  Up: (dir)

The DJGPP Knowledge Base

This document is a place to store random bits of information about
DJGPP and how to use it efficiently.

Copyright (C) 1995,1996,1997,1998,1999,2001,2002 DJ Delorie

* Menu:

* Introduction::

* What Changed::        List of changes made to each release.

* Known Bugs::		List of things that we know are broken,
			but either we haven't fixed them yet
			or we haven't come up with a suitable
			solution.

* Known Anti-Bugs::	Things that some people might think are
			bugs, but are done that way on purpose.

* Hidden Features::	Things that are in djgpp but aren't
			intended for the casual user.

* Development::         Miscellaneous information on the
                        development of DJGPP itself.

* Index::


File: kb.info,  Node: Introduction,  Next: What Changed,  Up: Top

Introduction
************

This is the intro.


File: kb.info,  Node: What Changed,  Next: Known Bugs,  Prev: Introduction,  Up: Top

What Changed
************

* Menu:


* Changes in 2.01::		DJGPP 2.01
* Changes in 2.02::		DJGPP 2.02
* Changes in 2.03::		DJGPP 2.03
* Changes in 2.04::		DJGPP 2.04


File: kb.info,  Node: Changes in 2.01,  Next: Changes in 2.02,  Up: What Changed

Changes in 2.01
===============

Here is a list of changes from DJGPP V2.00 to V2.01

`dxeload()' now checks for `malloc' returning NULL.

`gxx' by default also links `libstdc++.a'.

`info/dir.txi' now has full file names for binutils, bison, and find.

`include/dir.h' now packs `struct ffblk' in such a way that g++ 2.7.2
works correctly.  Note that gcc 2.7.2.1 does not require this change.

`SIGINT' is now in the ANSI section of `signal.h'

`glob()' returns GLOB_NOSPACE when `malloc' fails.

`echo' now accepts `-s' to put one argument per line, instead of all on
one line.

`_dos_ds' now has a limit of 4Gb instead of 16Mb.

`_is_exec' (and thus `access') check suffixes independent of case, so
`.com' and `.bat' files are executable.

Documentation for `getopt' has been added.

`doscan' returns -1 when it should (and other doscan fixes).

`sigaction' works correctly.

`stat' works correctly when _STAT_EXEC_MAGIC is set but _STAT_EXE_EXT
is not.

The example in the `movedata' documention correctly lists `_my_ds()'
now.

`fsbd' and `edebug' shouldn't crash on long C++ symbols.

`stat' returns the correct number of links to a directory.

`fsdb' doesn't crash with multiple directories of source files.

Command line arguments are not wildcard-expanded if they were passed
through `spawn*()' or `exec*()'

`stdprn' and `stdaux' work correctly now.

Documentation for `dosmemput' fixed.

`popen' and `system' no longer leak file descriptors.

`bdosptr' macro in `dos.h' is now protected better.

`system' now flushes stdout and stderr (output used to get mixed up).

`inp', `inpw', `outp', `outpw' added to `pc.h'.

`_go32_dpmi_free_real_mode_callback' frees the right stack.

Anything in `libm.a' that used `scalbn' won't leak stack (like `ldexp').

Most `stdio.h' routines rewritten for better text file handling.

`exit' won't recurse if a destructor calls `exit'.

`fcntl' supports `sys/fsext.h'.  `open' passes all flags to extensions.

`system' supports redirection and pipes directly.

`stat' bugfixes.

`mntent' supports JAM compressed drives; CDROM bug fixed.

Many fixes to LFN support.

`printf' supports long longs; new support functions in libc also.

`go32-v2' works in more cases.

`djasm' supports more opcodes and modes.

`stubify' doesn't crash as often; runs faster.

`ScreenGetChar' added to `pc.h'

`va_start' works if the last argument is not int-sized.

New function `_fargetsel()'.

`echo.exe' handles invalid options correctly now.

Some `fsdb' bugs fixed

`glob' handles `...' better now.

`ioctl' and `sys/ioctl.h' added (no unix functionality yet)

`termios.h' functionality added.

`write' no longer mallocs a buffer; it writes to the transfer buffer
directly.

`getrusage' added.

`readdir' will return "." and ".." even for root directories.


File: kb.info,  Node: Changes in 2.02,  Next: Changes in 2.03,  Prev: Changes in 2.01,  Up: What Changed

Changes in 2.02
===============

Here is a list of changes from DJGPP V2.01 to V2.02

`tests/libclink' no longer looks for DJGPP V1.

`emu387.dxe' has been rebuilt to reflect fpatan fixes.

`mcount.c' no longer writes to the mono monitor.  This had caused seg
faults when profiling.

You can now "symlink" to files with 8 character base names (like
12345678.exe).  Previously, `stub.asm' assumed al was zero when it
wasn't always that way.

`rawclock()' now actually returns the number of ticks since midnight,
not since program start.

`libc.tex' now uses "Master Index" instead of "Index" due to conflicts
with the node for `index'.

`srand()' is now documented.

`memchr()' is now 8-bit clean.

Documentation for `delay()' includes the header file.

`__dpmi_simulate_real_mode_procedure_iret()' is now properly documented
as DPMI call 0x0302.

`edebug' now unassembles `scasb' correctly.

Documentation for `qsort()' has correct prototypes in the examples.

`info/dir.txi' includes an entry for the FAQ.

Functions in `conio.h' now support DOS/V's virtual screens.

`edebug' and other debuggers using the common debugging framework will
properly close files when they terminate the debuggee.  This allows to
restart the debuggee without losing handles.

`fnsplit()' now handles files like .emacs properly.

`glob()' now handles files like .emacs properly.  This will fix
wildcard expansion on new programs.

`go32-v2.exe' properly reverts the interrupt table before running the
child process.

`_lfn_gen_short_name' no longer crashes in rare cases.

`s[f]_ceil' and `s[f]_floor' functions in `libm.a' no longer crash when
emulated.

`_fixpath' and `readdir' support multibyte file names.

You may now `set 387=y' to avoid the auto-detection.

`opendir("/")' works.

`rename("x", "x/y")' will now fail when "x" is a directory.

`sigprocmask' and `sigpending' actually do something now.  All of the
POSIX signal functions are now documented.

`_truename' didn't use `putpath' and therefore didn't support the
`/dev/' style of standard devices.  `stat' also failed on devices in
some cases.  We think this is the cause of `bash' failing on
redirection to `/dev/null'.

Documentation for FSEXT-enabled functions now mentions that they are
FSEXT-enabled, and how to avoid that.

Documentation for `bioscom' now documents (and uses) the `port'
parameter.

`ffs()' returns the correct value.

Various fixes and optimizations to `_use_lfn()'.

Return codes of `lock()' and `unlock()' are correct.

Added `memicmp()'

`tmpfile()' always opens the temp file in binary mode.

New `statfs' returns the actual size of a CD-ROM instead of the default
returned by MSCDEX.

`gxx' won't try to link extra libraries if you specify `-c' or `-S' on
the command line.

`_dos_findfirst()' takes a `const char *' instead of `char *'.

`rename()' handles extra error codes some network redirectors return.

`ctime' handles dumped emacs and DOS-style `$TZDIR'.

`pathconf()' returns actual values for NAME_MAX and PATH_MAX, rather
than defaults.  Therefore, it can be used to detect whether a given disk
supports long file names.

The return values for `_go32_dpmi_lock_data' and `_go32_dpmi_lock_code'
are now documented.

The initial stack is aligned to an 8-byte boundary.

`getkey' and `getxkey' allow you to do `ALT-keypad-224'.

`popen' selects temporary files correctly now.

`pclose' returns the status of the program it read from.

`stubedit' won't let you set a transfer buffer bigger than 63k.  If the
stub detects a zero there, it assumes 63k.

The stub now returns error codes in the 100..110 range when it has a
startup failure.

`system' works if `$COMSPEC' isn't set.

`struct lconv' includes `mon_thousands_sep'.

`scanf' works with long double formats like `%LG'.

`_osmajor' and `_osminor' are now set at startup.

`write()' now calls FSEXT for "text" files.

`assert.h' causes no more warnings with some gcc options.

`access()' now thinks devices are read/write, instead of read-only,
regardless of what the device actually supports.

New function `stackavail()' in `stdlib.h'

`echo', `split' and `merge' are now called `djecho', `djsplit' and
`djmerge' to avoid clashes with GNU's `echo', `split' and `merge'
programs.

`tzname[]' bug fixed; `tzname' no longer a function stub (!)

More `djasm' improvements.

Added `_v2_prog_type' to `sys/system.h' and extended `symlink' with it.

`fread' and `fwrite' are documented as returning less than the
requested size, rather than -1 on error, since they never return
negative values.

`stub' forcefully closes file descriptors 18 and 19, so that the stub
and the DPMI server have enough handles to open the swap file and read
the COFF information of the DJGPP executable.

Minor fixes to `popen''s list of pending commands.

`tempnam' returns allocated memory, not a pointer to static space, and
does not ignore its arguments TMPDIR and PREFIX anymore.

`difftime' can return negative numbers now.

`gethostname' removes trailing spaces now.

`insque' works with empty lists now.

`sync' also calls `_flush_disk_cache()'.

`printf' flushes stdout every time, unless it is redirected to a file,
to reduce programmer confusion.  Note that `fprintf' and `vprintf'
don't do this.

`exit' calls destructors *before* it closes all open files.

The code that reads blocks of data for FILE* streams has a new "slow
start" algorithm that's designed to adjust the read size for both
programs that seek a lot reading small amounts of data, and programs
that don't seek but read lots of data.

`mktime' handles the DST change hour gracefully

`enable' and `disable' don't use DPMI (sti/cli are less buggy!)

The command line parser can handle response files generated by `find
-print0'.

`malloc' and `free' have been replaced by a more efficient (and not
BSD) algorithm.  The source archive still contains `bsdmallo.c' and a
new even faster (but more wasteful) version in `fmalloc.c'.

`getmntent' better supports Windows NT and doesn't cause DOS to return
stale data when the disk is changed.  Removable media such as JAZ
drives are no longer reported when the drive is empty.  Disks written by
Windows 9X are no longer reported with bogus names taken from LFN
directory entries (which have their volume label attribute bit set).

File names which begin with `/dev/' or `x:/dev/' (where `x:' is any
drive letter) are treated specially by all file-oriented library
functions.  `/dev/tty' is converted to `con' and `/dev/null' is
converted to `nul', to make porting of Unix programs easier.  Other
names get the drive letter and the `/dev/' prefix removed, so e.g.
`d:/dev/lpt1' is converted to `lpt1'.  This is because DOS handles
device names inconsistently unless they are devoid of the `x:/dev/'
prefix.  File names of the form `/dev/x/foo' are converted to `x:/foo';
this allows to use Unix-style path names which always begin with a
forward slash.

The startup code now masks *all* numeric exceptions when a
floating-point hardware is present.  This means that illegal operations
like `sqrt(-1)' will now return `NaN' (Not-a-number) rather than raise
the `SIGFPE' signal.

`fstat' is now more reliable when called from programs under a
debugger, does not report bogus results on NT, reports files on the A:
drive correctly, and correctly reports the write access bit on
Windows9X.

`stat' is now more reliable on NT and with character devices.

`djgpp.env' is read before command line arguments are expanded, so that
they'll honor the `LFN' setting in `djgpp.env'.

The `sys_siglist[]' array is now available with the names of all the
signals, and the function `psignal' can be used to print messages which
include the signal names.

The new functions `basename' and `dirname' can be used to extract
directory and basename parts from file names.

`_my_ds', `_my_cs' and `_my_ss' work for selectors with the high bit
set.

The new function `_creatnew' creates a file only if it didn't already
exist.

`tmpfile' makes sure it opens a file which is not and will not be used
by any other program.  It does so by repeatedly calling `tmpnam' until
`_creatnew' succeeds to create a file which didn't exist before.  The
temporary file is opened in DENY_ALL mode, so that no other process can
neither read from nor write to it.  In case of a failure, `tmpfile'
does not leak memory anymore.

Previously, there was a small probability that a call to `open' with
the `O_CREAT' and `O_EXCL' bits set would succeed even though the named
file already existed (created by another process).  This window is now
closed.

`mkstemp' now makes sure the file it creates is unique even if other
processes can create files in the same directory, and opens the file in
DENY_ALL mode.

`__FSEXT_alloc_fd' now duplicates the initial file handle instead of
reopening the NUL device on each call.  Thus, it is no longer limited
by the value of the `FILES=' parameter on your `CONFIG.SYS', but can
allocate up to 254 handles (which is the maximum number allowed by DOS).

`rename' will properly fail if the file doesn't exist.

`system' is now compliant with ANSI C Standard when its argument is a
NULL pointer.

Previously, at program startup `errno' would retain whatever value it
was assigned by the DJGPP startup code.  ANSI C Standard requires
`errno' to be zero at the beginning of `main', so it is now reset to
zero before calling `main'.

The stack dump printed when a program is aborted or crashes was
improved.  First, it is no longer limited to 10 stack frames.  When the
standard error stream is connected to the console, the maximum number of
frames is computed so that the stack dump will use all the available
screen area, without scrolling off the visible part.  For example, at
50-line display, you can have as much as 36 stack frames printed and
still see the registers and selectors dump, and the exception mnemonic
that precede it.

When stderr is not the console, the number of printed stack frames is
only limited by the stack size of the running program.

In addition, the top and bottom of both the application code stack and
the locked stack used for processing exceptions, are printed.  This
makes detection of stack overflows and other stack-related atrocities
much easier.

The `_doserrno' global variable is now provided.  Whenever a DOS call
fails, this variable gets assigned the value of the error code returned
by the failed DOS function.

The header `sys/dxe.h' now works with C++.

`fflush' now conforms to ANSI C standard when called with a `NULL'
argument.

`__dpmi_yield' doesn't wedge the DOS box on some versions of Windows 9X
anymore.

`outports*' takes a const buffer

`glob' will initalize `*pglob' when appropriate.

The conversion functions `ecvtbuf', `ecvt', `fcvtbuf', `fcvt', and
`gcvt' are now provided.

The startup code now recognizes an additional flag
_CRT0_FLAG_KEEP_QUOTES, which forces it to retain quote characters in
command-line arguments.

`redir' invokes the subsidiary program in a way that preserves the
command-line expansion.  Thus, you can now use `redir' to invoke
programs whose command lines include quote characters and file name
wildcards, and they will work as expected.

Also, `redir' no longer crashes if the subsidiary program was
interrupted or crashed, and reports the run time with millisecond
resolution.

The exit code now makes sure the timer interrupt is left pointing to its
original handler, even if the program is aborted, or exits without
disabling timers.  `__djgpp_exception_toggle' now toggles the timer
interrupt handler as well, if it was hooked by SIGALRM/SIGPROF handler
or by `setitimer'.  Thus, timers, periodic alarms, and profiling will
be disabled inside blocks that call `__djgpp_exception_toggle'.

The functions of the `printf' family now always print a negative sign
for a negative floating-point argument, even when the conversion
generated no significant digits (i.e. only zeros are printed), if the
format specifier requests an explicit sign, like in "%+f".  A special
NaN value will also be printed with a sign in these cases (e.g. try
printing `-nanf()').

`select' now correctly zeroes out all the bits in the `fd_set'
arguments when it returns due to expired timeout.

`readdir' now includes hidden files and directories in the search by
default.  The `__OPENDIR_FIND_HIDDEN' bit of the `__opendir_flags'
variable has no effect, and a new `__OPENDIR_NO_HIDDEN' bit is provided
to exclude hidden files/directories from the search.

`opendir', `closedir' and `rewinddir' don't lose search handles anymore
when long file names are supported.  `rewinddir' and `seekdir' will not
miss the (possibly faked) `.' and `..' entries in root directories.

Asynchronous signals (`SIGINT', `SIGQUIT', `SIGALRM' and `SIGPROF') no
longer crash programs running on Windows when the signal happens inside
the `__dpmi_int' function (`__dpmi_int' is called by every library
function that requires DOS or BIOS services).  We believe this problem
caused crashes in multi-threading packages that used timers and
`SIGALRM' to switch threads.


File: kb.info,  Node: Changes in 2.03,  Next: Changes in 2.04,  Prev: Changes in 2.02,  Up: What Changed

Changes in 2.03
===============

Here is a list of changes from DJGPP V2.02 to V2.03

Bugs in the `itimer' functions are fixed.  In particular:

   - profiling (which was broken in v2.02) now works;

   - the timers are now more accurate for small (100ms or less)
     intervals;

   - large values of the `tv_usec' member in `itimerval' structure
     don't cause internal calculations in `setitimer' to overflow;

   - `getitimer' now returns correct info in the `tv_usec' member;

   - the timers and the `alarm' function work correctly when the calling
     program invokes the `uclock' library function before setting a
     timer.

`localtime', `ctime' and `mktime' now notice changes in the value of
the `TZ' environment variable during the program run, and adjust their
computation accordingly.  They also don't fail for the first date after
the epoch.  `mktime' now avoids looping for preposterously long time
when passed very large values in the members of `struct tm'.

When passed an empty string as the file name, `stat' now fails and sets
`errno' to `ENOENT', instead of returning information about the current
directory.  Also, `stat' no longer reports invalid time stamps for root
directories of floppy disks that were written on Windows 9X or Windows
NT.

The startup code now correctly sets up the keys that generate `SIGINT'
and `SIGQUIT' signals on PC98 machines.

`putc' and `fputc' no longer return -1 when they write the value
`(signed char)0xff' to a file.

The header `wctype.h' from v2.02 caused pre-processor errors, and could
not be included _before_ `ctype.h'.  This is now fixed.

Functions of the `printf' family no longer cause the calling program to
crash when passed `long double' variables with invalid bit patterns
(the so-called "unnormal" numbers).  Such arguments are now printed as
`Unnormal'.

`srand' now documented as returning a void.

`rand48' and friends are now in libc.

Many fixes to calls to `tolower'/`toupper' with signed chars.

The rmcb stub doesn't restore the flags so that you can return
different ones.

Doc fixes for ansi/posix portability.

Handle error conditions in `bin2h'.

`tests/libclink/check.cc' - remove duplicates.

Remove unneeded includes from `rand.c'.

Call `system' properly in termios (Ctrl-Z).

Work around a gcc 2.8.1 bug in emu387.

Linking with -lemu should obviate the need for emu387.dxe.

The "Hidden Features" chapter of the Knowledge Base now actually
describes most of the special features provided by DJGPP.

`redir' no longer fails to run programs when the program name is a
substring of the redirected I/O file(s).

`glob' correctly converts the letter-case of the file names when the
pattern include mixed upper- and lower-case letters.  In particular,
the letter-case of the command-line arguments expanded by the startup
code in the `argv[]' array is now correct in these cases.

`textcolor' and `textbackground' now support the 16 background colors
mode (e.g., after a call to `intensevideo').  Previously,
`textbackground' would ignore the high intensity color bit in its
argument, and `textcolor' would clobber that bit sometimes.

A call to `lowvideo' doesn't clobber the background color anymore.

The global variable `ScreenAttrib' now always matches the value of the
`attribute' member of the `text_info' struct returned by `gettexinfo'.

If the last character of a response file is `^Z', it is now ignored.
Previous versions would pass it to the `main' function.  Use two `^Z'
characters in a row if you actually need to pass such a character as
part of the last element of the `argv[]' array.

`fputs' now returns `EOF' when called on an unbuffered stream, and
there's some error (such as `ENOSPC') in writing to that stream.

If both arguments of `_rename' and `rename' refer to the same file,
they no longer remove that file.

Functions of the `scanf' family no longer crash or work incorrectly
when passed format specifiers with upper-case letters, such as `%lX' or
`%E'.  Non-ANSI extensions to the format specifiers and qualifiers,
such as `%lld' and `%U', are now documented and their portability
information included in the library docs.

The function `__crt0_load_environment_file' called by the startup code
now strips trailing blanks and TABs from the `[program]' lines of the
`DJGPP.ENV' file which define sections for individual programs.  This
is so editing `DJGPP.ENV' with some losing editors that don't strip
trailing whitespace when saving the file doesn't prevent the startup
code from recognizing section names.

`dtou' and `utod' no longer overwrite the stack when invoked on file
names longer than 80 characters.

`system' works when its argument uses redirection to/from quoted file
names (e.g., when the file name includes embedded whitespace).

Buffered stdio functions, such as `getc', `putc', `fread', `printf',
and all their relatives pay attention to `termios' settings of the
terminal device and behave accordingly.  For example, you can get
single-character, no-echo input with the following snippet:

      struct termios charmode;
     
      tcgetattr (0, &charmode);
      charmode.c_lflag &= ~(ECHO | ICANON | ISIG);
      tcsetattr (0, &charmode);

If you reset the `ISIG' or `BRKINT' flags in the `termios' structure,
or set the `IGNBRK' flag, `tcsetattr' now disables `SIGINT' generation
by a `Ctrl-<C>' or `Ctrl-<BREAK>' keypress, and generation of `SIGQUIT'
by pressing `Ctrl-<\>'.

A call like `tcflush (0, TCIFLUSH);' now empties the BIOS keyboard
buffer in addition to the internal buffer maintained by the `termios'
input processing.  This is compatible with the Unix specification that
`tcflush' should "discard all data received but not read".

Library function `system' no longer crashes when given invalid command
lines which involve pipe symbols `|'.  Typically, such command lines
should have been run by a Unix-style shell, like Bash.  However,
sometimes, due to some system configuration snafu, the `SHELL' variable
in the environment didn't point to such a shell, and `system' would try
to execute the command line using its internal emulator of
`COMMAND.COM'; it would then crash due to a bug.  This is now solved:
`system' prints appropriate error message(s) and exits with an error
code of -1.  We believe that some of the rarely-reported and
hard-to-reproduce crashes of the Make utility were due to this bug.

Previously, when attempt was made to open a file, and all the available
file handles were exhausted, `open' would sometimes truncate an
existing file on Windows 9X.  This is now fixed.

All DJGPP programs now clear the FPU exceptions when they exit.  This
prevents the next DJGPP program that is run in the same DOS box on
Windows 9X from crashing during startup code.

When the `387' environment variable overrides the FPU auto-detect code,
the value of the global variable `_8087' is now set by the startup code
according to the environment override: 3 if `387' is set to `y', 0
otherwise.

You can use the special `/dev/env/foo/' construct in file names to
expand it into the value of the environment variable `foo' at run time.
`/dev/env/foo~bar~' will expand to `bar' if `foo' is undefined, or if
its value is empty.

Calling `getch' and `getche' flushes the `stdout' and `stderr' streams,
if they are connected to the console and have any pending buffered
characters.

A bug in the library caused programs like Emacs, which dump their data
and then restart, to use stale `FILE' objects created before they were
dumped.  This caused warning messages to be issued by GDB near the end
of debugging session.  This bug is now fixed.

Due to a peculiarity of the timer device virtualization, the values
returned by `uclock' on Windows during the first 54.9msec after the
first call (which reprograms the timer chip) were erratic, some of them
negative, some positive.  To work around this, the first call to
`uclock' on Windows now waits until the next timer tick before
returning, to ensure that all the values returned hence are
monotonously increasing.

The termios emulation now uses raw input/output only if the file handle
referring to a device is put into binary mode, and the device itself is
in raw mode.

The termios input routines no longer generate the `SIGINT' and
`SIGQUIT' signals twice when `Ctrl-<C>' or `Ctrl-<\>' are pressed.

A call to `__djgpp_set_ctrl_c' with a negative argument returns the
current state of `SIGINT' and `SIGQUIT' generation without altering it.

The `termios' cooked-mode output now expands TABs into the appropriate
number of spaces when writing to the console device.

The `setmode' function now switches character devices to raw/cooked
mode even when `termios' functions are used.

`freopen' now correctly sets the read/write access flags when `+' is
the last (third) character of the MODE string, like in `wt+' or `ab+'.

Previously, `searchpath' would always return its argument unchanged and
signal a success, when the argument included slashes or a drive letter,
even if the file didn't actually exist.  This is now fixed:
non-existent files always cause `searchpath' to return a `NULL' pointer.

The DJGPP debug support functions in `libdbg.a' now have the capability
to debug programs that catch signals such as `SIGINT'.  The signal
interrupts the debuggee and is reported by the debugger, instead of
aborting the debuggee.  You can also deliver signals to the debuggee,
even if they didn't actually happen.  Most of the work that made this
possible was done by Pierre Muller <muller@cerbere.u-strasbg.fr> and
Andris Pavenis <pavenis@lanet.lv>.

The debugging support functions in `libdbg.a' now correctly handle the
`SIGQUIT' signal that happens while the debuggee runs.  Previously, a
debugger would crash or report `SIGINT' in such cases.

The DJGPP functions in `libdbg.a' support FP code much better now,
especially when FP exceptions happen in the debugged program.  The full
state of the numeric processor is saved and restored when the execution
thread jumps from the debugger to the debuggee and back.

It is now possible to debug programs that redirect their standard
handles, without the debugger losing those handles at the same time.
Debuggers which want to use this feature need to call the new `redir_*'
functions before and after jumping to the debuggee's code.  *Note
Redirection in the debugger: (libc)redir_debug_init.

The documentation for the debug support functions in `libdbg.a' is now
part of the library reference.

When a raw COFF image (i.e., without a stub) is debugged, its stack
length and the size of transfer buffer are now taken from the values
used by the debugger.  This means that you can have predictable results
by stubediting the debugger's executable.

`__dpmi_simulate_real_mode_procedure_retf_stack' no longer fills part
of the real-mode stack with garbage.  The parameters specification was
changed so that the second argument is now the number of 16-bit words
to copy to the real-mode stack, like the DPMI spec requires.

The floating-point emulator software had a bug in emulation of
subtraction, addition, and comparison instructions, whereby the results
produced for some rare pairs of numbers with the same exponent but
different mantissa were grossly incorrect.  This is now fixed.  This
bug was known to cause all kinds of weird failures, like incorrect
values produced by functions `sin' and `cos', programs being trapped
inside infinite loops when they called `acos', etc.

The FP emulation library `libemu.a' omitted the specially-compiled FPU
setup module `npxsetup.o' which arranges for floating-point
instructions to call functions from `libemu.a'.  This caused programs
linked with `-lemu' to require the dynamically-loaded emulator,
`emu387.dxe', even though the emulation code was linked into the
program.  This bug is now fixed.

`rename' now sets `errno' to `EACCES' when an attempt is made to rename
an open file.  Previously, `errno' was set to `ENOENT' in these cases.

Library functions that process strings and file names, such as
`strupr', `stricmp', `strtol', `fnmatch', and the functions from
`printf' and `scanf' families, handle 8-bit characters correctly when
they call `ctype' character-classification functions internally.

New versions of mathematical functions, written by Eric Rudd
<rudd@cyberoptics.com>, are now included in the standard C library,
`libc.a'.  The new versions are ANSI-compatible (they set `errno' in
case of FP errors), yet very fast and accurate.  Programs that require
accurate floating-point computations can now be linked without `-lm',
unless they need the `matherr' call-back or compliance to standards
like X/Open or SVID.

New math functions are provided: `powi', `cbrt', `expm1', `exp2',
`exp10', and `sincos'.

If the format specifier for a floating-point number includes the `+'
flag (meaning that the sign should be printed even if the number is
positive), the functions of the `printf' family will now print the
negative zero, `-0.0', with an explicit negative sign.

`access' no longer loses a `FileFind' handle on LFN platforms when
called on a root directory or a character device.

`_check_v2_prog' no longer leaks file descriptors when called on a
corrupt executable by name.

`setitimer' no longer crashes when its second argument is a `NULL'
pointer, it simply returns after setting the third argument to the
value of the last timer set with a previous call to `setitimer'.

`setitimer' now rounds up timer values smaller than the system clock
granularity to that granularity, before it uses the values.  Therefore,
`setitimer' and `getitimer' will return rounded up values for such
small timers.  The global variable `__djgpp_clock_tick_interval' is
provided for changing the granularity used by `setitimer', in case an
application reprograms the timer chip to run with a non-standard
frequency.

`ftruncate' now leaves the file pointer at the same byte position as it
were before the function was called.

Functions of the `scanf' family now correctly stop the scan when they
encounter a digit larger than 7, and either the format specifies octal
conversion, like in `%o', or the format is `%i' and the leading digit
is `0', which implies octal conversion.

Functions of the `scanf' family now use 16 as the base for converting
pointer values read with the `%p' format.  Thus, reading back a pointer
written with the `%p' format now yields the original value.

`kill' now sets `errno' to `ENOSYS' when called with a PID argument
that isn't the caller's PID, since DOS doesn't allow sending signals to
other processes.

The startup code and the linker script file `djgpp.djl' include support
for long section names.  Long section names are required by the latest
versions of GNU Binutils to support automatic template instantiation in
C++ programs.

The `tcgetpgrp' and `tcsetpgrp' are now provided in the library.

`realloc' no longer crashes when the available virtual memory is not
enough to satisfy the reallocation request.

Previously, the `symlink' function would sometimes think that the
source and the target of the link were in the same directory, when in
fact they weren't.  This bug is now fixed.

`djtar' now creates the file `tarchange.lst' only if it actually needs
to rename some of the files during unpacking.  In particular, simply
listing the contents of an archive, as in `djtar foo.tgz', will not
produce an empty `tarchange.lst' file anymore.

The function `memicmp' was omitted from the library in version 2.02.
This is fixed now.

Previously, `fsdb' could not step over function calls when 4 or more
breakpoints were set: it would display an error message saying that
`Exception 3 occurred'.  This is now fixed.  In addition, `fsdb' now
supports the `SIGQUIT' signal, if the program being debugged generates
it.

The floating-point emulation now works on Windows.  Previously, a bug in
the emulation of the WAIT/FWAIT instructions caused the emulator to get
stuck in an endless loop on Windows.  (On MS-DOS, these two instructions
don't generate an FP exception, and so don't get into the emulator.)

`redir' no longer crashes when floating-point instructions are emulated.

The emulator setup in the startup code now correctly masks all FP
exceptions in the emulated control word, like the hardware FPU setup
does.  If some numeric exception is unmasked by an application and is
triggered by some abnormal condition in the emulator (e.g., if an
application attempts to compute a square root of a negative number), the
emulation simulates exception 16, the Coprocessor Error exception.
(Previously, the exception number in the DJGPP exception structure was
not set by the emulation, and was left at its old value set by the
Coprocessor Not Present exception generated by the emulated
instruction.  This caused incorrect message to be printed when the
program crashed, and defeated user-defined handlers for `SIGFPE'.)

The emulator now correctly sets the condition code bits `C0', `C1',
`C2', and `C3' when an exceptional condition is raised, and as result
of emulating the `FPREM' and `FPREM1' instructions.

The floating-point emulator software had a bug in emulation of the
`FSQRT' instruction, which could cause the calling program to hang.
This was due to incorrect optimization by the version of GCC used to
produce `djdev202.zip'.  The new version of the emulator works around
this bug by preventing the compiler from performing these incorrect
optimizations.

`fsetpos' no longer returns zero when it fails to move the file
position pointer.

`djtar' now converts `.info-' into `.i' only if the character following
`.info-' is a digit.  `.tar.gz' is converted to `.tgz' only at the end
of a file name.  `++' is converted to `xx' (instead of `plus' in
previous versions), and this conversion is performed for all
occurrences of `++' in a file name (previous versions only converted
the first occurrence).

The `gxx' compiler driver no longer reports an error if the optional
GNU C++ class library `libgpp.a' is not installed.  If `libgpp.a'
cannot be found where `gcc' would look for it, `gxx' does not pass the
`-lgpp' option to the linker.  Also, if the standard C++ library,
`libstdcxx.a', cannot be found, `gxx' now tries `libstdcx.a' and
`libstd~1.a', in case the user has some LFN-related installation
_snafu_.

The FP emulation behaves closer to a real FPU when an FP instruction
produces abnormal results, such as `Inf' or `NaN'.  In particular:

   * Overflow and underflow are now correctly detected in addition,
     subtraction, multiplication and division, and instructions that
     perform these operations internally.  Overflow causes an `Inf' to
     be stored in the results, while underflow usually results in a
     denormal or a zero.

   * Undefined operations, such as division of zero by zero or of `Inf'
     by an `Inf', produce a `NaN'.

   * Emulation of `FST' and `FSTP' instructions avoids overflowing of
     the exponent when it is too large for the destination format; it
     stores an `Inf' or a maximum finite number instead.  Operands that
     are too small for the destination format cause either a denormal
     or a zero to be stored.

   * The emulation of `FXCH' stores a `NaN' when one or both of its
     operands is a `NaN'.

   * The emulation of `FYL2X' always pops the operands from the FPU
     stack, even if one of the operands is invalid (`Inf' or `NaN'), or
     if the operand on top of the stack is negative.  This affects
     functions `acosh' and `asinh'.

   * The emulation of the `FPREM' and `FPREM1' instructions no longer
     hangs the program when the difference of the exponents of the
     operands is larger than 64.  Instead, it correctly implements the
     "partial remainder" algorithm defined by the Intel manuals.  Also,
     the sign of the result of these instructions is now in accordance
     with the Intel manuals (this affects the `ceil' function for small
     negative arguments).

   * The emulation of `FPTAN' now correctly handles the case where its
     operand is out of range.

   * `FPATAN' emulation now uses a better approximation which is
     accurate to 63 bits, even when its argument is near 1.
     (Previously, it would suffer a catastrophic accuracy loss of up to
     13 significant digits for arguments near 1.)  This affects
     functions `atan', `atan2', `asin', and `acos'.

   * The emulation of `FSQRT' behaves correctly for infinite arguments.

   * `FRNDINT' emulation returns a negative zero for negative
     arguments.  This affects the `fmod' function for negative
     arguments.

   * The emulation of `FSCALE' handles overflow correctly.

   * The emulations of `FSINCOS', `FSIN' and `FCOS' return a `NaN' for
     an argument that is a `NaN', and raise an Invalid Operation
     exception for an `Inf' argument; this is what the Intel manuals
     require.  This affects functions `sin', `cos', `sincos', and `tan'.

   * The emulation of instructions `FST' and `FSTP' that store FP
     registers into `float' or `double' variables, now correctly round
     the stored value according to the current rounding mode.
     Previously, the stored value was always chopped (truncated) at the
     last stored bit of the mantissa.

The `wchar_t' data type is changed so that DJGPP now supports 16-bit
wide characters.  This is required for RSXNTDJ programs to be
compatible with Windows implementation of Unicode.

The long file-name (LFN) support is no longer disabled after `_use_lfn'
(or some other library functions that call it) were called with a file
name which refers to an invalid drive or a drive whose media has been
removed (e.g. an empty floppy drive).  `_get_volume_info' now returns
`_FILESYS_UNKNOWN' for such drives.

`symify' no longer crashes when the name of the function or source file
are too long to fit on a single screen line.  It also doesn't overwrite
the address on the next screen line.  Instead, `symify' truncates the
long names to fit on a single screen line.

`tmpfile' no longer gets stuck in an endless loop when all the
available file handles are exhausted.


File: kb.info,  Node: Changes in 2.04,  Prev: Changes in 2.03,  Up: What Changed

Changes in 2.04
===============

Here is a list of changes from DJGPP V2.03 to V2.04.

Ability to report the exact CPU type in `uname'.

The functions `_creat', `_creatnew' and `_open' now set extended size
flag in DOS calls to be able to create files with size up to 2^32-1,
supported on FAT32 volumes.

The function `llseek' added with type `offset_t' to support file seeks
up to 2^32-2.

The function `statfs' have been made to report correct values > 2^31 on
FAT32 partitions.

The function `_invent_inode' has been changed to start numbering
invented inodes from `USHRT_MAX+1' to 2^28+1.

Functions `_is_cdrom_drive', `_is_ram_drive' and `_media_type' has been
taken out of `mntent.c' and made externally callable.

New functions `_get_fat_size', `_get_fs_type' and `_is_fat32' added.

When used together with GCC 2.96 or later, va_list facilities in
`stdarg.h' and `varargs.h' are implemented using new builtins from GCC
2.96.

`fsdb' checks for executables and loads them even if the extension
`.exe' isn't given in the command line.

`div', `ldiv' and `lldiv' return properly signed remainders for
negative arguments.

The function `remove' works around a DOS bug, whereby DOS returns a
"File not found" error for write-protected floppy disks.

The series produced by `rand' have a longer period.

The execution speed of `drand48' and `erand48' has been improved.

`__dpmi_simulate_real_mode_procedure_retf_stack' no longer corrupts the
caller's stack.

`getlogin' now examines the environment variable `USERNAME' to
determine the user's name, in addition to `USER' and `LOGNAME'.

New function `stpncpy' has been added, thanks to Richard E. Stone
<restone@skypoint.com>.

Calling the `setitimer' function with both `it_interval.tv_sec' and
`it_interval.tv_usec' members of `struct itimerval' set to zero no
longer causes the timer to behave as if `it_interval.tv_usec' were set
to the system clock granularity (55msec by default).

UNIX-style symbolic links are fully emulated by library.  As a part of
this, new functions `__internal_readlink', `__solve_symlinks',
`__solve_dir_symlinks', `lchown', `lstat' and `readlink'; new macros
`S_ISLNK' and `S_IFLNK' have been added to library.

`open' now follows symlinks when opening file.  Also, it honors two new
mode flags: `O_NOLINK' and `O_NOFOLLOW'.

As a part of symlink emulation, `symlink' no longer emulates symlinks
to executables by creating stubs.  It creates symlinks to all files
instead.

A subtle bug was corrected in function `process_coff' used by
`syms_init' from `libdbg.a' to read and sort the symbols from a COFF
image.  As a result, the `symify' utility should no longer crash in
rare cases, especially when invoked on large programs.

The linker script `lib/djgpp.djl' corrected to not unnecessarily
pollute the name space with the symbols `etext', `edata' and `end'.
The profiling code was also changed to not pollute the name space with
`etext'.

The `dtou' program accepts new command-line options for verbose
operation, backup file creation, and control of file timestamp
preservation.  Its source can now be compiled on a Unix or GNU/Linux
system.

The protection against multiple redefinitions of various types like
`size_t' has been rewriten to make DJGPP header files compatible with
GCC provided ones.

The `djtar' program can now unpack `.tar.bz2' archives compressed with
the `bzip2' program.

The functions `system' and `spawn*' can invoke Windows programs and
advanced shells, such as `4DOS' and `NDOS', with command lines longer
than 126 characters.  For Windows programs, the command line can be up
to 1015 characters long; `4DOS' and `NDOS' can be passed up to 247
characters.  This is done by defining the `CMDLINE' environment
variable whose value is the command line.  The DJGPP startup code also
supports `CMDLINE' method of passing long command lines, so DJGPP
programs can now be invoked with long command lines from the
`COMMAND.COM''s prompt, and also from other Windows programs which
support `CMDLINE'.  The functions `system' and `spawn*' have also been
enhanced to free DPMI selectors leaked by many DPMI hosts.  This fixes
the problem with large makefiles failing before completion under
Windows.

The functions `rename' and `_rename' can now be used to change the
letter case of a file name, like in this snippet:

      rename ("makefile", "Makefile");

(This only works when the LFN support is available, of course.)

The function `__dosexec_find_on_path' no longer looks for files with
the `.sh', `.ksh', `.pl', and `.sed' extensions before the files
without those extensions.  This is so e.g. `foo' is found _before_
`file.sh' if both of them are present in the same directory.  The
previous code was known to cause Bash to run the wrong script in some
cases.

This change affects all library functions which search for executables
along the `PATH': `system', `popen', `pclose', and the functions from
the `spawn*' family.

The DOS standard extensions `.com', `.exe', `.bat', and `.btm' are
still included in the search _before_ looking for the file name itself,
for compatibility with stock DOS/Windows shells.

The functions `valloc' and `memalign' have been added to the library to
support allocating memory at power-of-2 addresses.

The `djsplit' and `djmerge' utilities now preserve the original file's
time stamp and mode bits.  The `-t' switch to those programs restores
the old behavior, where each file was created with the current time
stamp and default attribute bits.

The low-level function `_put_path' was changed to avoid referencing an
`env' directory in the current working directory when library functions
are passed the `/dev/env' file name.  This avoids creating spurious
`env' directories in any directory where the standard GNU
`mkinstalldirs' script is run.

Functions `rename' and `_rename' work on Windows 2000 when the file
under the new name already exists.  This solves the problems with
linking DJGPP programs and with running the `stubify' utility on that
OS.

The function `lfilelength' added with return type `long long' to
support file sizes of up to 2^63-1.

Texinfo documentation (WIP) for `djasm' has been added.

The dates inserted into the object file by `djasm' now follow ISO
format.

`djasm' now sets the offset of new executable field in the header of
executables to zero (meaning not used).

Allow one to allocate space in `djasm' using `.union' (instead of
`.struct') when using a union.  As there is no checking, `.struct' and
`.union' are interchangeable.  This feature taken from a version of
`djasm' maintained by Bill Currie <bill@taniwha.org>.

The `fcntl' function has been significantly enhanced.  In particular:

   - File locking functions (which were missing in every version up to
     v2.03) now work, with some exceptions relating to the absence of
     any read locking in DOS/Windows 9X environments.

   - These functions now interrogate and use the value of the DOS flag
     `_DEV_NO_INHERIT' to implement the `FD_CLOEXEC' flag;

   - The `F_SETFL' function is still an effective no-op, since
     DOS/Windows does not allow flags to be modified on an open file.
     A small exception is made for `F_SETFL':  You may use `F_SETFL' to
     remove the`O_NONBLOCK' flag, because it is not supported by DJGPP
     anyway, and it does no harm to allow this functionality.

     The `F_GETFL' function now computes the open mode and status flags.
     On Windows NT this cannot report the open mode correctly --
     `O_RDONLY' is always returned.

   - Documentation has been updated to reflect the new functionality and
     test programs have been provided for most new or changed functions.

`flock' has been implemented using the new `fcntl' locking functions to
implement file-level locking and unlocking.  `lockf' (31-bit support)
and `llockf' (FAT32 support, 32-bit only) have been added as compatible
interfaces to the new `fcntl' locking functions.

New function `dostrerr' has been coded to provide string values for the
error codes returned from function `dosexterr'.  Documentation and a
test program have been provided.  This function is an analogue of the
`strerror' function for errno values, and is intended to be used when
coding functions or programs that call DOS and want to print messages
when errors occur.

New functions `_dos_lk64' and `_dos_unlk64' have been added to provide
a FAT32-compatible interface to the DOS locking code.  Compatible
functions `lock64' and `unlock64' are direct interfaces to these two
new `_dos_*' functions.

Support for enumeration type added to `djasm'.  This feature taken from
a version of `djasm' maintained by Bill Currie <bill@taniwha.org>.

Header files, which are part of the new ANSI/ISO C99 Standard, are now
available.  These include `stdint.h'.

When used in C++ programs, the standard C header files now make their
contents visible in namespace `std' as well as in the global namespace.

`setjmp' is now a macro as well as a function.  This is required by the
C++ standard, and also recommended by the C standard.

`_get_dos_version' now recognises OEM number `0xfd' as FreeDOS.

Functions which convert numeric strings to the corresponding integer
values no longer return non-zero values for strings which begin with
8-bit characters.

`open' now honors `O_TEMPORARY'.  A file opened with `O_TEMPORARY' will
be deleted when all file descriptors that refer to it are closed.

The functions `_rename' (and `rename' which calls it) and `mkdir' no
longer fail on Windows ME when long file names support is disabled.
This solves the problem with failures to link programs if the `LFN'
variable is set to `n' because `stubify.exe' failed to rename the
produced executable and reported `EINVAL'.

When `write' and `_write' detect that a file pointer is past EOF, that
space will now be filled with zeroes to increase POSIX compliance and
plug a security hole on disks containing sensitive information.

If a tar archive contains DOS batch files that have been stored with
UNIX-style LF-only EOLs, `djtar' will now convert them automatically to
DOS-style EOLs.  This is because `COMMAND.COM' refuses to run batch
files that contain UNIX-style EOLs.

The function `pipe' is now implemented in the library.

`.com' programs are now invoked by the `spawn*' family of functions
directly, thus making their exit status available to the parent DJGPP
program.  Previously, when long file names were supported, `.com'
programs were invoked through `COMMAND.COM', which would lose the exit
status.

File handles connected to the console device are no longer reported by
the `select' function as not ready for input when termios functions are
used to read those handles in cooked mode.

New functions `snprintf' and `vsnprintf' added.

The double-precision shift instructions `shld' and `shrd' are removed
from `djasm' because they violate the established convention of using
the `b', `w', or `d' mnemonic suffix to specify the memory operand
size.  (The result is that they use up two mnemonics that should have
been reserved for the basic shift/rotate instructions.)

Completed the support in `djasm' for the byte/word/double shift/rotate
instructions.  This feature taken from a version of `djasm' maintained
by Bill Currie <bill@taniwha.org>.

The functions `fopen' and `freopen' improved to handle the append mode
properly.  The functions `fputc', `fprintf', `fwrite' and `write'
always seek to end of file if the file has been opened in append mode.
Type of `__file_handle_modes' extended to be able to hold the
`O_APPEND' flag.

Due to the improved append mode implementation, the functions `fopen',
`fflush', `_flsbuf', `fopen', and `freopen' no longer use the
`_IOAPPEND' flag.  And since the flag is no longer used, the
`_IOAPPEND' flag has been deleted from `libc/file.h'.

When the first character in the valid options string is a colon `:',
`getopt' will now return a colon when a missing option argument is
detected and will not print error messages even when `opterr' is
non-zero.

The function `readdir' now includes the file's type in the `d_type'
member of `struct dirent' it returns.  This member is used by some GNU
packages, such as Fileutils, to make directory traversal more
efficient.  *WARNING: This makes some object files built with DJGPP
v2.03 incompatible with programs compiled with the v2.04 library!*

Two new functions, `monstartup' and `moncontrol', allow to control when
profiling starts and ends, and what range of addresses is recorded in
the profiling data.

There are new `malloc' debug facilities.  While not as powerful and
versatile as existing external packages, such as YAMD, these facilities
do allow to detect a wide variety of heap corruption problems, and to
report important heap usage statistics.  The new functions are
`mallinfo', `malloc_debug', `malloc_verify', and `mallocmap'; these
names are compatible with many Unix and GNU/Linux systems.  In
addition, special hooks, such as `__libc_malloc_hook' and
`__libc_free_hook', are provided for building custom `malloc' debugging
packages.

Nested DJGPP programs which are run by other DJGPP programs on Windows
should no longer crash (and take the DOS box with them) due to the fact
that Windows leaks selectors.  These crashes were caused by a failure to
allocate a selector for conventional memory, and subsequent use of the
invalid selector by the startup code itself.  This problem was typical
for Make, Bash, and any other program which can launch lots of child
programs without ever exiting to DOS.  To avoid this, the startup code
was fixed to print an error message and exit to DOS with an exit status
that indicates a failure, when a selector for DOS memory could not be
allocated by the DPMI host.

`confstr' has been added to the library to support returning
system-dependent configuration in strings.

Colors for symlinks were added to the `LS_COLORS' environment variable
in `djgpp.env'.

Double-precision shift instructions reinstated in `djasm', using a
simplified form of the implementation suggested by Bill Currie
<bill@taniwha.org>.  The new mnemonics are `dshl' and `dshr', and no
memory operand-size suffix is required.  Obsolete usage of `shld' and
`shrd' for double-precision shifts is flagged.

Two new functions, `l64a' and `a64l' (both part of the POSIX draft
standard), allow you to convert a 32-bit integer value to and from a
base-64 encoding, respectively.  Note that the encoding used is the one
mandated by the POSIX spec, and not the one used by either `uuencode'
or the MIME base64 encoding.

The environment functions `setenv' and `putenv' are now both part of
the POSIX draft standard and were updated to match the specs set forth
by that standard.  Both now set `errno' in case of failure, and
`putenv''s argument is now a `char*' instead of a `const char*'.  A new
function, `unsetenv', which is also part of that standard, was added.

`struct group' has a new field, `gr_passwd'.  This helps out porters,
as many Unixy apps expect it to exist.  Since DOS is basically an
insecure environment, this field always contains the empty string.
Similarly, `struct passwd' has two new fields, `pw_gecos' and
`pw_passwd'.  `pw_gecos' gets the same value as `pw_name' (i.e. the
value returned by `getlogin()').  Like `gr_passwd', `pw_passwd' gets
the empty string as value.

The function `uname' supports the new Pentium 4 CPU's by returning
`"i786"' in the `machine' member of `struct utsname' it returns.

A name conflict between `gettext' declared in `conio.h' and `gettext'
provided by GNU Gettext has been resolved.

`malloc' now declines ridiculously large allocation requests which
exceed 2GB - 64KB.  This is because anything larger is not supported by
`sbrk' and by most DPMI hosts.  Previously, `malloc' would sometimes
allocate a very small buffer due to wrap-around of large unsigned
numbers, and the calling program would then crash when it tried to use
that buffer.

`v2loadimage' now supports long command lines, instead of being
restricted by the DOS 126-character limit.

A new function, `__djgpp_spawn', has been added to allow control over
whether a search for executable extensions is performed.

The function `glob' and its helper functions have been changed to
prevent an internal buffer from being overrun when the pattern to be
expanded has more than 2000 characters.

There's now a work-around for the bug in NTVDM, the DOS emulator, which
ships with Windows 2000: nested DJGPP programs no longer cause NTVDM to
crash.  This allows to use GCC, Make, RHIDE, Bash, and other programs
which routinely invoke child programs.

The function `utime' now works on Windows 2000 and Windows XP.
Previously, it would fail with `errno' set to `EIO'; this affected
programs like `touch', `dtou', and `recode', which set time stamps of
files.  In addition, `utime' now allows to set the time stamp of
directories, but only on Windows 2000 or XP (other versions of Windows
do not allow to change time stamps of directories).

A fix has been applied to the memory allocation routines in `sbrk' to
prevent use of memory which would require address wrap when the host
DPMI provider does not allow 4Gb address limits.  This feature may also
be enabled in other environments which do not require it to get better
memory protection.  `_CRT0_DISABLE_SBRK_ADDRESS_WRAP' flag was added to
`_crt0_startup_flags' in file `crt0.h'

A list of memory block sizes `__djgpp_memory_handle_size' was added for
use in core dumps of the address space.

Change the round up size for memory block allocations in `sbrk' to
increase with the number of handles allocated.  This helps keep the
number of handles to the 256 allocated and reduce problems exhausting
DPMI handle resources.

The functions `dup' and `dup2' now copy to the new handle any
Filesystem Extensions which hooked the original handle.  Thus, the
duplicate handle now behaves exactly like the original one, in that it
is also hooked by the extension.

The function `fstat' now work arounds incompatibilities in DOS IOCTL
interface on Windows 2000 and Windows XP, and as a result returns
correct read/write permissions in `st_mode' and correct device code in
`st_dev' members of `struct stat'.  This was known to fail functions
like `link' and programs like GNU `cp' which tested files for being on
the same filesystem by calling `fstat'.

The long file name support in Windows 2000 and XP have bugs which cause
handles returned with long name opens to give incorrect information in
many library routines.  Routines which open files now open using short
name calls under Windows NT, 2K and XP if long file names are enabled.

The set break DPMI call under Windows 2000 and XP do not return the
break point handle, which prevented debuggers using break points from
working properly.  The handle is now guessed for this platforms which
allows the debuggers to work with hardware break points.

If the short name equivalent of the current path is greater than 64
characters, Windows 2000 and XP do not return the correct long path
name - they return the root directory instead without any failure code.
Since this can be disastrous in deep directories doing an rm -rf, we
check for this bug and fix the path.  Long directories can also cause
`_fixpath' to fail on Windows 9x if LFN=n and this is now handled by
returning a relative path instead of root.  Many uses of `_fixpath'
assume absolute directories so this change may break code in rare cases
(such as saving the value and changing directories).

Windows 2000/XP do not return the volume labels correctly using
findfirst calls so we force short name usage to fix the problem.
Drives higher than Z are suppressed.

`freopen' was modified to always use the same handle even if it is not
the first one available.

This global variable declared in `dos.h' is a faster way to get the
result of `_get_dos_version(1)'.

New option `-e' has been added to `djtar' to skip specified files and
directories when extracting.  Also `djtar' can accept multiple `-o' and
`-e' options in a single command line.  Finally, the file name change
file format allows skipping files and directories.

The function `fgetpos' will now fail, if it is unable to determine the
current offset for a stream.  Previously the failure would have been
silently ignored.

New function `_is_DOS83' added to the library to support filename case
lowering.  This replaces the functionality used from
`_lfn_gen_short_fname' which is hopelessly buggy on Windows 2000 and
XP.  New function used in `srchpath.c', `readdir.c', `glob.c',
`fixpath.c', `lstat.c' and `getcwd.c'.

The functions `stat', `lstat' and `fstat' now fill the `st_blksize'
member of `struct stat' with the correct block size for the device
where the file is located.

The types `blksize_t' and `blkcnt_t' were added.  `blksize_t' is now
used for the `st_blksize' member of `struct stat'.

The build system for the C libraries was modified, so that profiling
versions can be built.  Profiling options in `gcc.opt' are ignored for
certain files in the C libraries' sources.  The build system for
`emu387.dxe', the math co-processor emulation library, was also
modified, so that it can be built against a profiled version of libc.

Corrected problem with negative gmt offsets with z format in `strftime'.

The startup code was updated, to prevent memory corruption when the
`DJGPP' environment variable is not set.

The functions `fstatvfs' and `statvfs' have been added.  `statvfs' does
much the same as `statfs', but it is POSIX-compliant.

Optional support for the devices `/dev/zero' and `/dev/full' was added.
This is enabled using the `__install_dev_zero' and
`__install_dev_full' functions.

The `mkdoc' program is used to build the C library documentation.
`mkdoc' now produces portability information in a clearer manner, to
avoid ambiguity.  `mkdoc' also now allows multiple versions of
standards to be specified in the portability information, e.g. ANSI C89
and C99.

The debug support routines in `libdbg.a' now support exceptions 18 and
19 (in case the application being debugged hooks them), and no longer
overwrite memory when exceptions higher than 19 are used by the
debuggee.

The function `fchown' was added.

A bug was fixed in the File System Extensions mechanism that could be
exposed in environments where it is possible to have large numbers of
file descriptors (> 256) and low memory.

The `errno' value is now set correctly when a file open fails due to
wildcard (illegal) characters in the name.  If a wildcarded name failed
to match the error message was EFAULT and misleading.

A bug was fixed in the function `pow' in `libm.a'.  Previously
`pow(x,y)' returned 0 when `x' was very close to -1.0 and `y' was very
large.

A bug was fixed in the function `pow' in `libc.a'.  Previously `pow'
may have failed for negative numbers with a large magnitude.

A bug was fixed in the function `findfirst'.  Previously unexpected
behaviour may have resulted, if the attribute argument had a value
outside the range describable by the `FA_*' constants.

The function `realpath' was added. `realpath' does much the same as
`_fixpath', but is POSIX compliant and resolves symlinks.

The function `isblank' was added.

The `int_n_cs_precedes', `int_n_sep_by_space', `int_n_sign_posn',
`int_p_cs_precedes', `int_p_sep_by_space' and `int_p_sign_posn' members
were added to `struct lconv', to comply with the C99 standard.

The function `_Exit' was added.

The function `atoll' was added.

The function `strtold' was added.

The behaviour of the `%X' type conversion for the `scanf'-family of
functions has changed.  Previously `%X' denoted a `long' version of the
`%x' type conversion.  Now `%X' is equivalent to the `%x' type
conversion, as required by C99.

The `hh', `j', `t' and `z' conversion qualifiers are now supported by
`_doprnt', `_doscan', the `printf' family of functions and the `scanf'
family of functions.

The `delay' function now works on Windows 2000 and XP.  However, the
accuracy in the delay is limited, by the timing method it has to use on
Windows 2000 and XP.

The functions `imaxabs', `imaxdiv', `strtoimax' and `strtoumax' were
added.  The `PRI' and `SCN' families of macros were added.

The low-level function `_put_path' was changed to retain the `/dev'
prefix if a `/dev' directory exists on the disk.  This allows DJGPP
images to work with directories by this name.  You should avoid using
the `/dev' prefix on DOS device names if possible since the behavior
will change if the directory exists (and file operations which use the
name will be slower).  You should avoid using a `/dev' directory to
avoid conflicts.

Fix caching when environment variable `TZ' is not set.  Prevents many
calls to `getenv' which are not needed.

The function `strtof' was added.

The functions `strlcat' and `strlcpy' were added.

The mnemonic `wbinvd' has been added to `djasm'.

The constants `HUGE_VALF' and `HUGE_VALL' were added.

`ssize_t' was changed from an `int' to a `signed long int'.  `ssize_t'
is now really a signed version of `size_t'.

The error code `EILSEQ' was added -- `errno' may be assigned it.
`perror' and `strerror' were updated to display/return an error message
for `EILSEQ'.

It's possible to set stub parameters by passing `-stubparams=...' to
`stubify'.

Info documentation was added for `go32-v2', `stubify', `stubedit',
`exe2coff', `coff2exe', `dxegen', `symify', `edebug32', and `fsdb'.

The internal declaration of these two variables was moved to `crt0.S'.
This change makes the new `crt0.o' incompatible with previous DJGPP
releases if you accidentally link crt0 with the wrong libc.
`__djgpp_ds_alias' used to be declared in the `.text' section and
locked by default.  It is now in `.data' and not locked.  If you are
referencing this value in a hardware interrupt handler, you should lock
the memory area or copy it to your handler's locked memory.

Added `_rdtsc' as a direct call to the hardware instruction.  It will
inline to a single instruction when compiled with optimization.

`chmod' and `chown' can now be hooked by File System Extensions.

The function `isatty' now checks whether the file descriptor passed to
it is a valid.  If not, it will set `errno' to `EBADF'.

The function `perror' no longer prints a colon and blank if called with
a null pointer or a pointer to a null string.

The function `fchmod' was added.

The functions `_tolower' and `_toupper' were added.

The functions `readv' and `writev' were added.

The function `pwrite' was added.

The macro `NAN' was added.

The function `fchdir' was added.  This required modifications to the
POSIX functions `open', `read', `write', `lseek', `ftruncate', `fstat',
`select', `fsync' and `fdopen' and the ANSI functions `fopen',
`freopen', `fclose', `ftell', `fseek' and `rewind', to make them aware
of file descriptors for directories.

*Simple temporary fix - TODO: more complete fix*: `fstat' will now use
the file name used to open the file, when inventing inodes.  This is
done so that the same inode is generated irrespective of the actual
file path used to open the file.  This also fixes the problem where
multiple calls to fstat on the same file descriptor would give
different inodes.

`stat' and `fstat' should now return the same inode for a file in most
cases.

New enhanced dynamic module support has been added with a Posix
compliant interface.  You can now create complex DXEs which depend on
each other and call code from the main image.  Converting libraries to
standalone DXEs which can be linked via library is as simple as a
single command.

`uclock' now uses rdtsc under Windows NT, 2000 and XP (if it is
available) to work around the bug with the interval timer not being
syncronized with the timer tick.

The macro `__tb_size' was added, to represent the size of the transfer
buffer.  This complements the macro `__tb', which gives the linear
address of the transfer buffer.

`djtar' now copes with single-span spanned archives.

The functions `strtod', `strtof', `strtold' and `_strtold' now
understand "Inf", "Infinity", "NaN", "NaN()", "NaN(HEX-NUMBER)" and any
variations of case in the input string.

The `_truename_sfn' function was added.  Please use `_truename_sfn'
when comparing truenames, to avoid problems when comparing the
truenames of existing and non-existing files.

Fix a bug in moving directories into themselves.   Previously `rename'
failed to detect that a subdirectory was being moved into itself, when
the current directory was a short filename.

The C99 macro `fpclassify' and the supporting functions
`__fpclassifyf', `__fpclassifyd' and `__fpclassifyld' were added.

The C99 functions `nan', `nanf' and `nanl' were added.

The `_doprnt' and `_doscan' functions, the `printf' family of
functions, the `scanf' family of functions and the `strto*' family of
functions now honour the decimal point from the current locale.

`strftime' now uses the date format (for `%x') and time format (for
`%X') from the current locale.  This means that `%T' and `%X' are no
longer equivalent.

A stack overflow handler was added.

`math_errhandling' was added.

A bug was fixed in the `scanf' family of functions.  If a variable
assignment was suppressed and the stream terminated prematurely, these
functions could incorrectly return the number of matches instead of
`EOF'.

Now `assert' prints also the name of the function where an assertion
fails, if that function is compiled with C99 features enabled.


File: kb.info,  Node: Known Bugs,  Next: Known Anti-Bugs,  Prev: What Changed,  Up: Top

Known Bugs
**********


File: kb.info,  Node: Known Anti-Bugs,  Next: Hidden Features,  Prev: Known Bugs,  Up: Top

Known Anti-Bugs
***************


File: kb.info,  Node: Hidden Features,  Prev: Known Anti-Bugs,  Up: Top

Hidden Features
***************

DJGPP has numerous features hidden in it.  Most of these are described
elsewhere in the existing documentation, but they are usually hard to
find "amidst the fine print", and their combined impact is hard to
appreciate without seeing them all together.  This chapter describes
some of the more important features and their interconnections.

* Menu:

* Features::    The features provided by DJGPP.
* DJGPP.ENV::   All about the format of the `djgpp.env' file


File: kb.info,  Node: Features,  Next: DJGPP.ENV,  Up: Hidden Features

Features provided by DJGPP
==========================

This section describes some advanced features provided by DJGPP.  Most
of these features are built into the C library, but some are provided
by the basic development utilities which are part of the DJGPP
development environment.  Since DJGPP is a Posix-compliant environment,
many of these features are motivated by Unix compatibility.

   * Compatible headers and libraries.

     The DJGPP header files and library functions are highly compatible
     with other popular environments.  In addition to full ANSI and
     Posix compliance, DJGPP also offers compatibility to many PC and
     Unix libraries.  For example, DJGPP provides library functions
     that are usually absent from other DOS- and Windows-based
     libraries, like `popen', `glob', `statfs', `getmntent',
     `getpwnam', `select', and `ftw'.  Other functions, although they
     exist in DOS/Windows libraries, are incompatible with Posix in
     subtle ways.  For example, the ANSI-standard function `rename'
     typically fails in DOS/Windows implementations if the target file
     already exists (because the underlying OS call fails).  DJGPP
     makes a point of sticking to Posix or Unix behavior in such cases,
     even if it means more processing (like removing the target file in
     the case of `rename').

     A case in point is library functions `stat' and `fstat'.  Unix
     programs make extensive use of the inode number and the mode bits
     returned by these functions.  For example, GNU `diff' examines the
     inode numbers of the files it is about to compare, and if they are
     equal, exits immediately on the assumption that both file names
     point to the same file.  However, DOS and Windows don't support
     inodes, and most other DOS/Windows implementations return zero in
     the `st_inode' member of `struct stat', which of course breaks
     `diff'.  Also, the mode bits returned by `fstat' are usually
     incorrect.  In contrast, the DJGPP implementation of these
     functions goes out of its way to provide compatible
     implementations for these functions, and in particular returns
     meaningful inode numbers, even though it takes quite a lot of code
     (for example, `stat' code compiled totals about 17KB, together
     with other library functions it calls).

     Such high compatibility makes porting programs very easy.

   * Long command lines.

     When DOS invokes programs, it limits the length of the command
     line to 126 characters (excluding the program's name).  This is a
     ridiculously small limit; it doesn't even allow to compile GCC,
     since many commands in GCC `Makefile's are much longer.

     Therefore, DJGPP provides a mechanism to pass long command lines to
     child programs.  The actual command is stored in the transfer
     buffer, and a pointer to that buffer is passed to the child
     program instead of the command line itself.  The startup code of
     the child program then retrieves the actual command-line arguments
     and puts them into the `argv[]' array passed to `main'.

     DJGPP also supports the so-called "response file" method of
     passing long command lines, whereby the command line is stored on
     a disk file, and the name of that file is passed as
     `@response-file'.  For example:

           ar cq libmylib.a @files-list

   * Unix-style file-name globbing.

     All Unix programs assume that any file-name wildcards on their
     command line were already expanded by the shell, to yield normal
     file names.  But DOS shells don't provide this functionality, so
     the wildcards would wind up verbatim in the `argv[]' array.  To
     avoid the need to have special code in every ported program that
     expands the wildcards, the DJGPP startup code expands the
     wildcards automatically.  The expansion follows the Unix
     conventions, so `*' expands to all file names, unlike the DOS
     conventions where it excludes file names with extensions.

     The globbing code supports Unix-style quoting with the `'' and `"'
     characters (most other DOS/Windows compilers and shells only
     support `"').  Escaping special characters with `\' is limited to
     the quote characters themselves, since `\' serves as a directory
     separator in DOS/Windows file names.

     DJGPP also provides a special extension: the `...' wildcard
     expands recursively to all the subdirectories.  Thus, the following
     command would search all files in all the subdirectories,
     recursively:

           grep foo .../*

     (This was hard to achieve even on Unix, until the recent release
     of the GNU Grep package introduced the `--recursive' option.)

   * Extending the shell via the `system' function.

     Traditionally, the `system' library function calls the shell to
     process its argument.  However, stock DOS shell `COMMAND.COM' is
     too dumb to be useful in many cases.  For example, it doesn't
     support long command lines, even though DJGPP programs do; it
     doesn't understand forward slashes in file names; and it doesn't
     return the exit code of the child program to the parent.

     Therefore, the DJGPP version of `system' usually doesn't call
     `COMMAND.COM' at all.  Instead, it internally emulates its
     functionality, including redirection and pipes, and invokes the
     programs directly.  This allows to provide the following important
     features:

        - Long command lines.

          This is described under "Long command lines" above, but here
          it means that shell commands can have arbitrary length, even
          though the shell itself doesn't support that!

        - Unix-style file names.

          File names which are targets of redirection can be given in
          the Unix `/foo/bar' style.  Unix devices, such as
          `/dev/null', are also supported (see "Transparent conversion
          of special file names", below).

        - Multiple commands in a single command line.

          The emulation code supports the `foo ; bar' feature of several
          commands separated by a semi-colon.

        - Improved emulation of internal shell commands.

          The emulation of the shell command `cd' allows Unix-style
          forward slashes in its argument, and also changes the drive
          if the argument includes the drive letter.

        - Support for Unix-style shells.

          If the environment variable `SHELL' points to a name like `sh'
          or `bash', `system' invokes the shell to do everything, since
          the internal shell emulation is not sophisticated enough to
          cover Unix shell functionality.

        - Direct invocation of Unix shell scripts.

          Shell scripts can be invoked even if the `SHELL' environment
          variable doesn't point to a Unix-style shell, provided that
          the interpreter whose name appears on the first script line
          after the `#!' signature can be found somewhere along the
          `PATH'.

        - Exit code of the child program is returned to the caller.

     `COMMAND.COM' is only invoked by `system' to run batch files or
     commands internal to the shell.  However, `system' always looks
     for external programs first, so if you have e.g. a port of the GNU
     `echo' program installed, `system' will call it even though
     `COMMAND.COM' has an internal (and very much inferior) command by
     that name.

     These features come in especially handy in the DJGPP port of GNU
     `make'.  Where the original Unix code of `make' invokes the shell,
     the DJGPP port simply calls `system' to execute the commands in
     rules, and automatically gets support for long command lines and
     Unix-style shells required to run many `Makefile's of Unix origin.

     The above extended functionality also means that whenever a Unix
     program calls `system', in most cases the same call will work
     without any changes when compiled with DJGPP.  The result is not
     only ease of porting, but also less probability to leave subtle
     bugs in the ported program due to an overlooked fragment which
     assumes a Unix shell.

   * Transparent conversion of special file names.

     All DJGPP library functions pass file names to DOS via a single
     low-level function.  This allows to remap some special file names
     to their DOS equivalents.  For example, Unix-standard device names
     `/dev/null' and `/dev/tty' are converted to their DOS equivalents
     `NUL' and `CON', respectively.  File names which begin with
     `/dev/X/', where X is a drive letter, are converted to the DOS
     `X:/' form; this is required for running some Unix shell scripts
     which take apart the `PATH' variable where colons separate
     directories.

     In addition, file names which begin with `/dev/env/' are expanded
     using the environment variables.  For example, `/dev/env/DJDIR'
     expands into the full path name of the top DJGPP installation
     directory, since the environment variable `DJDIR' has that
     directory as its value.

   * Filesystem extensions.

     This feature is built into the low-level file-oriented library
     functions.  It allows the application to install a handler for
     certain filesystem calls, like `open', `read', `fstat', `dup',
     `close', etc.  If installed, such a handler is called just before
     the appropriate primitive is invoked to pass the call to DOS.  If
     the handler returns a non-zero value, it is assumed to have
     handled the call, and the usual primitive call is bypassed.
     Otherwise, the library proceeds with calling DOS as usual.

     This facility provides an easy way of handling special files and
     devices which DOS and Windows don't support directly.  For
     example, a program can install a handler for special file names
     like `/dev/ptyp0' and emulate these non-existent devices via an
     async communications library.

     Another way of putting filesystem extensions to a good use is when
     there's a need to emulate functionality that DOS file I/O doesn't
     support, even though the associated devices do exist.  For example,
     suppose you need to port code which sends special commands to the
     terminal device via `termcap' functions.  DOS supports a terminal
     device, but doesn't support `termcap'.  However, it is possible to
     achieve the same effects if direct screen writes are used instead
     of file I/O.  By installing a filesystem extension handler for the
     standard output handle, you could redirect all terminal I/O to
     direct screen writes and implement all the necessary `termcap'
     functionality, without any changes to the program's source code.
     This is how the DJGPP port of GNU `ls' supports the `--color'
     option without forcing users to install `ANSI.SYS', which is a
     special terminal driver that interprets ANSI escape sequences (and
     also has several nasty side-effects).

   * Support for long file names.

     DOS system calls are limited to file names in the so-called "8+3
     format": maximum 8 characters for the basename and maximum 3
     characters for the extension.  Therefore, it is impossible to
     access the long file names, offered by Windows 9X and Windows NT,
     via the DOS system calls.  However, Windows 9X provides a special
     API (a bunch of special functions of software interrupt 21h) that
     allows DOS programs to access long file names.  This API is widely
     known as the "LFN API", where "LFN" is an acronym for "Long File
     Names".  For each file-oriented DOS system call, the LFN API
     includes a replacement that supports long file names.  For
     example, there are functions to open files, list the files in a
     directory, create a directory, etc. using long names.  The LFN API
     also adds several functions to access extended functionality
     supported by the Windows filesystems.  For example, it is possible
     to get and set 3 times for each file, like on Unix, instead of
     only one time supported by DOS.

     The DJGPP library features transparent and automatic support for
     long file names on Windows 9X(1) The DJGPP startup code queries
     the system for the availability of the LFN API, and if it's
     available, all low-level file-oriented primitives are
     automatically switched to using the special LFN-aware functions.
     This run-time detection of the LFN support means that the same
     executable will run on DOS and on Windows, and will automatically
     support long file names when it runs on Windows 9X.

   * Emulation of links.

     DOS doesn't support hard and symbolic links.  However, DJGPP
     emulates them to some extent.  The `link' library function
     simulates hard links by copying.  Symbolic links are fully
     emulated by most file handling functions in the library.  Also,
     symlink support API that you would expect find only on UNIX (such
     as `readlink') is present.  Function `symlink' creates files with
     special size and format which are recognized by other library
     functions.  Because DOS itself and most DOS applications weren't
     designed with symlinks in mind, there is a subset of file handling
     API which intentionally does not support symlinks.  This includes
     functions with `_dos_' prefix, as well as other functions with DOS
     origin, such as `findfirst'.

   * Emacs compatibility.

     Emacs is special because when it dumps itself during the build
     process, static and global variables are frozen in the dumped
     image with the last value they had at the time the program was
     dumped.  DJGPP has a special facility in the library through which
     library functions can detect that the program was dumped and
     restarted.  All library functions that need static variables, use
     this facility to reinitialize them.  This allows Emacs to be built
     with DJGPP without the need to analyze whether each library
     function called by Emacs is dump-safe.

   * Special-purpose utilities.

     In addition to relying on GNU development tool-chain, DJGPP
     introduces several utilities written specifically for the project.
     These utilities are meant to assist the developer in solving
     specific tasks common for the DJGPP environment.  Some of these
     utilities are listed below:

        - djtar

          `djtar' is a program that unpacks archives (but cannot create
          them).  It was originally written to unpack files created by
          `tar', because DOS and Windows lack standard programs for
          that.  Since the original release, `djtar' functionality was
          significantly extended, and now it can unpack `.tar.gz' and
          `.zip' files as well.  It also can unpack archives from
          floppy disks written as raw `/dev/rfd0a' devices on Unix
          systems, and it uncompresses and untars `.tar.gz' files on
          the fly, by feeding the untar code with output of the unzip
          code.  The latter feature is very important when unpacking
          large distributions, such as `emacs-XX.YY.tar.gz', because
          pipes are implemented as temporary disk files on DOS/Windows,
          and so on-the-fly decompression avoids creating huge
          temporary disk files.

          The ability to unzip `.zip' archives makes `djtar' the only
          free program which does that, since it turns out that
          InfoZip's `UnZip' license does not comply with FSF's
          definition of free software (according to Richard Stallman).

          In addition, `djtar' offers several features designed to
          prevent problems due to DOS/Windows file-name restrictions,
          see "DOS file names handling", below.

        - djsplit and djmerge

          These two programs come in handy when you need to carry a
          large file (usually, a compressed archive of a large
          distribution) on floppies.  `djsplit' splits a file into
          smaller chunks whose size is user-defined, and `djmerge'
          splices the chunks back together.

        - dtou and utod

          These programs are close cousins of `dos2unix' and `unix2dos',
          respectively, but they have several clever tricks up their
          sleeves.  First, they take file names from the command-line
          arguments and rewrite each file, instead of reading `stdin'
          and writing `stdout'; thus, they can convert many files in a
          single run.  And second, they preserve the time stamps of the
          converted files, to keep utilities like `make' happy.  With
          these programs, you can convert the entire directory tree of
          C source files to the DOS CR-LF format with a single command:

                utod .../*.[ch]

          This uses the DJGPP wildcard expansion and the special `...'
          wildcard mentioned above.

        - update

          This is a replacement for the well-known `move-if-changed'
          shell script.  It is very handy in `Makefile's which should
          run on systems that don't have Bash installed.  Since it
          understands Unix-style forward slashes (like all DJGPP
          programs do), it is also widely used in `Makefile's for
          copying files, instead of the shell's internal `COPY'
          command, since `make' doesn't live well with backslashes in
          file names.

        - redir

          As its name implies, `redir' redirects standard handles.  It
          was originally written to allow redirection of `stderr',
          which stock DOS shell `COMMAND.COM' cannot do.  You need this
          redirection, e.g., when GCC spits out a long list of error
          messages which scroll off the screen.  `redir' can also
          append redirected handled (a-la `>>') and redirect `stderr'
          to the same place as `stdout' or vice versa, like what `>&'
          does in Unix shells.

          In addition, `redir' reports the exit status of the program it
          runs, and print the elapsed time used by the child.  These
          features are provided because, unlike on Unix, there are no
          standard utilities to do that.

        - symify

          DJGPP debugging support doesn't include Unix-style core files
          which allow post-mortem debugging of a crashed program.  To
          compensate for this deficiency, when a program crashes, a
          special library module prints the values stored in the CPU
          registers and the traceback of the function calls that led to
          the crash, as stored in the call frames pushed onto the stack.

          However, the stack traceback, as printed, is hard to
          interpret, because it only includes numeric addresses of the
          functions.  The `symify' program solves this problem.  It
          reads the traceback directly from the video memory, and uses
          the debug info recorded in the program's executable file to
          convert the addresses into file names and line numbers of the
          source files.  It then adds the file names and line numbers
          information near the corresponding addresses, thus making the
          traceback easy to comprehend.

   * DJGPP-specific extensions to GNU utilities.

     Besides the library functions and DJGPP-specific programs, a lot of
     special code went into the utilities ported to DJGPP, so that these
     utilities could work together smoothly and have the effect a user
     would expect.  Some of these extensions are listed below:

        - Bash supports Unix-style `PATH' format.  Unix uses `:' to
          separate directory names in the value of environment
          variables such as `PATH'.  Many shell scripts rely on this
          feature to look for programs along the `PATH'.  For example,
          the GNU-standard `configure' scripts do that to find `gcc',
          `ranlib' and other programs, as part of the auto-configuration
          process.

          However, DOS and Windows use `;' to separate directories in
          `PATH' (because absolute file names include a drive letter,
          like in `d:/foo/bar').  This breaks shell scripts which
          search along the `PATH'.

          To allow these scripts to run without changes, the DJGPP port
          of Bash introduces a special variable `PATH_SEPARATOR'.  If
          this variable is set to `:', Bash converts the value of
          `PATH' to pseudo-Unix form.  For example, if the original
          value of `PATH' is like this:

                PATH=c:\djgpp\bin;d:\gnu\emacs\bin

          then setting `PATH_SEPARATOR=:' converts it to this:

                PATH=/dev/c/djgpp/bin:/dev/d/gnu/emacs/bin

          This lets Unix shell scripts run unaltered.  However, to
          prevent the external commands from breaking (because they
          don't know anything about `PATH_SEPARATOR'), Bash converts
          the value of `PATH' back to its usual DOS style in the
          environment it passes to child programs.

          The DJGPP library supports the special `/dev/x/' file names by
          converting them to the usual DOS `x:/' format, before it
          issues DOS calls, so all DJGPP-compiled utilities can be
          safely run by a script when `PATH_SEPARATOR' is set to `:'.

        - `test -x foo' looks for `foo.exe', `foo.com', `foo.bat', etc.
          This is important e.g. in GNU `configure' scripts which look
          for programs along the `PATH'.

        - `install foo /bin/foo' actually installs `foo.exe' in the
          target directory.  Similarly, `gcc -o foo' creates both `foo'
          and `foo.exe'; the first causes `make' to be happy when Unix
          `Makefile' is in use (since the target names are usually
          extension-less on Unix), while the second can be run from the
          DOS command prompt, since stock DOS shell refuses to run a
          program without one of the executable extensions (`.exe',
          `.com' or `.bat') it knows about.  Both of these features are
          intended for using Unix `Makefile's without changes.

        - Shell specifications such as `/bin/sh' cause the shell to be
          looked for along the `PATH' as well, so that users won't need
          to have a `/bin' directory.

        - Programs which should pipe text to `lpr', write to the local
          printer device instead, if `lpr' could not be located.  Emacs
          and `dvips' are two examples of programs that offer this
          feature.

        - DOS file names handling: programs which unpack file archives
          rename files whose names are invalid on DOS/Windows.  The
          DJGPP ports of GNU `tar' and `cpio' programs, and the `djtar'
          utility supplied with the DJGPP development kit are examples
          of such programs.  They replace characters which aren't
          allowed in file names, like `+' on MS-DOS or `"' on
          MS-Windows, and rename files whose names are reserved on
          DOS/Windows by character devices (and therefore writing to
          them could have unexpected results).

          Another potential problems in unpacking file archives is that
          several different file names can map to the same name after
          truncation to the DOS 8+3 limits or as result of the
          automatic renaming I just described.  For this reason,
          `djtar' refuses to overwrite existing files, and requires the
          user to type in another name under which the file will be
          extracted.  If the user presses <RET>, the file is skipped.

          This interactive, one-by-one renaming might be tedious and
          error-prone, when there's a lot of files to rename.  A case
          in point is the test suite in the GNU Textutils distribution
          with a lot of names like `n+4b2l10f-0FF', `njml17f-lmlmlo',
          etc.  For these cases, `djtar' has a command-line option
          which can be used to submit a file with a mapping between
          original and DOS names; `djtar' will automatically rename
          every file mentioned there and will leave all other file
          names intact.  An example of putting this feature to use can
          be seen in the latest versions of Textutils (look for the file
          `djgpp/fnchange.lst' and the instructions to use it in
          `djgpp/README').

The features mentioned above are mostly small niceties.  But can you
imagine the amount of hacking needed to get Unix Makefiles and shell
scripts to work on DOS and Windows machines, if these tidbits didn't
exist?

---------- Footnotes ----------

(1) Windows NT does not include this API, therefore DJGPP programs
cannot access long file names on NT systems.  However, a free LFN
driver for NT is available from the `v2misc/' directory of the DJGPP
archive on Simtel.NET.


File: kb.info,  Node: DJGPP.ENV,  Prev: Features,  Up: Hidden Features

DJGPP.ENV
=========

If you set the DJGPP environment variable to point to a file, that file
will be used to load the environment.  There is a djgpp.env file
distributed with djgpp that provides most of the values you need.  The
format of the file is like this:

     VAR=value
     VAR=value
     [program]
     VAR=value
     [prog2]
     VAR=value

Note that all whitespace is preserved, so be careful about trailing
spaces and spaces around the `='.  Variables in the first section
(before any [program] lines) apply to all programs.  Variables in
program-specific sections are loaded only when running that program.
For example, a [gcc] section would have variables that gcc.exe needs.
Values may refer to other variables using the DOS convention, like
%DJGPP%.  In addition, the first characters after the `%' can be used
to process the value before using it.  These syntaxes are allowed:

     %variable%     Take the value as is
     %:variable%    Take the directory portion only
     %;variable%    Append with a semicolon if variable is defined
     %/variable%    Replace all `\' with `/'
     %\variable%    Replace all `/' with `\'
     %<variable%    Convert to upper case
     %>variable%    Convert to lower case

You may list multiple characters after the %, but they must be before
the variable name, like %:/>DJGPP%.  Variable names are case sensitive.
The DOS environment variable names are usually upper case.  Variables
set through this file override any set in the DOS environment, unless
the first character of the variable name is `+', in which case the DOS
environment overrides the file (the `+' is removed from the name), as
in `+USER=dosuser'.

If you need a literal `%', write two percent signs in a row, like so:

     LESSBINFMT=*k<%%X>

This will produce a value of `*k<%X>' for the variable `LESSBINFMT'.


File: kb.info,  Node: Development,  Up: Top

Coding Standards
================

Source indentation
------------------

Most of the DJGPP sources are formatted in a standard way; please
observe and preserve this formatting when writing new code.

The indentation style generally looks like this:

      if (foo)
      {
        bar(baz);
      }

That is, the braces are on a separate line and in the same column as the
`if' (or `for', or `while') clause that opens the block.

Here's how to set up Emacs's C Mode for this indentation style:

     (c-add-style
      "DJ"
      '((c-basic-offset . 2)
        (c-comment-only-line-offset . (0 . 0))
        (c-offsets-alist . ((substatement-open . 0)
     		       (label . 0)
     		       (statement-case-open . +)
     		       (statement-cont . +)
     		       (arglist-intro . c-lineup-arglist-intro-after-paren)
     		       (arglist-close . c-lineup-arglist)
     		       ))
        ))
     
     (c-set-style "DJ")

And here's the list of options for the GNU `indent' program, to be put
on your `.indent.pro' profile file, in case you need to reformat your
sources to comply with the DJGPP style:

     /* DJ */
     -nbad -bap -nbc -bbo -bl -bli0 -brs -ncdb -nce -cp1 -cs -di2
     -nfc1 -fca -hnl -i2 -ip2 -ci0 -lp -npcs -nprs -psl -nsc -nsob

Stubs
-----

A C application's namespace should not be polluted with non-ANSI and
non-POSIX functions from the C libraries, unless the application
explicitly uses these symbols.  An example of a non-ANSI and non-POSIX
function is `uclock' (*note uclock: (libc)uclock.).

But what happens if you wish to call a non-ANSI and/or non-POSIX
function from C library code?  The actual implementation is placed in
the C library's private namespace with a stub function that calls the
implementation.  Consider `uclock' -- the library would use the
`__uclock' function internally, but application code would use the stub
`uclock'.

Functions that are stubbed have an entry in the include file
`libc/stubs.h', e.g.:

     #define uclock __uclock

Any C library sources defining or calling the implementation should
include `libc/stubs.h' as the first include file.  This is so that we
can refer to, e.g., `uclock' as `uclock' in the library code, but the
library code will actually define/call, e.g., `__uclock' and will not
pollute the application namespace.

The stub files are assembly language files generated automagically from
`libc/stubs.h' as part of the C library build process.

NB: The private name, e.g., `__uclock', is *not* part of the published
API.

Far pointers usage
------------------

If a library function uses one of the `_far*' far pointer functions, it
should include `libc/farptrgs.h' instead of `sys/farptr.h'.  The inline
functions in `farptrgs.h' use the GS register instead of FS, to avoid
clobbering FS which might be used by the application.

Filename manipulation
---------------------

When manipulating filenames, don't use the ctype functions from
`ctype.h', because they are locale sensitive.  For example, instead of
using `tolower' (*note tolower: (libc)tolower.), convert the case with
explicit code.

Assertions
----------

Assertions should not generally be used in library code.  To catch an
error, the code should check for the error and return an error code.
Using `assert' (*note assert: (libc)assert.) causes the debug and final
release (`NDEBUG' defined) versions of the code to differ, so that the
final release is not as well tested.

Coping with restarted programs
------------------------------

Uninitialised static and global data is placed in the `.bss' section.
"BSS" stands for Block Started by Symbol.  The `.bss' section is zeroed
by the start-up code.

Initialised static and global data is placed in the `.data' section.

So it would seem that one can rely on static and global variables being
initialised to zero or some specified value.  Unfortunately this may not
be true, where programs are unexecuted and then restarted -- Emacs is
the primary example.

Part of Emacs's build procedure is that Emacs unexecutes (dumps) itself
to a file.  The dumping process records the value of each variable at
the time of the dump to a file.  The symbols in the `.bss' section are
moved to the `.data' section.  The values at the time of the dump are
recorded, not the original values.  So if the library code is relying
on the value of a static or global variable, e.g., to see whether it
needs to initialise some device or allocate memory, then it may break
when the program restarts.

Fortunately there is a way that library code can detect a restart.  The
variable `__bss_count' contains a counter of the number of times that
the program has been started -- it is incremented by the start-up code.
A routine can store `__bss_count' and then check whether it needs to
initialise its data by comparing `__bss_count' with its stored value.
Here is an example:

     #include <string.h>
     #include <libc/bss.h>
     
     extern int do_something_interesting (const int n);
     
     static int my_bss_count = -1;
     static int my_array[20];
     
     int
     myfunc (const int n)
     {
       if (my_bss_count != __bss_count)
         {
           my_bss_count = __bss_count;
           memset(my_array, 0, sizeof(my_array));
         }
     
       if (n >= 20)
         return 0;
     
       if (!my_array[n])
         my_array[n] = do_something_interesting(n);
     
       return(my_array[n]);
     }

For more details see `src/libc/crt0/crt1.c' in the DJGPP libc sources.

The DJGPP Build System
======================

Profiling
---------

`src/gcc.opt' controls how the DJGPP sources are compiled.  To build
the C libraries for profiling, add the profiling options (e.g., `-pg')
to `gcc.opt', one option per line.  The library will need to be rebuilt
from scratch for the new options to take effect, so a `make clean' is
needed before rebuilding in the directory of interest, e.g.:

     cd /path/to/djgpp/sources
     cd src
     echo "Adding profiling option to gcc.opt"
     echo -pg >> gcc.opt
     cd libc
     echo "Building a profiling version of libc"
     make clean
     make

For example of how some of the sources are built without profiling,
please see `src/libc/crt0/makefile' to see how the profiling support
code, `src/libc/crt0/mcount.c', is built.

There are currently some problems with profiling support.  The math
co-processor support code, `emu387.dxe', in `src/libemu' cannot be
built with profiling.

Texinfo documentation
=====================

Formatting
----------

   * Use two spaces after every period/full-stop ending a sentence.

   * Don't use capital letters for emphasis--use `@strong{}' instead.

   * Put a comma or colon after "e.g.".

   * When "i.e." or "etc." is followed by a space, use `@:' after it,
     to indicate that that the final period does not end the sentence.
     E.g.: `i.e.@:'.

   * Don't put a newline between a function's return type and its name,
     e.g.:

          int
          somefunc (void);

     is incorrect;

          int somefunc (void);

     is correct.

   * When introducing a new term, it is usually a good idea to use
     `@dfn{}' to mark it as a definition.  It may also be a good idea
     to add it to the concept index using `@cindex{}'.  E.g.:

          @cindex definition
          
          This is a @dfn{definition}.

   * Command-line options should use the `@samp{}' or `@option{}'
     mark-up.  `@option{}' is new in Texinfo 4.0.

   * Names of programs should use `@command{}' (unless program's name
     has become a proper name, like GCC or GDB).

   * Constants like `EINVAL' should be enclosed in `@code{}'.

   * Environment variables like `LOGNAME' should be enclosed in
     `@env{}'.

   * Avoid the urge to use `@ref{}' or variant in the middle of
     sentence, because it will look ugly in info documentation and
     terrible in printed documentation.  Instead use a textual
     reference followed by a comma followed by the reference command,
     e.g.:

          @code{yabbadabbadoo()}, @ref{yabbadabbadoo()}.

   * Be aware of how you use the `-' character.  Use the following
     mark-up correctly:

        * `@minus{}' to insert a minus sign;

        * `---' to insert an em-dash--do not put spaces on either side
          of `---';

        * `-' to hyphenate;

        * `@-' to insert a discretionary hyphenation point.

   * Use `@uref' to refer to a URL.  texinfo also has `@url' for
     inserting URLs, but `@uref' is more useful when texinfo is
     formatted into HTML.  The Texinfo manual discourages the use of
     `@url'.

   * Under the subheading `Portability', `@portability' should be used
     to indicate whether a feature is specified in the ANSI C and POSIX
     standards.  For example:

          @subheading Portability
          
          @portability !ansi, posix

     Please note that `@portability' is not used to indicate whether
     the DJGPP implementation complies with the standards listed.
     Instead, `@port-note' may be used to describe
     implementation-specific details:

          @port-note ansi The buffer size limit is imposed by DJGPP.

     `@portability' and `@port-note' are DJGPP-specific extensions of
     texinfo (*note texinfo: (texinfo)Top.) that are expanded into
     normal texinfo by `mkdoc'.  `mkdoc' is part of the DJGPP sources.
     It is used to build the C library documentation (*note libc:
     (libc)Top.).  Therefore, `@portability' and `@port-note' should
     only be used in DJGPP's C library documentation.

   * When writing prototypes in header files remember to prefix any
     formal arguments that you use with the underscore character (`_')
     to avoid polluting the name space.

   * Finally, for some relevant texinfo technique, look at the source
     of this page in the DJGPP sources--`src/docs/kb/contrib.txi'.


File: kb.info,  Node: Index,  Up: Top

Index
*****

* Menu:

* .sh, .ksh, .pl, .sed extensions:       Changes in 2.04.
* /dev/full:                             Changes in 2.04.
* /dev/zero:                             Changes in 2.04.
* 387, and the value of _8087:           Changes in 2.03.
* 387, set to Y:                         Changes in 2.02.
* 4DOS, support for long command lines:  Changes in 2.04.
* 8-bit characters, and string-related functions: Changes in 2.03.
* ^Z character, at end of a response file: Changes in 2.03.
* _8087:                                 Changes in 2.03.
* __bss_count and restarted programs:    Development.
* __crt0_load_environment_file:          Changes in 2.03.
* __djgpp_clock_tick_interval, introduced: Changes in 2.03.
* __djgpp_ds_alias, moved to crt0:       Changes in 2.04.
* __djgpp_exception_toggle:              Changes in 2.02.
* __djgpp_memory_handle_size, added to library: Changes in 2.04.
* __djgpp_set_ctrl_c, non-destructive query: Changes in 2.03.
* __djgpp_spawn, added to the library:   Changes in 2.04.
* __djgpp_stack_overflow_eip added:      Changes in 2.04.
* __djgpp_stack_overflow_exit added:     Changes in 2.04.
* __doserr_to_errno, wildcards on Windows 2000 and XP: Changes in 2.04.
* __dosexec_find_on_path, some extensions excluded from search: Changes in 2.04.
* __dpmi_int, and signals on Windows:    Changes in 2.02.
* __dpmi_simulate_real_mode_procedure_iret(): Changes in 2.02.
* __dpmi_simulate_real_mode_procedure_retf_stack: Changes in 2.03.
* __dpmi_simulate_real_mode_procedure_retf_stack, stack corruption: Changes in 2.04.
* __dpmi_yield:                          Changes in 2.02.
* __fpclassifyd added:                   Changes in 2.04.
* __fpclassifyf added:                   Changes in 2.04.
* __fpclassifyld added:                  Changes in 2.04.
* __FSEXT_alloc_fd:                      Changes in 2.02.
* __install_dev_full, install support for /dev/full: Changes in 2.04.
* __install_dev_zero, install support for /dev/zero: Changes in 2.04.
* __internal_readlink, added to the library: Changes in 2.04.
* __solve_dir_symlinks, added to the library: Changes in 2.04.
* __solve_symlinks, added to the library: Changes in 2.04.
* __tb_size added:                       Changes in 2.04.
* _check_v2_prog, leaks file descriptor: Changes in 2.03.
* _close:                                Changes in 2.02.
* _creat:                                Changes in 2.02.
* _creat, and FAT32:                     Changes in 2.04.
* _creat, and Windows 2000/XP:           Changes in 2.04.
* _creatnew:                             Changes in 2.02.
* _creatnew, and FAT32:                  Changes in 2.04.
* _creatnew, and Windows 2000/XP:        Changes in 2.04.
* _crt0_startup_flags, moved to crt0:    Changes in 2.04.
* _crt0_startup_flags, the _CRT0_FLAG_KEEP_QUOTES flag: Changes in 2.02.
* _doprnt:                               Changes in 2.02.
* _doprnt, and C99 conversion qualifiers: Changes in 2.04.
* _doprnt, and the decimal point:        Changes in 2.04.
* _dos_ds:                               Changes in 2.01.
* _dos_findfirst:                        Changes in 2.02.
* _dos_lk64:                             Changes in 2.04.
* _dos_unlk64:                           Changes in 2.04.
* _doscan, and C99 conversion qualifiers: Changes in 2.04.
* _doscan, and the decimal point:        Changes in 2.04.
* _doserrno:                             Changes in 2.02.
* _Exit:                                 Changes in 2.04.
* _far* functions in the library:        Development.
* _fargetsel:                            Changes in 2.01.
* _filbuf:                               Changes in 2.03.
* _fixpath:                              Changes in 2.02.
* _fixpath, and long named directories:  Changes in 2.04.
* _flsbuf:                               Changes in 2.03.
* _flush_disk_cache:                     Changes in 2.02.
* _get_dos_version, recognise FreeDOS:   Changes in 2.04.
* _get_fat_size:                         Changes in 2.04.
* _get_fs_type:                          Changes in 2.04.
* _get_volume_info, and invalid drives:  Changes in 2.03.
* _go32_dpmi_allocate_real_mode_callback_iret: Changes in 2.03.
* _go32_dpmi_free_real_mode_callback:    Changes in 2.01.
* _go32_dpmi_lock_code:                  Changes in 2.02.
* _go32_dpmi_lock_data:                  Changes in 2.02.
* _invent_inode, and FAT32:              Changes in 2.04.
* _is_cdrom_drive:                       Changes in 2.04.
* _is_DOS83:                             Changes in 2.04.
* _is_exec:                              Changes in 2.01.
* _is_fat32:                             Changes in 2.04.
* _is_ram_drive:                         Changes in 2.04.
* _lfn_gen_short_name:                   Changes in 2.02.
* _media_type:                           Changes in 2.04.
* _open:                                 Changes in 2.02.
* _open, and FAT32:                      Changes in 2.04.
* _open, and Windows 2000/XP:            Changes in 2.04.
* _os_trueversion, added to the library: Changes in 2.04.
* _osmajor:                              Changes in 2.02.
* _osminor:                              Changes in 2.02.
* _put_path:                             Changes in 2.03.
* _put_path, and /dev directory on disk: Changes in 2.04.
* _put_path, and the /dev/env directory: Changes in 2.04.
* _put_path2:                            Changes in 2.03.
* _rdtsc, new timer function:            Changes in 2.04.
* _read:                                 Changes in 2.02.
* _rename:                               Changes in 2.03.
* _rename, and Windows 2000:             Changes in 2.04.
* _rename, change letter-case of a file name: Changes in 2.04.
* _rename, on Windows ME:                Changes in 2.04.
* _set_break_DPMI, and Windows 2000/XP breakpoints: Changes in 2.04.
* _strtold, and the decimal point:       Changes in 2.04.
* _strtold, Inf and NaN in input:        Changes in 2.04.
* _sys_siglist:                          Changes in 2.02.
* _tolower:                              Changes in 2.04.
* _toupper:                              Changes in 2.04.
* _truename:                             Changes in 2.02.
* _truename_sfn:                         Changes in 2.04.
* _use_lfn:                              Changes in 2.02.
* _USE_LFN, and invalid drives:          Changes in 2.03.
* _use_lfn, and invalid drives:          Changes in 2.03.
* _v2_prog_type:                         Changes in 2.02.
* _write:                                Changes in 2.02.
* _write, security fix:                  Changes in 2.04.
* a64l, added:                           Changes in 2.04.
* access <1>:                            Changes in 2.02.
* access:                                Changes in 2.01.
* access, loss of FileFind handle:       Changes in 2.03.
* acos:                                  Changes in 2.03.
* acos, accuracy of emulation:           Changes in 2.03.
* acosh, Inf orNaN operands in emulator: Changes in 2.03.
* address wrap crashes on Windows NT, 2000, XP: Changes in 2.04.
* alarm:                                 Changes in 2.03.
* array of DPMI memory block sizes:      Changes in 2.04.
* asin, accuracy of emulation:           Changes in 2.03.
* asinh, Inf orNaN operands in emulator: Changes in 2.03.
* assert:                                Changes in 2.02.
* assert, and function name:             Changes in 2.04.
* Assertions:                            Development.
* atan, accuracy of emulation:           Changes in 2.03.
* atan2, accuracy of emulation:          Changes in 2.03.
* atoi, and 8-bit characters:            Changes in 2.04.
* atol, and 8-bit characters:            Changes in 2.04.
* atoll:                                 Changes in 2.04.
* basename:                              Changes in 2.02.
* Bash:                                  Changes in 2.03.
* bash:                                  Changes in 2.02.
* bdosptr:                               Changes in 2.01.
* bin2h:                                 Changes in 2.03.
* bioscom:                               Changes in 2.02.
* blkcnt_t:                              Changes in 2.04.
* blksize_t:                             Changes in 2.04.
* bzip2 archives:                        Changes in 2.04.
* C libraries and profiling:             Changes in 2.04.
* C99 compliance, locale.h:              Changes in 2.04.
* C99 compliance, mathematics:           Changes in 2.04.
* C99 compliance, new header files:      Changes in 2.04.
* C99 compliance, struct lconv:          Changes in 2.04.
* cbrt:                                  Changes in 2.03.
* ceil, for negative arguments, emulation: Changes in 2.03.
* closedir, does not lose search handles: Changes in 2.02.
* CMDLINE, environment variable:         Changes in 2.04.
* coff2exe, documentation:               Changes in 2.04.
* Command lines, longer than 126 characters: Features.
* command-line arguments, globbing:      Changes in 2.03.
* Condition codes and FP emulation:      Changes in 2.03.
* confstr, added:                        Changes in 2.04.
* conio.h:                               Changes in 2.02.
* Converting text files:                 Features.
* coping with restarted programs:        Development.
* Core dumps:                            Features.
* cos, emulation for large arguments:    Changes in 2.03.
* cp, and Windows 2000/XP:               Changes in 2.04.
* Crashes due to SIGFPE, on Windows 9X:  Changes in 2.03.
* crt0.h, added new flag to control wrap: Changes in 2.04.
* crt0.h, declaration of memory size array: Changes in 2.04.
* crt0.S, and long section names:        Changes in 2.03.
* ctime <1>:                             Changes in 2.03.
* ctime:                                 Changes in 2.02.
* ctime, and calls to getenv:            Changes in 2.04.
* dbgcom.c:                              Changes in 2.02.
* debug support, and file redirection:   Changes in 2.03.
* debug support, and floating-point code: Changes in 2.03.
* debug support, and signals:            Changes in 2.03.
* debug support, documentation:          Changes in 2.03.
* debuggers, and exceptions 18 and 19:   Changes in 2.04.
* debuggers, and SIGQUIT:                Changes in 2.03.
* debuggers, and the stack length:       Changes in 2.03.
* debuggers, and the transfer buffer size: Changes in 2.03.
* Debugging, post-mortem:                Features.
* delay:                                 Changes in 2.02.
* delay, and Windows 2000 and XP:        Changes in 2.04.
* Device I/O, emulation:                 Features.
* Device names, Unix:                    Features.
* difftime:                              Changes in 2.02.
* dir.h:                                 Changes in 2.01.
* dirname:                               Changes in 2.02.
* disable:                               Changes in 2.02.
* div, and negative arguments:           Changes in 2.04.
* djasm <1>:                             Changes in 2.01.
* djasm:                                 Changes in 2.02.
* djasm, documentation:                  Changes in 2.04.
* djasm, double-precision shift:         Changes in 2.04.
* djasm, double-precision shift reinstated: Changes in 2.04.
* djasm, enumeration type:               Changes in 2.04.
* djasm, ISO dates:                      Changes in 2.04.
* djasm, new executable header offset:   Changes in 2.04.
* djasm, rotate instructions:            Changes in 2.04.
* djasm, shift instructions:             Changes in 2.04.
* djasm, space allocation with .union:   Changes in 2.04.
* djasm, wbinvd instruction:             Changes in 2.04.
* DJGPP utilities:                       Features.
* DJGPP, environment variable and memory corruption: Changes in 2.04.
* djgpp.djl, and long section names:     Changes in 2.03.
* DJGPP.ENV:                             DJGPP.ENV.
* djgpp.env:                             Changes in 2.02.
* djgpp.env, ls color settings for symlinks added: Changes in 2.04.
* djmerge, preserves file's time stamp:  Changes in 2.04.
* djsplit, preserves file's time stamp:  Changes in 2.04.
* djtar, and single-span spanned archives: Changes in 2.04.
* djtar, and the tarchange.lst file:     Changes in 2.03.
* djtar, DOS batch file conversion:      Changes in 2.04.
* djtar, file-name conversions:          Changes in 2.03.
* djtar, multiple -o and -e options:     Changes in 2.04.
* djtar, new option -e:                  Changes in 2.04.
* djtar, support for unpacking bzip2 archives: Changes in 2.04.
* dlclose added:                         Changes in 2.04.
* dlerror added:                         Changes in 2.04.
* dlopen added:                          Changes in 2.04.
* dlsym added:                           Changes in 2.04.
* doprnt:                                Changes in 2.03.
* dos.h:                                 Changes in 2.01.
* doscan:                                Changes in 2.01.
* dosexterr:                             Changes in 2.04.
* dosmemput:                             Changes in 2.01.
* dostrerr:                              Changes in 2.04.
* DPMI memory block allocation sizes dynamic: Changes in 2.04.
* drand48, increased speed:              Changes in 2.04.
* dtou:                                  Changes in 2.03.
* dtou, new command-line options:        Changes in 2.04.
* dtou, on Windows 2000 and XP:          Changes in 2.04.
* dup, duplicates FSEXT hooks:           Changes in 2.04.
* dup2, duplicates FSEXT hooks:          Changes in 2.04.
* dxe3gen added:                         Changes in 2.04.
* dxe3res added:                         Changes in 2.04.
* dxegen, documentation:                 Changes in 2.04.
* dxeload:                               Changes in 2.01.
* echo <1>:                              Changes in 2.01.
* echo:                                  Changes in 2.02.
* ecvt:                                  Changes in 2.02.
* ecvtbuf:                               Changes in 2.02.
* edata, polluting the namespace unnecessarily: Changes in 2.04.
* edebug <1>:                            Changes in 2.02.
* edebug <2>:                            Changes in 2.01.
* edebug:                                Changes in 2.02.
* edebug32, and Windows 2000/XP hardware breakpoints: Changes in 2.04.
* edebug32, documentation:               Changes in 2.04.
* Emacs dumping, and library functions:  Features.
* emacs, and DJGPP-style indentation:    Development.
* Emacs, warnings from GDB:              Changes in 2.03.
* emu387:                                Changes in 2.02.
* emu387.dxe:                            Changes in 2.03.
* emu387.dxe and profiling:              Changes in 2.04.
* emu387.dxe, and FSQRT instruction:     Changes in 2.03.
* emu387.dxe, comparison, addition and subtraction: Changes in 2.03.
* emu387.dxe, on Windows:                Changes in 2.03.
* enable:                                Changes in 2.02.
* end, polluting the namespace unnecessarily: Changes in 2.04.
* Environment Variables:                 DJGPP.ENV.
* environment variables, in file names:  Changes in 2.03.
* erand48, increased speed:              Changes in 2.04.
* errno:                                 Changes in 2.02.
* errno, and C99 compliance:             Changes in 2.04.
* errno, set by math functions in libc.a: Changes in 2.03.
* etext, polluting the namespace unnecessarily: Changes in 2.04.
* exe2coff, documentation:               Changes in 2.04.
* exit <1>:                              Changes in 2.01.
* exit:                                  Changes in 2.02.
* Exit status reporting:                 Features.
* exp10:                                 Changes in 2.03.
* exp2:                                  Changes in 2.03.
* expm1:                                 Changes in 2.03.
* fchdir:                                Changes in 2.04.
* fchmod:                                Changes in 2.04.
* fchown:                                Changes in 2.04.
* fclose, and directories:               Changes in 2.04.
* fcntl:                                 Changes in 2.01.
* fcntl commands F_GETFD and F_SETFD:    Changes in 2.04.
* fcntl commands F_GETFL and F_SETFL:    Changes in 2.04.
* fcntl, added file locking:             Changes in 2.04.
* FCOS instruction, emulation for large arguments: Changes in 2.03.
* fcvt:                                  Changes in 2.02.
* fcvtbuf:                               Changes in 2.02.
* fdopen, and directories:               Changes in 2.04.
* fdopen, no longer uses _IOAPPEND flag: Changes in 2.04.
* fflush:                                Changes in 2.02.
* fflush, no longer uses _IOAPPEND flag: Changes in 2.04.
* ffs:                                   Changes in 2.02.
* fgetpos:                               Changes in 2.04.
* file locking functions:                Changes in 2.04.
* FILE objects, allocation:              Changes in 2.03.
* File System Extensions, and chmod:     Changes in 2.04.
* File System Extensions, and chown:     Changes in 2.04.
* File System Extensions, and large numbers of file descriptors: Changes in 2.04.
* Filesystem extensions facility:        Features.
* findfirst <1>:                         Changes in 2.04.
* findfirst:                             Changes in 2.01.
* flock:                                 Changes in 2.04.
* flsbuf, no longer uses _IOAPPEND flag: Changes in 2.04.
* flushing buffered output:              Changes in 2.03.
* fmod, emulation for negative arguments: Changes in 2.03.
* fnsplit:                               Changes in 2.02.
* fopen, and directories:                Changes in 2.04.
* fopen, append mode:                    Changes in 2.04.
* fopen, no longer uses _IOAPPEND flag:  Changes in 2.04.
* FP emulation, abnormal results:        Changes in 2.03.
* FP emulation, and Cn condition codes:  Changes in 2.03.
* FP emulation, and SIGFPE:              Changes in 2.03.
* FP emulation, on Windows:              Changes in 2.03.
* FP emulator, and FSQRT instruction:    Changes in 2.03.
* FP emulator, comparison, addition and subtraction: Changes in 2.03.
* FPATAN instruction, emulation, accuracy: Changes in 2.03.
* fpclassify added:                      Changes in 2.04.
* FPREM/FPREM1 instruction, emulation for large arguments: Changes in 2.03.
* fprintf <1>:                           Changes in 2.02.
* fprintf:                               Changes in 2.03.
* fprintf, and negative zero:            Changes in 2.03.
* fprintf, append mode:                  Changes in 2.04.
* FPTAN instruction, emulation, argument out of range: Changes in 2.03.
* fputc:                                 Changes in 2.03.
* fputc, append mode:                    Changes in 2.04.
* fputs:                                 Changes in 2.03.
* fread:                                 Changes in 2.03.
* fread, return value documented:        Changes in 2.02.
* free:                                  Changes in 2.02.
* freopen, and directories:              Changes in 2.04.
* freopen, and reusage of same handle:   Changes in 2.04.
* freopen, append mode:                  Changes in 2.04.
* freopen, no longer uses _IOAPPEND flag: Changes in 2.04.
* freopen, read/write access to files:   Changes in 2.03.
* FRNDINT instruction, emulation for negative arguments: Changes in 2.03.
* FSCALE instruction, emulation, handles overflow: Changes in 2.03.
* fscanf:                                Changes in 2.03.
* fscanf, and octal conversions:         Changes in 2.03.
* fscanf, pointer conversions:           Changes in 2.03.
* fsdb:                                  Changes in 2.01.
* fsdb, and Windows 2000/XP hardware breakpoints: Changes in 2.04.
* fsdb, check for EXE extension:         Changes in 2.04.
* fsdb, documentation:                   Changes in 2.04.
* fsdb, Step Over bug:                   Changes in 2.03.
* fsdb, support for SIGQUIT:             Changes in 2.03.
* fseek, and directories:                Changes in 2.04.
* fsetpos, return value:                 Changes in 2.03.
* FSIN instruction, emulation for large arguments: Changes in 2.03.
* FSINCOS instruction, emulation for large arguments: Changes in 2.03.
* FSQRT instruction, emulation for infinite arguments: Changes in 2.03.
* FST/FSTP instructions, emulation of, over/underflow: Changes in 2.03.
* FST/FSTP instructions, emulation of, rounding: Changes in 2.03.
* fstat:                                 Changes in 2.02.
* fstat, and block size:                 Changes in 2.04.
* fstat, and directories:                Changes in 2.04.
* fstat, and inodes:                     Changes in 2.04.
* fstat, and Windows 2000/XP:            Changes in 2.04.
* fstatvfs:                              Changes in 2.04.
* fsync, and directories:                Changes in 2.04.
* ftell, and directories:                Changes in 2.04.
* ftruncate, and directories:            Changes in 2.04.
* ftruncate, and file pointer position:  Changes in 2.03.
* fwrite:                                Changes in 2.03.
* fwrite, append mode:                   Changes in 2.04.
* fwrite, return value documented:       Changes in 2.02.
* FXCH instruction, emulation, abnormal operands: Changes in 2.03.
* FYL2X instruction, emulation pops the stack: Changes in 2.03.
* gcc.opt, and profiling:                Changes in 2.04.
* gcvt:                                  Changes in 2.02.
* GDB, debugging Emacs:                  Changes in 2.03.
* getc:                                  Changes in 2.03.
* getch:                                 Changes in 2.03.
* getche:                                Changes in 2.03.
* getcwd, and Windows 2000/XP long named directories: Changes in 2.04.
* gethostname:                           Changes in 2.02.
* getitimer:                             Changes in 2.03.
* getitimer, and system clock granularity: Changes in 2.03.
* getkey:                                Changes in 2.02.
* getlogin, and USERNAME variable:       Changes in 2.04.
* getmntent:                             Changes in 2.02.
* getmntent, and Windows 2000/XP:        Changes in 2.04.
* getopt:                                Changes in 2.01.
* getopt, enhanced for POSIX compliance: Changes in 2.04.
* getrusage:                             Changes in 2.01.
* gettexinfo:                            Changes in 2.03.
* gettext, name clash, conio.h vs GNU Gettext: Changes in 2.04.
* getxkey:                               Changes in 2.02.
* glob <1>:                              Changes in 2.02.
* glob <2>:                              Changes in 2.01.
* glob:                                  Changes in 2.02.
* glob, and mixed-case letters in file names: Changes in 2.03.
* glob, fixed buffer overrun:            Changes in 2.04.
* Globbing:                              Features.
* go32-v2 <1>:                           Changes in 2.01.
* go32-v2:                               Changes in 2.02.
* go32-v2, documentation:                Changes in 2.04.
* gxx <1>:                               Changes in 2.02.
* gxx:                                   Changes in 2.01.
* gxx, and missing libgpp.a:             Changes in 2.03.
* header files and GCC:                  Changes in 2.04.
* Header files, compatibility:           Features.
* hidden features, documentation:        Changes in 2.03.
* HUGE_VALF:                             Changes in 2.04.
* HUGE_VALL:                             Changes in 2.04.
* imaxabs:                               Changes in 2.04.
* imaxdiv:                               Changes in 2.04.
* indent, reindenting to DJGPP style:    Development.
* indentation standards:                 Development.
* info/dir.txi:                          Changes in 2.02.
* inp:                                   Changes in 2.01.
* inpw:                                  Changes in 2.01.
* insque:                                Changes in 2.02.
* interval timers and uclock:            Changes in 2.03.
* interval timers, small intervals:      Changes in 2.03.
* ioctl:                                 Changes in 2.01.
* ioctl, emulation:                      Features.
* isatty, and invalid file descriptors:  Changes in 2.04.
* isblank:                               Changes in 2.04.
* kill, signals to other programs:       Changes in 2.03.
* l64a, added:                           Changes in 2.04.
* lchown, added to the library:          Changes in 2.04.
* lconv:                                 Changes in 2.02.
* ldexp:                                 Changes in 2.01.
* ldiv, and negative arguments:          Changes in 2.04.
* lfilelength, and FAT32:                Changes in 2.04.
* lfn:                                   Changes in 2.01.
* LFN API:                               Features.
* LFN support and invalid drives:        Changes in 2.03.
* lib/djgpp.djl, polluting the namespace unnecessarily: Changes in 2.04.
* libc and profiling:                    Changes in 2.04.
* libc.tex:                              Changes in 2.02.
* libc/dosio.h, append mode:             Changes in 2.04.
* libc/file.h, _IOAPPEND flag deleted:   Changes in 2.04.
* libc/stubs.h:                          Development.
* libemu.a, and FSQRT instruction:       Changes in 2.03.
* libemu.a, comparison, addition and subtraction: Changes in 2.03.
* libemu.a, missing npxsetup.o:          Changes in 2.03.
* libemu.a, on Windows:                  Changes in 2.03.
* libm and profiling:                    Changes in 2.04.
* libm.a:                                Changes in 2.01.
* Library, compatibility:                Features.
* libstdcxx.a, and gxx:                  Changes in 2.03.
* link, and Windows 2000/XP:             Changes in 2.04.
* linker script, polluting the namespace unnecessarily: Changes in 2.04.
* linking programs on Windows 2000:      Changes in 2.04.
* Links, emulation:                      Features.
* lldiv, and negative arguments:         Changes in 2.04.
* llockf:                                Changes in 2.04.
* llseek, and FAT32:                     Changes in 2.04.
* localtime:                             Changes in 2.03.
* lock:                                  Changes in 2.02.
* lock64:                                Changes in 2.04.
* lockf:                                 Changes in 2.04.
* Long command lines:                    Features.
* Long file name support:                Features.
* lowvideo:                              Changes in 2.03.
* lseek, and directories:                Changes in 2.04.
* lstat, added to the library:           Changes in 2.04.
* lstat, and block size:                 Changes in 2.04.
* Make, crashes:                         Changes in 2.03.
* make, no longer fails on large jobs due to selector leaks: Changes in 2.04.
* make, support for Unix features:       Features.
* mallinfo, added:                       Changes in 2.04.
* malloc:                                Changes in 2.02.
* malloc, and huge allocation requests:  Changes in 2.04.
* malloc, debug facilities:              Changes in 2.04.
* malloc_debug, added:                   Changes in 2.04.
* malloc_verify, added:                  Changes in 2.04.
* mallocmap, added:                      Changes in 2.04.
* math functions, improved versions:     Changes in 2.03.
* math_errhandling added:                Changes in 2.04.
* mcount.c:                              Changes in 2.02.
* memalign, added to the library:        Changes in 2.04.
* memchr:                                Changes in 2.02.
* memicmp:                               Changes in 2.02.
* memicmp, included in the library:      Changes in 2.03.
* merge:                                 Changes in 2.02.
* mkdir, on Windows ME:                  Changes in 2.04.
* mkdoc, clearer style for portability information: Changes in 2.04.
* mkdoc, support for multiple versions of standards: Changes in 2.04.
* mkstemp:                               Changes in 2.02.
* mktime <1>:                            Changes in 2.03.
* mktime:                                Changes in 2.02.
* mntent:                                Changes in 2.01.
* moncontrol, added:                     Changes in 2.04.
* monstartup, added:                     Changes in 2.04.
* multibyte:                             Changes in 2.02.
* namespace std support:                 Changes in 2.04.
* NAN:                                   Changes in 2.04.
* nan added:                             Changes in 2.04.
* nanf:                                  Changes in 2.02.
* nanf added:                            Changes in 2.04.
* nanl added:                            Changes in 2.04.
* NDOS, support for long command lines:  Changes in 2.04.
* negative zero, printing:               Changes in 2.03.
* nested DJGPP program on Windows 2000:  Changes in 2.04.
* Numeric exceptions, masked:            Changes in 2.02.
* O_NOFOLLOW, new flag accepted by open: Changes in 2.04.
* O_NOLINK, new flag accepted by open:   Changes in 2.04.
* O_TEMPORARY, new flag accepted by open: Changes in 2.04.
* open:                                  Changes in 2.01.
* open, and directories:                 Changes in 2.04.
* open, and Windows 2000/XP:             Changes in 2.04.
* open, race conditions:                 Changes in 2.02.
* open, supports symlinks:               Changes in 2.04.
* open, supports temporary files:        Changes in 2.04.
* open, when there are no more file handles: Changes in 2.03.
* opendir:                               Changes in 2.02.
* opendir, does not lose search handles: Changes in 2.02.
* Opening directories with open:         Changes in 2.04.
* outp:                                  Changes in 2.01.
* outportsb:                             Changes in 2.02.
* outportsl:                             Changes in 2.02.
* outportsw:                             Changes in 2.02.
* outpw:                                 Changes in 2.01.
* Overflow in emulation of arithmetic FP instructions: Changes in 2.03.
* PATH separator, Unix-style:            Features.
* pathconf:                              Changes in 2.02.
* pc.h:                                  Changes in 2.01.
* PC98, SIGINT and SIGQUIT:              Changes in 2.03.
* pclose:                                Changes in 2.02.
* pclose, some extensions excluded from PATH search: Changes in 2.04.
* perror:                                Changes in 2.04.
* perror, and C99 compliance:            Changes in 2.04.
* pipe, now implemented in the library:  Changes in 2.04.
* popen <1>:                             Changes in 2.02.
* popen:                                 Changes in 2.01.
* popen, some extensions excluded from PATH search: Changes in 2.04.
* Post-mortem debugging:                 Features.
* pow:                                   Changes in 2.04.
* powi:                                  Changes in 2.03.
* PRI:                                   Changes in 2.04.
* printf <1>:                            Changes in 2.02.
* printf <2>:                            Changes in 2.03.
* printf <3>:                            Changes in 2.01.
* printf:                                Changes in 2.02.
* printf, and C99 conversion qualifiers: Changes in 2.04.
* printf, and negative zero:             Changes in 2.03.
* printf, and the decimal point:         Changes in 2.04.
* profiling <1>:                         Changes in 2.02.
* profiling:                             Changes in 2.03.
* profiling, polluting the namespace unnecessarily: Changes in 2.04.
* psignal:                               Changes in 2.02.
* putc:                                  Changes in 2.03.
* putenv, minor changes for POSIX compliance: Changes in 2.04.
* putpath:                               Changes in 2.02.
* pwrite:                                Changes in 2.04.
* qsort:                                 Changes in 2.02.
* rand, increased period:                Changes in 2.04.
* rand48:                                Changes in 2.03.
* rawclock:                              Changes in 2.02.
* read, and directories:                 Changes in 2.04.
* readdir <1>:                           Changes in 2.02.
* readdir <2>:                           Changes in 2.01.
* readdir:                               Changes in 2.02.
* readdir, reports file types:           Changes in 2.04.
* readlink, added to the library:        Changes in 2.04.
* readv:                                 Changes in 2.04.
* realloc, crashes when memory is exhausted: Changes in 2.03.
* realpath, added to library to increase POSIX compliance: Changes in 2.04.
* recode, on Windows 2000 and XP:        Changes in 2.04.
* redir <1>:                             Changes in 2.03.
* redir:                                 Changes in 2.02.
* redir, and FP emulation:               Changes in 2.03.
* Redirecting stderr:                    Features.
* remove, and write-protected floppies:  Changes in 2.04.
* rename <1>:                            Changes in 2.02.
* rename <2>:                            Changes in 2.03.
* rename:                                Changes in 2.02.
* rename, and moving directories into themselves: Changes in 2.04.
* rename, and Windows 2000:              Changes in 2.04.
* rename, change letter-case of a file name: Changes in 2.04.
* rename, errno value when the file is open: Changes in 2.03.
* rename, on Windows ME:                 Changes in 2.04.
* response file, ^Z at the end:          Changes in 2.03.
* rewind, and directories:               Changes in 2.04.
* rewinddir, and . and .. entries:       Changes in 2.02.
* rewinddir, does not lose search handles: Changes in 2.02.
* s_ceil:                                Changes in 2.02.
* s_floor:                               Changes in 2.02.
* S_IFLNK, added to the library:         Changes in 2.04.
* S_ISLNK, added to the library:         Changes in 2.04.
* sbrk, changed allocation size algorithm: Changes in 2.04.
* sbrk, fixed address wrap where illegal: Changes in 2.04.
* scalbn:                                Changes in 2.01.
* scanf <1>:                             Changes in 2.02.
* scanf:                                 Changes in 2.03.
* scanf, and assignment suppression:     Changes in 2.04.
* scanf, and C99 conversion qualifiers:  Changes in 2.04.
* scanf, and octal conversions:          Changes in 2.03.
* scanf, and the decimal point:          Changes in 2.04.
* scanf, and the X type conversion and C99: Changes in 2.04.
* scanf, pointer conversions:            Changes in 2.03.
* SCN:                                   Changes in 2.04.
* ScreenAttrib:                          Changes in 2.03.
* ScreenGetChar:                         Changes in 2.01.
* search for executables, some extensions omitted: Changes in 2.04.
* searchpath, and file names with slashes: Changes in 2.03.
* seekdir, and . and .. entries:         Changes in 2.02.
* select:                                Changes in 2.02.
* select, and directories:               Changes in 2.04.
* select, and termios emulation:         Changes in 2.04.
* setenv, minor changes for POSIX compliance: Changes in 2.04.
* setitimer <1>:                         Changes in 2.03.
* setitimer:                             Changes in 2.02.
* setitimer, and system clock granularity: Changes in 2.03.
* setitimer, and zero it_interval.tv_usec: Changes in 2.04.
* setitimer, when called with NULL argument: Changes in 2.03.
* setjmp, also a macro:                  Changes in 2.04.
* setmode, and termios:                  Changes in 2.03.
* sf_ceil:                               Changes in 2.02.
* sf_floor:                              Changes in 2.02.
* sigaction:                             Changes in 2.01.
* sigaddset:                             Changes in 2.02.
* SIGALRM:                               Changes in 2.02.
* sigdelset:                             Changes in 2.02.
* sigemptyset:                           Changes in 2.02.
* sigfillset:                            Changes in 2.02.
* SIGFPE and FP emulation:               Changes in 2.03.
* SIGFPE, on Windows 9X:                 Changes in 2.03.
* SIGINT:                                Changes in 2.01.
* SIGINT and SIGQUIT, PC98:              Changes in 2.03.
* sigismember:                           Changes in 2.02.
* sigpending:                            Changes in 2.02.
* sigprocmask:                           Changes in 2.02.
* SIGPROF:                               Changes in 2.02.
* sin, emulation for large arguments:    Changes in 2.03.
* sincos:                                Changes in 2.03.
* sincos, emulation for large arguments: Changes in 2.03.
* snprintf:                              Changes in 2.04.
* source indentation:                    Development.
* spawn* functions, invoke Windows programs with long command lines: Changes in 2.04.
* spawn*, invoking .com programs:        Changes in 2.04.
* spawn*, no longer leak selectors on Windows and DOSEmu: Changes in 2.04.
* spawn, some extensions excluded from PATH search: Changes in 2.04.
* split:                                 Changes in 2.02.
* Splitting large files:                 Features.
* sprintf <1>:                           Changes in 2.03.
* sprintf:                               Changes in 2.02.
* sprintf, and negative zero:            Changes in 2.03.
* sqrt, emulation for infinite arguments: Changes in 2.03.
* srand <1>:                             Changes in 2.03.
* srand:                                 Changes in 2.02.
* srand48:                               Changes in 2.03.
* sscanf:                                Changes in 2.03.
* sscanf, and octal conversions:         Changes in 2.03.
* sscanf, pointer conversions:           Changes in 2.03.
* ssize_t:                               Changes in 2.04.
* stack dump, when aborted or crashed:   Changes in 2.02.
* stackavail:                            Changes in 2.02.
* startup code, and crashes on Windows:  Changes in 2.04.
* startup code, and memory corruption:   Changes in 2.04.
* startup code, supports long command lines passed by Windows programs: Changes in 2.04.
* stat <1>:                              Changes in 2.03.
* stat <2>:                              Changes in 2.02.
* stat <3>:                              Changes in 2.01.
* stat:                                  Changes in 2.02.
* stat, and block size:                  Changes in 2.04.
* stat, and inodes:                      Changes in 2.04.
* statfs:                                Changes in 2.02.
* statfs, and FAT32:                     Changes in 2.04.
* statvfs:                               Changes in 2.04.
* stdarg.h, implemented with GCC builtins: Changes in 2.04.
* stdaux:                                Changes in 2.01.
* stdprn:                                Changes in 2.01.
* stpncpy, added to the library:         Changes in 2.04.
* strerror, and C99 compliance:          Changes in 2.04.
* strftime, and the x type conversion:   Changes in 2.04.
* strftime, and the X type conversion:   Changes in 2.04.
* strftime, and z format:                Changes in 2.04.
* strlcat:                               Changes in 2.04.
* strlcpy:                               Changes in 2.04.
* strtod, and the decimal point:         Changes in 2.04.
* strtod, Inf and NaN in input:          Changes in 2.04.
* strtof:                                Changes in 2.04.
* strtof, and the decimal point:         Changes in 2.04.
* strtof, Inf and NaN in input:          Changes in 2.04.
* strtoimax:                             Changes in 2.04.
* strtol, and 8-bit characters:          Changes in 2.04.
* strtold:                               Changes in 2.04.
* strtold, and the decimal point:        Changes in 2.04.
* strtold, Inf and NaN in input:         Changes in 2.04.
* strtoll, and 8-bit characters:         Changes in 2.04.
* strtoul, and 8-bit characters:         Changes in 2.04.
* strtoull, and 8-bit characters:        Changes in 2.04.
* strtoumax:                             Changes in 2.04.
* struct dirent, d_type member:          Changes in 2.04.
* struct group, added gr_passwd field:   Changes in 2.04.
* struct lconv:                          Changes in 2.04.
* struct passwd, added pw_gecos field:   Changes in 2.04.
* struct passwd, added pw_passwd field:  Changes in 2.04.
* struct stat, and blksize_t:            Changes in 2.04.
* stub:                                  Changes in 2.02.
* stub.asm:                              Changes in 2.02.
* stubedit:                              Changes in 2.02.
* stubedit, documentation:               Changes in 2.04.
* stubify:                               Changes in 2.01.
* stubify, ability to set stub parameters: Changes in 2.04.
* stubify, and Windows 2000:             Changes in 2.04.
* stubify, documentation:                Changes in 2.04.
* stubify, on Windows ME:                Changes in 2.04.
* stubs:                                 Development.
* symify, and long file/function names:  Changes in 2.03.
* symify, crashes for large programs:    Changes in 2.04.
* symify, documentation:                 Changes in 2.04.
* symlink:                               Changes in 2.02.
* symlink, source and target in different directories: Changes in 2.03.
* symlink, supports symlinks:            Changes in 2.04.
* Symlinks, emulation:                   Features.
* syms_init, crashes for large programs: Changes in 2.04.
* sync:                                  Changes in 2.02.
* system <1>:                            Changes in 2.01.
* system:                                Changes in 2.02.
* system function, extended functionality: Features.
* system, and Ctrl-Z in termios:         Changes in 2.03.
* system, and pipe symbols:              Changes in 2.03.
* system, and redirection:               Changes in 2.03.
* system, invokes Windows programs with long command lines: Changes in 2.04.
* system, no longer leaks selectors on Windows and DOSEmu: Changes in 2.04.
* system, some extensions excluded from PATH search: Changes in 2.04.
* tan, emulation for large arguments:    Changes in 2.03.
* tan, emulation, argument out of range: Changes in 2.03.
* tcflush:                               Changes in 2.03.
* tcgetpgrp, added:                      Changes in 2.03.
* tcsetattr:                             Changes in 2.03.
* tcsetpgrp, added:                      Changes in 2.03.
* template instantiation, improved support: Changes in 2.03.
* tempnam:                               Changes in 2.02.
* termios:                               Changes in 2.03.
* termios, and binary I/O:               Changes in 2.03.
* termios, and buffered stdio:           Changes in 2.03.
* termios, and TAB expansion:            Changes in 2.03.
* termios, input and SIGINT and SIGQUIT: Changes in 2.03.
* textbackground:                        Changes in 2.03.
* textcolor:                             Changes in 2.03.
* time stamp of directories, changing:   Changes in 2.04.
* timer tick frequency, and setitimer function: Changes in 2.03.
* Timing programs:                       Features.
* tmpfile:                               Changes in 2.02.
* tmpfile, race conditions:              Changes in 2.02.
* tmpfile, when file handles are exhausted: Changes in 2.03.
* tolower:                               Changes in 2.03.
* touch, on Windows 2000 and XP:         Changes in 2.04.
* toupper:                               Changes in 2.03.
* TZ:                                    Changes in 2.03.
* tzname:                                Changes in 2.02.
* uclock:                                Changes in 2.03.
* uclock, on Windows:                    Changes in 2.03.
* uclock, uses rdtsc on Windows NT, 2000, XP: Changes in 2.04.
* uname, CPU type detection:             Changes in 2.04.
* uname, support for Pentium 4:          Changes in 2.04.
* Underflow in emulation of arithmetic FP instructions: Changes in 2.03.
* Unix compatibility:                    Features.
* Unix device names <1>:                 Changes in 2.02.
* Unix device names:                     Features.
* unlock:                                Changes in 2.02.
* unlock64:                              Changes in 2.04.
* unnormal numbers, printing:            Changes in 2.03.
* Unpacking compressed archives:         Features.
* unsetenv, added:                       Changes in 2.04.
* Updating files:                        Features.
* utilities, DJGPP-specific:             Features.
* utime, on Windows 2000 and XP:         Changes in 2.04.
* utod:                                  Changes in 2.03.
* utod, on Windows 2000 and XP:          Changes in 2.04.
* v2loadimage, long command line support: Changes in 2.04.
* va_alist, implemented with GCC builtins: Changes in 2.04.
* va_arg, implemented with GCC builtins: Changes in 2.04.
* va_dcl, implemented with GCC builtins: Changes in 2.04.
* va_end, implemented with GCC builtins: Changes in 2.04.
* va_list, implemented with GCC builtins: Changes in 2.04.
* va_start:                              Changes in 2.01.
* va_start, implemented with GCC builtins: Changes in 2.04.
* valloc, added to the library:          Changes in 2.04.
* varargs.h, implemented with GCC builtins: Changes in 2.04.
* vfprintf:                              Changes in 2.03.
* vfscanf:                               Changes in 2.03.
* vfscanf, and octal conversions:        Changes in 2.03.
* vfscanf, pointer conversions:          Changes in 2.03.
* vprintf:                               Changes in 2.03.
* vscanf:                                Changes in 2.03.
* vscanf, and octal conversions:         Changes in 2.03.
* vscanf, pointer conversions:           Changes in 2.03.
* vsnprintf:                             Changes in 2.04.
* vsprintf:                              Changes in 2.03.
* vsscanf:                               Changes in 2.03.
* vsscanf, and octal conversions:        Changes in 2.03.
* vsscanf, pointer conversions:          Changes in 2.03.
* wchar_t type, and Windows programs:    Changes in 2.03.
* wctype.h, pre-processor and compilation errors: Changes in 2.03.
* Wildcards:                             Features.
* wildcards:                             Changes in 2.01.
* write <1>:                             Changes in 2.01.
* write:                                 Changes in 2.02.
* write, and directories:                Changes in 2.04.
* write, append mode:                    Changes in 2.04.
* write, security fix and increased POSIX compliance: Changes in 2.04.
* writev:                                Changes in 2.04.



Tag Table:
Node: Top78
Node: Introduction882
Node: What Changed998
Node: Changes in 2.011252
Node: Changes in 2.024121
Node: Changes in 2.0317267
Node: Changes in 2.0439453
Node: Known Bugs68996
Node: Known Anti-Bugs69110
Node: Hidden Features69237
Node: Features69806
Ref: Features-Footnote-194672
Node: DJGPP.ENV94898
Node: Development96813
Node: Index106703

End Tag Table
