64 bit longs in gcc?
From: Tris Orendorff (triso_at_remove-me.cogeco.ca)
Date: 03/22/04
- Next message: L: "Help - Linux-SCSI mail list"
- Previous message: ruben: "Re: determine file size from within a kernel module"
- Next in thread: Lew Pitcher: "Re: 64 bit longs in gcc?"
- Reply: Lew Pitcher: "Re: 64 bit longs in gcc?"
- Reply: Kasper Dupont: "Re: 64 bit longs in gcc?"
- Reply: Dave Clarke: "Re: 64 bit longs in gcc?"
- Reply: David Schwartz: "Re: 64 bit longs in gcc?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Mar 2004 15:55:02 GMT
Hi,
How can I get 64 bit longs in gcc for Linux x86? I don't want 64 bit pointers, either. I am attempting to
modify Unix Tree under Linux and the code is written with 64 bit longs for all the other configurations (VMS,
AIX, BSD, etc.) Byte counts wrap at 2GB when long is only 32 bits.
Reading through the gcc man page, all the other systems with 32 bit ints have 64 bit longs.
I am able to convert stat.st_size to 64 bits by using "-D_FILE_OFFSET_BITS=64" on the command line.
This gives me a new type, off_t, that is 64 bits but then I have to convert all other files to use off_t rather
than long but only where the variable is a file size and not an unrelated long variable. This is too error
prone and also messes up all the code for the other machines.
Does anyone have any suggestions?
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d++ s+:- a+ C+ UL++++ P+ L+ E- W+ N++ o- K++ w+ O+ M !V PS+ PE Y+ PGP t+ !5 X- R- tv--- b++
DI++ D+ G++ e++ h---- r+++ y+++
------END GEEK CODE BLOCK------
- Next message: L: "Help - Linux-SCSI mail list"
- Previous message: ruben: "Re: determine file size from within a kernel module"
- Next in thread: Lew Pitcher: "Re: 64 bit longs in gcc?"
- Reply: Lew Pitcher: "Re: 64 bit longs in gcc?"
- Reply: Kasper Dupont: "Re: 64 bit longs in gcc?"
- Reply: Dave Clarke: "Re: 64 bit longs in gcc?"
- Reply: David Schwartz: "Re: 64 bit longs in gcc?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|