www.delorie.com/djgpp/doc/kb/kb_4.html   search  
DJGPP Knowledge Base

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 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.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Nov 2004