www.delorie.com/djgpp/v2faq/faq173.html | search |
| Previous | Next | Up | Top |
Q: How do I fix a bug/add a feature to one of the DJGPP programs?
Q: How should I produce patches for DJGPP programs I want to submit, and to whom should I submit them?
em1934s1.zip em1934s2.zip em1934s3.zip
All sources are shipped in ready-to-build form. Any diffs that come with the source distribution, like the files called DIFFS, have already been applied, and any configuration scripts and/or batch files have been run.
Next, try to build the program without changing it. Look for a file called README.dos or README.djgpp: it should explain the build procedure and list any optional packages you need to install for that.
If such a README file is unavailable, you will have to poke around and figure things out for yourself; here are some hints to help you out:
After you've successfully built the program, make your fixes and build the program the same way you did before.
Note that generally to build these programs, you must have the GNU Make program, installed, and some makefiles require that you install additional development utilities, like the SED editor. Sometimes the makefiles won't even run under COMMAND.COM (they require a smarter shell). In that case, either get a better shell, or convert the makefile to be runnable by COMMAND.COM, or do the required steps manually. If the Makefile is too complex for you and you can't figure out what are the necessary commands, invoke make with -n switch and see what it would have done.
If your machine lacks floating-point hardware (like a 386 without a 387, or a 486SX), then you should know that current versions of GNU Sed and GNU Make issue floating point instructions, so you will have to make provisions for loading an emulator, see above, FP Emulation. The port of Make 3.75 and later can be built so that it doesn't issue FP instructions, but you will have to get the sources and recompile Make first, as the stock version wasn't configured in that way.
If you think that you found a bug in one of the programs or libraries written for DJGPP (e.g. the C library, CWSDPMI, symify, etc.) be sure to check the list of known bugs. If your bug is not there, you can later submit it to the bug-tracking system.
Before you submit a bug report, please make every effort to verify that your bug is not caused by incorrect usage, or by problems in your DJGPP installation. Reports such as "All DJGPP programs crash" or "I cannot compile any program" are clearly not bugs, because these things work for many hundreds of DJGPP users every day; so either your system setup is messed up or you invoke programs incorrectly.
If you can investigate the cause of the bug and find a solution that makes it go away, submit a bug report with all the details. If you cannot find the cause(s), I suggest posting your problem description to the news group and asking people to verify that it is indeed a bug, before you submit a bug report. The bug-tracking system includes a list of all known bugs, many of them with solutions or work-arounds; please check them before creating a new bug report.
Patches to DJGPP programs and ports should be sent to the person who maintains the relevant package. Patches for the C library, utilities and other software which comes with the djdevNNN.zip distribution should be sent to DJ Delorie. If you don't know who maintains a particular package or port, post the patches to the comp.os.msdos.djgpp news group, since the maintainer is most probably reading that group.
To generate a patch, run the diff
program (from GNU Diffutils, v2gnu/dif271b.zip) on the old and the new version of a source file. For example:
diff -c src/libc/dos/dos/int86.old src/libc/dos/dos/int86.c >int86.difThe file int86.dif created this way should be sent to the maintainer, with a short description of the problem it solves. It is a good idea to run the patch file through DTOU (a utility which comes with DJGPP and converts DOS-style CR-LF pairs into Unix-style newlines), since this makes the patch work on Unix as well, in case the maintainer of the package in question does that on Unix.
Observing the following guidelines when creating the patch will make your patches easy to apply:
diff
, and never use -c with an argument that is less than 3 (for example, do not use
-c2).
diff
from the root of the DJGPP installation, i.e. from the directory where you keep the DJGPP.ENV file, and specify the files being compared with their
pathnames relative to that directory. This allows to concatenate related patches to several files, and apply the combined patch in a single run of the patch
utility.
patch
doesn't understand
backslashes. In particular, DJ Delorie maintains DJGPP on a Unix box.
diff
ignore whitespace, like -b or -w. In most cases, patches generated with these switches
will fail to apply.
webmaster donations bookstore | delorie software privacy |
Copyright ⌐ 1998 by Eli Zaretskii | Updated Sep 1998 |
You can help support this site by visiting the advertisers that sponsor it! (only once each, though)