* does tru64 v.4.g support long long int (%lld)?
@ 2002-03-27 17:12 Eugen Muntean
2002-03-27 23:44 ` Bob Harris
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Eugen Muntean @ 2002-03-27 17:12 UTC (permalink / raw)
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?
I didn't also find the cc compiler option "FILE_OFFSET_BITS" (like in
7.2 RH Linux).
Could anyone help me?
Eugen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: does tru64 v.4.g support long long int (%lld)?
2002-03-27 17:12 does tru64 v.4.g support long long int (%lld)? Eugen Muntean
@ 2002-03-27 23:44 ` Bob Harris
2002-03-28 17:48 ` Eugen Muntean
2002-03-28 8:57 ` Timo Felbinger
2002-03-29 2:27 ` Rajanish Calisa
2 siblings, 1 reply; 5+ messages in thread
From: Bob Harris @ 2002-03-27 23:44 UTC (permalink / raw)
In article <304099f8.0203270912.60536a8e@posting.google.com>,
emuntean@newlog.com (Eugen Muntean) wrote:
X I tried to compile with cc, a tcp code for communication between
X machines tru64 and a linux backup server. The client (tru64) code
X contains a statement like:
X
X sprintf(buf, "%lld", st_size);
X
X where st_size contain the size of the file to be backed up (it may be
X >2GO)
X
X The compiler works well, but the binary code made a lot of damage in
X the memory.
X
X I am asking if tru64 support the long long int type?
X I didn't also find the cc compiler option "FILE_OFFSET_BITS" (like in
X 7.2 RH Linux).
X
X Could anyone help me?
X Eugen
a 'long' in Tru64 UNIX is 64 bits.
"%ld" formats a 64 bit long.
I do not know what FILE_OFFSET_BITS is, but there is a pathconf()
_PC_FILESIZEBITS in Tru64 UNIX v5.*, is this similar to what you are
looking for?
Bob Harris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: does tru64 v.4.g support long long int (%lld)?
2002-03-27 17:12 does tru64 v.4.g support long long int (%lld)? Eugen Muntean
2002-03-27 23:44 ` Bob Harris
@ 2002-03-28 8:57 ` Timo Felbinger
2002-03-29 2:27 ` Rajanish Calisa
2 siblings, 0 replies; 5+ messages in thread
From: Timo Felbinger @ 2002-03-28 8:57 UTC (permalink / raw)
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 <Timo.Felbinger@quantum.physik.uni-potsdam.de>
Quantum Physics Group http://www.quantum.physik.uni-potsdam.de
Institut fuer Physik Tel: +49 331 977 1793 Fax: -1767
Universitaet Potsdam, Germany
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: does tru64 v.4.g support long long int (%lld)?
2002-03-27 23:44 ` Bob Harris
@ 2002-03-28 17:48 ` Eugen Muntean
0 siblings, 0 replies; 5+ messages in thread
From: Eugen Muntean @ 2002-03-28 17:48 UTC (permalink / raw)
Bob Harris <harris@zk3.dec.com> wrote in message news:<harris-373F6C.18443527032002@gazette.loc1.tandem.com>...
> In article <304099f8.0203270912.60536a8e@posting.google.com>,
> emuntean@newlog.com (Eugen Muntean) wrote:
>
> X I tried to compile with cc, a tcp code for communication between
> X machines tru64 and a linux backup server. The client (tru64) code
> X contains a statement like:
> X
> X sprintf(buf, "%lld", st_size);
> X
> X where st_size contain the size of the file to be backed up (it may be
> X >2GO)
> X
> X The compiler works well, but the binary code made a lot of damage in
> X the memory.
> X
> X I am asking if tru64 support the long long int type?
> X I didn't also find the cc compiler option "FILE_OFFSET_BITS" (like in
> X 7.2 RH Linux).
> X
> X Could anyone help me?
> X Eugen
>
> a 'long' in Tru64 UNIX is 64 bits.
>
> "%ld" formats a 64 bit long.
>
> I do not know what FILE_OFFSET_BITS is, but there is a pathconf()
> _PC_FILESIZEBITS in Tru64 UNIX v5.*, is this similar to what you are
> looking for?
>
> Bob Harris
Yes, you are right.
The FILE_OFFSET_BITS is an -Dname preprocessor option for cc compiler,
defined in a Rules.make file. Unfortunately these option is not
considered by tru64 cc compiler.
(I forced it using an explicit #define)
Thank you,
Eugen
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: does tru64 v.4.g support long long int (%lld)?
2002-03-27 17:12 does tru64 v.4.g support long long int (%lld)? Eugen Muntean
2002-03-27 23:44 ` Bob Harris
2002-03-28 8:57 ` Timo Felbinger
@ 2002-03-29 2:27 ` Rajanish Calisa
2 siblings, 0 replies; 5+ messages in thread
From: Rajanish Calisa @ 2002-03-29 2:27 UTC (permalink / raw)
You do not need to use "long long" type. Just use a "long" type which
is 64bit and use "%ld" to print it.
rajanish...
"Eugen Muntean" <emuntean@newlog.com> wrote in message
news:304099f8.0203270912.60536a8e@posting.google.com...
> 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?
> I didn't also find the cc compiler option "FILE_OFFSET_BITS" (like in
> 7.2 RH Linux).
>
> Could anyone help me?
> Eugen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-03-29 2:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-03-27 17:12 does tru64 v.4.g support long long int (%lld)? Eugen Muntean
2002-03-27 23:44 ` Bob Harris
2002-03-28 17:48 ` Eugen Muntean
2002-03-28 8:57 ` Timo Felbinger
2002-03-29 2:27 ` Rajanish Calisa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox