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: fcda7,805e0071ac25e02c X-Google-Attributes: gidfcda7,public X-Google-Thread: f6653,805e0071ac25e02c X-Google-Attributes: gidf6653,public X-Google-Thread: 11035d,805e0071ac25e02c X-Google-Attributes: gid11035d,public X-Google-Thread: 115614,805e0071ac25e02c X-Google-Attributes: gid115614,public X-Google-Thread: 10650a,805e0071ac25e02c X-Google-Attributes: gid10650a,public X-Google-Thread: fee84,805e0071ac25e02c X-Google-Attributes: gidfee84,public From: Pawel Wezgowiec Subject: Re: best UNIX OS as primary platform for UNIX system software develpoment? Date: 1996/09/02 Message-ID: #1/1 X-Deja-AN: 177973829 distribution: inet references: <4v2j4b$2bs@knot.queensu.ca> <32189D13.3834@arborsoft.com> <5050gc$1fc@nntpa.cb.lucent.com> content-type: TEXT/PLAIN; charset=US-ASCII organization: Academic Computer Centre CYFRONET - Krakow 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 On Sun, 1 Sep 1996, John J. Rushford wrote: > Scott G. Hall (sgh@cbgbcs.cb.att.com) wrote: > : Wojciech Galazka wrote: > : >mib@bb-data.de (Martin Ibert) writes: > : No -- Linux has the same problem: sizeof(int) == sizeof(long). You need > : something where these are different. > > sizeof(int) == sizeof(long) is true on a lot of UNIX platforms not just Linux > or Solaris x86 and has been for a long time. Just curious as to why you use > this criteria to judge which OS to use. > Hmm... This complicated piece of code I run on our HP9000 K200 under HP-UX 10.01: ------------------------------------- #include int main() { cout << "Size of int = " << sizeof(int) << endl; cout << "Size of long = " << sizeof(long) << endl; cout << "Size of long long = " << sizeof(long long) << endl; return 0; } ------------------------------- I compiled it with gcc 2.7.2.1 (I haven't got HP C++, and I don't want to rewrite it to "printf version" to compile it with the original cc) - AFAIK the result would be the same with the original one. What was the output ? ----------------------------- Size of int = 4 Size of long = 4 Size of long long = 8 ------------------------------- 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. If I were you I'd focused on the quality of development tools for the "recommended platform". Assuming size of data types is one of the best ways to write code very hard to maintain. Along with some other "hard-coded" code it would be not the primary but the only platform for your application. Paul ======================================================================= Pawel Wezgowiec | Technical University of Czestochowa | Institute of Mathematics Network Administrator | and Computer Science ======================================================================= http://k2.pcz.czest.pl/~paulw =======================================================================