Windows 2000 and XP Workarounds

For some reason you have decided you don't want to refresh your 2.03 release or try the development tree - and you just want to make the current DJGPP binaries you have work under Windows 2000 or XP. Maybe you don't have the bandwidth, or you have a binary without source you want to run.

A detailed list of the problems you are likely to see is described in the known problems and workarounds page. The most severe problems can be grouped as long file name API bugs, problems nesting programs more than 2 deep, and address wrap problems. Fortunately, these problems can be fixed to allow current DJGPP binaries to usually work properly. Here's how to do it:

1) Install the NT Long File Name TSR
This will replace the long file name support API in Windows 2000 and XP with the version developed for NT. You can load this in a per session basis without any administrator rights, or by reading the installation instructions have each DOS session automatically make the updated calls available.

2) Optional: Patch Windows NTVDM.EXE
If you have Windows 2000 (Original, SP1, SP2, does not work on SP3 or later or on XP) you can modify your NTVDM image to avoid crashes when nesting DJGPP images 3 or more deep (common in compiles and makefiles). This allows you to avoid patching each DJGPP binary image which calls other DJGPP images.

3) Binary patch images which still cause problems.
There are two remaining problems - address wrap in memory allocation and nesting issues (if you did not install the NTVDM patch, or have Windows XP). Address wrap crashes are only seen on some machines - so you may not need to patch the images in some environments. Most images don't call other programs and would not need to be patched to avoid the nesting crashes. You should download the tool to binary patch images just in case you need it. Read the directions included in this distribution - but you can usually just patch all the images in your DJGPP tree. Note: if the image is compressed with DJP or UPX you will need to decompress the image before you can patch it.

4) Update build environment so new programs will not contain bugs.
The link above allows you to update a current 2.03 system with the bug fixes in the library (and source tree if you have it installed). It is still strongly recommended that you upgrade djdev203.zip instead so development tools such as debuggers work properly and new program images you create will be Windows 2000 and XP compatible without needing to patch them.

With these changes you should be able to run old DJGPP images under Windows 2000 and Windows XP.

Links:

Know DJGPP problems on Windows 2000 and XP

DJGPP 2.03 Update Page

DJGPP 2.04 CVS Development Page

Clio Home