From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2bb1f01ee77dfda1 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-03-28 01:00:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!news-han1.dfn.de!news-ber1.dfn.de!news.uni-potsdam.de!uranos.quantum.physik.uni-potsdam.de!timof From: Timo Felbinger Newsgroups: comp.unix.tru64 Subject: Re: does tru64 v.4.g support long long int (%lld)? Date: Thu, 28 Mar 2002 09:57:13 +0100 Organization: University of Potsdam Message-ID: References: <304099f8.0203270912.60536a8e@posting.google.com> Reply-To: NNTP-Posting-Host: uranos.quantum.physik.uni-potsdam.de Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: zeppelin.rz.uni-potsdam.de 1017305860 13600 141.89.72.92 (28 Mar 2002 08:57:40 GMT) X-Complaints-To: usenet@zeppelin.rz.uni-potsdam.de NNTP-Posting-Date: 28 Mar 2002 08:57:40 GMT X-X-Sender: In-Reply-To: <304099f8.0203270912.60536a8e@posting.google.com> Xref: archiver1.google.com comp.unix.tru64:7134 On 27 Mar 2002, Eugen Muntean wrote: > I tried to compile with cc, a tcp code for communication between > machines tru64 and a linux backup server. The client (tru64) code > contains a statement like: > > sprintf(buf, "%lld", st_size); > > where st_size contain the size of the file to be backed up (it may be > >2GO) > > The compiler works well, but the binary code made a lot of damage in > the memory. > > I am asking if tru64 support the long long int type? It does, but you don't need it: this is a 64 bit system, and ``long int'' has already 64 bits. ``long long int'' is just a synonym. So, sprintf(buf, "%ld", st_size); should work. > I didn't also find the cc compiler option "FILE_OFFSET_BITS" (like in > 7.2 RH Linux). > Dito: I believe that in Linux, FILE_OFFSET_BITS selects whether you want to use 32 or 64 bit integers for file sizes/offsets. In Tru64, you will get 64, which is what you want (files > 2GB), you don't need to define FILE_OFFSET_BITS, as far as system libraries/headers are concerned. However, if it is needed anywhere in your code, adding -DFILE_OFFSET_BITS=64 to the compiler options is probably safe. Timo -- Timo Felbinger Quantum Physics Group http://www.quantum.physik.uni-potsdam.de Institut fuer Physik Tel: +49 331 977 1793 Fax: -1767 Universitaet Potsdam, Germany