From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Message-id: <3612518B-A55C-476F-B287-2B52C696014D@mac.com> From: Pietro Gagliardi To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: <84fe7a375cfada78925e89e61fa6774e@terzarima.net> Date: Wed, 6 Aug 2008 08:43:05 -0400 References: <84fe7a375cfada78925e89e61fa6774e@terzarima.net> Subject: Re: [9fans] float.h Topicbox-Message-UUID: fc05cc5a-ead3-11e9-9d60-3106f5b1d025 On Aug 6, 2008, at 4:06 AM, Charles Forsyth wrote: >> My program uses some of them (DBL_MIN, DBL_MAX, DBL_EPSILON), and >> including yields name clashes. Thanks. > >> #include >> ... >> #include > > it's surprisingly important not to leave out important information, > such as > what important things were in the "..." (other include files) and, > most importantly, the particular "name clashes". > > i'd noticed you were using not which i'd > thought curious > (were you mixing APE and Plan 9 include files?) but like most others > i'd initially > assumed the "name clashes" had to do with the DBL_ names. odd. > Yes. Plan 9 has no float.h of its own. > guessing that the "..." contained "#include " and trying a > little test, > I find that probably the "name clashes" were (was?) probably singular: > > /386/include/ape/float.h:43 yy.c:3 redeclare tag: FPdbleword > The other is in . > so now we know the problem, what to do about it? > i know an unpleasant way but perhaps someone else can think of a > good way to get those > values outside the APE include files. libc.h doesn't define > equivalents. > perhaps the values aren't actually all that useful (i'm not sure how > i'd use > them myself in a calculator, for instance). > > If your unpleasant way is to copy float.h, it won't work; you'll need one for each $objtype. I found an algorithm to get epsilon, but not min or max.