Date: Thu, 13 Nov 1997 13:13:20 +0200 (IST) From: Eli Zaretskii To: Andrew Crabtree cc: djgpp AT delorie DOT com Subject: Re: Port of bzip2 In-Reply-To: <64dfva$sva$1@rosenews.rose.hp.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 12 Nov 1997, Andrew Crabtree wrote: > DJGPP does not define a SIGBUS for some reason (maybe we can't trap it). AFAIK, there's no such thing as SIGBUS on machines which don't require alignment. x86 can handle misaligned objects, they just inflict runtime penalty. Machines that have SIGBUS cannot access misaligned objects at all. > #ifndef __DJGPP__ > signal (SIGBUS, mySIGSEGVorSIGBUScatcher); > #endif A better way is to check SIGBUS itself: #ifdef SIGBUS signal (SIGBUS, ...); #endif > #ifdef __DJGPP__ > #define MY_LSTAT stat > #else > #define MY_LSTAT lstat > #endif Here, also, a better way is to test for the (un)supported feature rather than for a system name: #ifdef S_ISLNK #define MY_LSTAT lstat #else #define MY_LSTAT stat #endif (since `lstat' only makes sense when symbolic links are supported).