From: aclark@netcom.com (Al Clark) Subject: Re: tgif compiled, but what about SIGBUS? Date: Mon, 19 Oct 1992 19:40:40 GMT
In article <HEIM.92Oct19182052@schroeder.peanuts.informatik.uni-tuebingen.de> heim@peanuts.informatik.uni-tuebingen.de (Gerald Heim) writes:
>
>Comment them out, that's safe since SIGBUS doesn't exist on Linux.
>
>gjh
If you want to keep your source portable, surround SIGBUS references with
#ifdef SIGBUS
...
#endif
I do a similar thing on portable "stat" software, where the #ifdef's are
for the file type definitions - an excerpt follows. You do a similar
thing with the signals that are not portable.
========================= code fragment ==================
switch(ftype) {
#ifdef S_IFLNK
case S_IFLNK: printf("Symbolic Link"); break;
#endif
case S_IFDIR: printf("Directory"); break;
case S_IFCHR: printf("Character Special File"); break;
case S_IFBLK: printf("Block Special File"); break;
case S_IFREG: printf("Regular File"); break;
#ifdef S_ISOCK
case S_IFSOCK: printf("Socket"); break;
#endif
#ifdef S_IFIFO
case S_IFIFO: printf("Fifo"); break;
#endif
}
========================== end code fragment ===============
~
~
:!dump /tmp/x
-- Al - aclark@netcom.com - My opinions are my own.