www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/13/00:45:20

From: "Andrew Crabtree" <andrewc AT rosemail DOT rose DOT hp DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Port of bzip2
Date: Wed, 12 Nov 1997 16:00:36 -0800
Organization: Hewlett Packard
Lines: 38
Message-ID: <64dfva$sva$1@rosenews.rose.hp.com>
References: <34631CCC DOT 278D53C1 AT uni-leipzig DOT de>
NNTP-Posting-Host: ros51675cra.rose.hp.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019