From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 100159,805e0071ac25e02c X-Google-Attributes: gid100159,public X-Google-Thread: f6653,805e0071ac25e02c X-Google-Attributes: gidf6653,public X-Google-Thread: fc89c,805e0071ac25e02c X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,805e0071ac25e02c X-Google-Attributes: gidfee84,public X-Google-Thread: 11035d,805e0071ac25e02c X-Google-Attributes: gid11035d,public X-Google-Thread: fcda7,805e0071ac25e02c X-Google-Attributes: gidfcda7,public X-Google-Thread: 115614,805e0071ac25e02c X-Google-Attributes: gid115614,public X-Google-Thread: 10650a,805e0071ac25e02c X-Google-Attributes: gid10650a,public From: fred@genesis.demon.co.uk (Lawrence Kirby) Subject: Re: best UNIX OS as primary platform for UNIX system software develpoment? Date: 1996/09/12 Message-ID: <842570087snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 180261445 x-nntp-posting-user: fred@genesis.demon.co.uk references: <322E9A9E.264F@uebemc.siemens.de> <322F54A6.44FE@cao.mts.dec.com> x-mail2news-path: genesis.demon.co.uk organization: none reply-to: fred@genesis.demon.co.uk newsgroups: comp.unix.solaris,comp.sys.sun.misc,comp.sys.hp.hpux,comp.unix.internals,comp.unix.programmer,comp.unix.aix,comp.unix.osf.osf1,comp.sys.sgi.misc In article richard@cogsci.ed.ac.uk "Richard Tobin" writes: >In article Dan.Pop@cern.ch (Dan Pop) writes: > >>Within the frame of ANSI C, printing a time_t value is pointless, >>because the way the time is encoded is unspecified. > >You might want to read it in again later. In that case just print it as: printf("%Lf", (long double)t); This is generally of more interest for clock_t values. >> it can be any of the 9 integral types or 3 floating point types. > >There might be some trick for portably determining whether it's an >integral or floating type. How about > > (time_t)0.3 == 0 That looks OK but I can't think of any situation where it would be particularly useful. size_t values should be cast to unsigned long, ptrdiff_t values to long. Integral constants (EOF, BUFSIZ) can usually be categorised by whether they can be negative or not and by usage i.e. the type of arguments/return values that they can be passed through. >Am I right in thinking this expression is always legal and must be >true iff time_t is an integral type? Yes. -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------