Known DJGPP problems on Windows 2000 and XP

______________________________________________________________________________

Problem: Many utilities (strip, ar) fail with the message:

c:/djgpp/bin/strip.exe: invd.exe: rename: Not enough memory (ENOMEM)

This is a problem in the long file name (LFN) support on Windows 2000 – if the current file exists the return code is not correct.

Workaround: set LFN=n, or use NT LFN TSR

Fix: libc/ansi/stdio/_rename.c (cvs revision 1.8), V2.03 refresh.

______________________________________________________________________________

Problem: Nested programs (e.g. make/gcc/cc1) cause NTVDM.exe to crash or silently exit without finishing.

Workaround: Patch NTVDM.EXE (source or binary – only for Windows 2000).

Fix: libc/go32/dpmiexcp.c (cvs revision 1.14), dosexec.c (cvs revision 1.17), V2.03 refresh.

______________________________________________________________________________

Problem: Programs crash with a General Protection Fault due to address wrap being unsupported:

Exiting due to signal SIGSEGV
General Protection Fault at eip= ....
cs: sel=... base=... limit=7e27ffff

If any limits have the first digit starting with "7" then this is the address wrap problem.
Note: this is also seen on Windows NT.

Workaround: Patch each DJGPP binary (here).

Fix: libc/crt0/crt0.S (cvs revision 1.7), V2.03 refresh.

______________________________________________________________________________

Problem: Cannot direct output to /dev/null or DOS NUL device. Fails with /dev/null: Permission denied (EACCES)

Workaround: set LFN=n, or use NT LFN TSR

Fix: libc/posix/fcntl/open.c (cvs revision 1.10), V2.03 refresh.

______________________________________________________________________________

Problem: IOCTL calls don’t work on LFN handles.

Workaround: set LFN=n, or use NT LFN TSR

Fix: libc/dos/io/_open.c (cvs revision 1.7), libc/dos/io/_creat.c (cvs revision 1.10), libc/dos/io/_creat_n.c (cvs revision 1.6), V2.03 refresh.

______________________________________________________________________________

Problem: touch fails: Input or output error (EIO) - symptom to utime() failing on LFN handles.

Workaround: set LFN=n, or use NT LFN TSR

Fix: libc/posix/utime/utime.c (cvs revision 1.4), V2.03 refresh.

______________________________________________________________________________

Problem: fstat() wrong info for files (writability), device

Workaround: set LFN=n, or use NT LFN TSR

Fix: libc/posix/sys/stat/fstat.c (cvs revisions 1.5, 1.6), other fixes in _open for IOCTL, V2.03 refresh.

______________________________________________________________________________

Problem: links fails

Workaround: set LFN=n, or use NT LFN TSR

Fix: Byproduct of IOCTL bugs, patch not needed

______________________________________________________________________________

Problem: Windows 2000 exhausts selectors too quickly on nested executions (large makefiles).

Problem seen on other platforms but worse on Windows 2000.

Workaround: Restart make or create a .bat file to loop it until completion.

Fix: libc/dos/process/dosexec.c (cvs revision 1.19), V2.03 refresh.

______________________________________________________________________________

Problem: Fstat on stdin causes seek problems when stdin redirected from file.

Workaround: set LFN=n for 2.04, no problem with 2.03

Fix: libc/posix/sys/stat/filelen.c (cvs revision 1.5)

______________________________________________________________________________

Problem: Fstat fails on device handles redirected from Win32 shell.

This is a byproduct of IOCTL calls returning incorrect information.

Workaround: use Bash to launch programs

Fix: libc/posix/sys/stat/fstat.c (cvs revision 1.6), V2.03 refresh.

______________________________________________________________________________

Problem: Hardware breakpoints don't work in debuggers.

This is caused by Windows 2K and XP neglecting to return the breakpoint handle.

Workaround: None. Use GDB which modifies instruction stream.

Fix: debug/common/dbgcom.c (cvs revision 1.22), V2.03 refresh.

______________________________________________________________________________

Problem: command.com does not behave the same way that W9x does.

This may cause configuration and make file failures or spurious error messages.
Example 1: if not exist directory\nul mkdir directory always tries to create directory, even if it exists.
Example 2: if directory exists, mkdir directory gives 'Extended error 183' instead of meaningful error message.
Example 3: cd to long name directories may fail.

Workaround: Edit configurations to use CMD.EXE instead

Fix: None (most are cosmetic).

______________________________________________________________________________

Problem: low level get current directory call fails for long directory names (>64 chars short name) and does not set error code.

chdir to long path causes subsequent getcwd, findfirst and other calls work from the root directory.

NOTE: rm -rf in a deep directory can remove all files on disk (i.e. rm -rf / ) !! Beware !!

Workaround: set LFN=n, or use NT LFN TSR to protect against using problematic directories (will force failure).

Fix: posix/sys/stat/fixpath.c (cvs revision 1.6), posix/unistd/getcwd.c (cvs revsion 1.5), posix/unistd/chdir.c (cvs revision 1.5), V2.03 refresh.

______________________________________________________________________________

Problem: findfirst search for label returns all files except volume label.

Causes mntent to ignore CD drives and miss volume labels. Force use of short name findfirst to fix.

Workaround: set LFN=n, or use NT LFN TSR

Fix: compat/mntent/mntent.c (cvs revision 1.8)

______________________________________________________________________________

Problem: fncase=y always appears to be enabled (use original case for all upper case short file names.)

Caused by bugs in the long file name interrupt AX=0x71A8

Workaround: be aware returned names may be upper case, rename them to lower case (name2low), or use NT LFN TSR

Fix: dos/lfn/is_DOS83.c (cvs revision 1.1), srchpath.c (1.7), readdir.c (1.5), glob.c (1.7), fixpath.c (1.7), lstat.c (1.7), getcwd.c (1.6)

______________________________________________________________________________

Problem: disk size and space usage for drives over 1Gb is incorrect (seen in df, for example)

Caused by lack of support for interrupt AX=0x730x

Workaround: Use NT LFN TSR

Fix: Not possible since API not supported. Must use TSR if accurate values required.

______________________________________________________________________________

Problem: stat() on devices does not set device bit. Caused by bug in LFN findfirst attributes value returned.

Workaround: Use NT LFN TSR

Fix: posix/sys/stat/lstat.c (cvs revision 1.10)

______________________________________________________________________________

Problem: _open() on files with invalid characters returns wrong errno. Caused by bug in LFN error code returned.
This may cause a program looking for a non-existent wildcard file to return EFAULT instead of ENOENT.

Workaround: ignore error return, set LFN=n, or use NT LFN TSR

Fix: dos/errno/doserr2e.c (cvs revision 1.5)

______________________________________________________________________________

Problem: delay() does not work.
It appears interrupt 0x15 function 0x86 is not supported on Win2K or XP.

Workaround: re-code to use timer ticks

Fix: dos/dos/delay.c (cvs revision 1.2)

______________________________________________________________________________

Problem: Programs using unixy-sbrk flag may silently die.
It appears DPMI function 0x90x to disable interrupts does not work on Windows 2000.

Workaround: don't use unixy sbrk, disable hardware interrupts

Fix: crt0/crt0.S (in review, force disable with cli)

______________________________________________________________________________

Problem: uclock() return values do not always increase. Timer tick increments are not syncronized with timer registers.

Workaround: use RDTSC to use CPU clock for high precision

Fix: pc_hw/timer/uclock.c (cvs revision 1.5)

______________________________________________________________________________

Problem:

Workaround:

Fix:

______________________________________________________________________________

 

Source Patches for not refreshed V2.03 library

Clio Home