Path: utzoo!attcan!uunet!apctrc!drd!mark From: mark@DRD.Com (Mark Lawrence) Newsgroups: comp.lang.c Subject: Re: shared memory Message-ID: <1990Sep24.135530.405@DRD.Com> Date: 24 Sep 90 13:55:30 GMT References: <1990Sep21.183326.13116@DRD.Com> <13991@hydra.gatech.EDU> Distribution: na Organization: DRD Corporation Lines: 35 } in article <1990Sep21.183326.13116@DRD.Com>, mark@DRD.Com (Mark Lawrence) says: } > extern const char *strerror(int); gt0178a@prism.gatech.EDU (BURNS,JIM) wrote: } I had more compile troubles w/this last line then any other in the program. } I had to substitute: } } extern char *sys_errlist[]; The following thanks to Chris Torek: /* * >From: chris@mimsy.UUCP (Chris Torek) * * In article <349@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes: *Grumble * bitch* please use "sys_errlist[]" next time, thank you.... It might even * make it easier to figure out what's wrong. * * Actually, use strerror(): This should be in your dpANS-conformant * C library (what, you have no dpANS-conformant *compiler*? :-) ) * */ #include const char *strerror(int err) { extern const char *sys_errlist[]; extern const int sys_nerr; static char expand[40]; if ((unsigned) err < sys_nerr) return (sys_errlist[err]); (void) sprintf(expand, "unknown error code %d", err); return (expand); } -- mark@DRD.Com uunet!apctrc!drd!mark$B!J%^!<%/!!!&%m!<%l%s%9!K(B