Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!mimsy!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Portable uses of jmpbuf's Message-ID: <8675@smoke.ARPA> Date: 12 Oct 88 06:20:17 GMT References: <4700022@m.cs.uiuc.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <4700022@m.cs.uiuc.edu> wsmith@m.cs.uiuc.edu writes: >Some machines define a jmpbuf to be struct { stuff } , while >others define a jmpbuf to be an array. It's supposed to be an array, since the address of the buffer is fed to the setjmp/longjmp routines by name and only an array works right in that context. Your trick of wrapping it in a structure is okay so long as you make sure it is the jmpbuf member of the structure you feed to setjmp/longjmp, not the (address of) the structure.