Path: utzoo!attcan!uunet!lll-winken!csd4.milw.wisc.edu!bionet!ames!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: signal & sigvec error return codes Keywords: signal sigvec error Message-ID: <10319@smoke.BRL.MIL> Date: 25 May 89 16:40:40 GMT References: <8044@batcomputer.tn.cornell.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Distribution: comp Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 18 In article <8044@batcomputer.tn.cornell.edu> lijewski@batcomputer.tn.cornell.edu (Mike Lijewski) writes: >Why not document the error return as being something >along the lines of SIG_ERR, where SIG_ERR is defined as >#define SIG_ERR ((int(*)())-1) >in ? That's exactly what pANSI X3.159 requires (the macro, not the particular value), except you have the type wrong -- it should be ((void(*)())-1). Some older s also use the wrong types; we got AT&T to fix theirs with SVR3, and other vendors will also need to straighten this out for ANSI C and POSIX conformance. Since you can't count on SIG_ERR being defined by non-ANSI , what you should write is #include #ifndef SIG_ERR /* assume the traditional implementation */ #define SIG_ERR ((void(*)())-1) #endif