Mail Archives: djgpp/1997/11/13/00:45:20
Raul Kompass wrote in message <34631CCC DOT 278D53C1 AT uni-leipzig DOT de>...
>Can anybody tell me if there is a port of bzip2 to djgpp?
>I would like to use this program under plain dos.
>Such a port surely is very easy, but I don't know signals
>and therefore I was not successful to compile the program.
DJGPP does not define a SIGBUS for some reason (maybe we can't trap it).
Assuming you leave BZ_UNIX defined (its the default), then
just put a
#ifndef __DJGPP__
#endif
around the sigbus installer. So line ~3860 should look like
#ifndef __DJGPP__
signal (SIGBUS, mySIGSEGVorSIGBUScatcher);
#endif
Then you will find that you get an undefined reference to lstat, so you will
also need
to force it to use stat. Around line 148 change it to this.
#ifdef __DJGPP__
#define MY_LSTAT stat
#else
#define MY_LSTAT lstat
#endif
Thats it. Just do a 'gcc bzip.c -o mynewbzip.exe' and you should be all
set.
HTH
Andy
- Raw text -