delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq170.html   search  

| Previous | Up | Top |

21.4 Where to find the best C library for DJGPP

Q: There's been quite some time since the last DJGPP release. Where can I get all the latest stuff where the bugs are fixed?

Q: I have heard rumors that there's a better C library for DJGPP available from the net. Where is it?


A: New versions of most parts of DJGPP are released quite regularly. For example, DJGPP ports of most GNU packages are generally released short time after a new version of every package becomes available from the GNU FTP sites. So for many DJGPP packages, a new release should usually be available real soon, just stick around a bit.

The single most important component of DJGPP tool-chain that might suffer from long release schedule is the djdev package. This includes the C library, libc.a, which was written specifically for DJGPP, and some DJGPP-specific development tools, like redir and symify. However, the latter are usually stable and don't need too much fixing.

A full release of djdev is a lot of work, so DJ Delorie decided not to make interim releases (experience from v1.x development shows that such interim releases also generate confusion and are hard to maintain).

In general, you are advised to constantly improve your C library by fixing any bugs in the library sources and replacing old modules with fixed ones. All this takes is to edit the relevant source file, compile it, and put it into the library. For example, assuming you have made a source-level change in a file called foo.c, here's how you update your library:

       gcc -c -O2 foo.c
       ar rvs c:/djgpp/lib/libc.a foo.o

(This example assumes that DJGPP is installed in the C:\DJGPP directory; if not, you will need to change the pathname of libc.a accordingly.)

Patching the library like that requires that you download the DJGPP library sources, djlsrNNN.zip (where NNN is the version number). That file includes sources to all the DJGPP functions and utilities, and you can extract them as the need to edit them arises.

Bug reports regarding the library and patches to fix them are posted from time to time to the comp.os.msdos.djgpp news group. In addition, the DJGPP bug-tracking system, stores many known bugs and the patches required to solve them. You can use these resources to find solutions to known bugs. Patches are applied using the patch utility which is available from the DJGPP sites.

For those who don't want to mess with patching library sources, but still want their library to be as bug-free as possible, a few generous DJGPP users maintain a site where you can find those patches already applied for you and ready to be downloaded. The patched libc at that site includes bugfixes and improvements that were tested by experienced DJGPP users, so they are relatively safe. You can either download one or more individual patches and then put them into your library, or download the entire libc.a with all the patches. Every patch has a short description, in case you'd like to decide whether it's for you.

The patched library was created by Tom Demmer. Nate Eldredge is the current maintainer, and the space available for FTP is courtesy of A. Sinan Unur, on his server. The patched library is available via WWW and by ftp. Be sure to read the file ftp.message.txt when using the FTP server above. The file README explains how the patched library can be downloaded and used.

The above site also includes two additional versions of the C library: one compiled with the -g switch and the other compiled with the -pg switch to GCC. These are handy if you need to debug library functions and profile them, respectively.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)