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: fc89c,805e0071ac25e02c X-Google-Attributes: gidfc89c,public X-Google-Thread: 10650a,805e0071ac25e02c X-Google-Attributes: gid10650a,public X-Google-Thread: 11035d,805e0071ac25e02c X-Google-Attributes: gid11035d,public X-Google-Thread: 115614,805e0071ac25e02c X-Google-Attributes: gid115614,public X-Google-Thread: f6653,805e0071ac25e02c X-Google-Attributes: gidf6653,public X-Google-Thread: fcda7,805e0071ac25e02c X-Google-Attributes: gidfcda7,public X-Google-Thread: fee84,805e0071ac25e02c X-Google-Attributes: gidfee84,public From: Martin Knoblauch Subject: Re: best UNIX OS as primary platform for UNIX system software develpoment? Date: 1996/09/03 Message-ID: <322C1AAF.2781@munich.sgi.com>#1/1 X-Deja-AN: 178164546 distribution: inet references: <4v2j4b$2bs@knot.queensu.ca> <32189D13.3834@arborsoft.com> content-type: text/plain; charset=us-ascii organization: Silicon Graphics GmbH, Am-Hochacker 3, D-85630 Grasbrunn mime-version: 1.0 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 x-mailer: Mozilla 2.02S (X11; I; IRIX 6.2 IP22) mib@ppe.bb-data.de wrote: > > Pawel Wezgowiec writes: > > > Is HP-UX that bad platform ?? > > > > Probably there are more Unix systems with > > sizeof(int) == sizeof(long). But I don't think it's > > really important. > I would actually say, that most 32-bit OSes will have that relation. But it is a big mistake to assume that this holds forever. This implicit assumption is probably the major hurdle when porting from ILP32 (-32/-n32) to LP64 (-64). > If you are a very good developer who doesn't make the stupid kind of > mistakes we mere mortals make (and you don't have any code from mere > mortals to maintain or incorporate into your code), or if you > absolutely, positively know that you'll never port your code to a > platform where ints and longs are really distinct types, then it is > not important. > > But my experience, people do make mistakes like > > time_t t; > sprintf(buf, "%ld", t); > > or > > long l; > time(&l); > > or > int foo(long *l); > int i; > > foo(&i); > > or > int foo(int i) > { > void *p=(void*)i; > } > > or > > ... > > Believe me. It does happen (especially legacy code is full of this > kind of stuff). And if you have to weed these out during a > port -- nightmare. Actually, the compilers for n32/64 are pretty good at showing you how crappy your code is. If you want all the fun, just turn on "-fullwarn". Martin -- +---------------------------------+-----------------------------------+ |Martin Knoblauch | Silicon Graphics GmbH | |Manager Application Center | Am Hochacker 3 - Technopark | |Silicon Graphics Computer Systems| D-85630 Grasbrunn-Neukeferloh, FRG| | | Phone: (+int) 89 46108-179 or -0 | | | Fax: (+int) 89 46108-190 (-222) | +---------------------------------+-----------------------------------+ |e-mail: | V-Mail: 5-8935 | M/S: IDE-3150 | +---------------------------------------------------------------------+