This is what stdint.h and limits.h are supposed to solve.
Unfortunately, I don't know what C standard they were added to (I know
that it is in C99) so using them may break older compilers. Would it be
a good idea to start changing the codebase to use C99 stuff (I'm
including things like the newer keywords like 'restrict')?
Also, I noticed from a prior post that -1 is an indicator that the
revision number is invalid; what happens when the revision counter rolls
over? At that point, the number is much less than -1. Does the code
simply test that it is equal to -1, or does it test to see if the
revision is less than 0?
> -----Original Message-----
> From: Travis [mailto:firstname.lastname@example.org]
> Sent: Tuesday, March 08, 2005 7:48 PM
> To: Steve Greenland
> Cc: email@example.com
> Subject: Re: revision number upper boundary?
> On Mar 8, 2005, at 4:23 PM, Steve Greenland wrote:
> > On Tue, Mar 08, 2005 at 08:15:43PM -0000, Max Bowsher wrote:
> >> 2147483647, i.e. slightly more than 2 billion.
> >> That's assuming you are using a 32bit machine, of course.
> >> So, if you make 1 commit every second without pause, that will last
> >> you
> >> until the year 2073, by which time, it's a fairly safe bet
> that you
> >> will
> >> have moved on to a 64bit machine, and can enjoy the
> freedom to have
> >> up to 9
> >> quintillion revisions.
> > ObOffTopic: actually, many C implementations for 64bit OS's keep
> > 'long' as a 32 bit quantity, using the abomination 'long long' for
> > 64bit integer types.
> > So as long (heh!) as the subversion revision is kept typed as 'long
> > int', it will likely stay a 32 bit integer.
> Really? A quick double-check shows that 64-bit longs ("LP64") are
> present when invoking the compile-for-64bit option on these various
> - gcc 3.2.3 on a 64-bit Opteron Linux
> - xlc on AIX (many versions)
> - cc on 64-bit HPUX system
> - cc (SUNWspro) on SunOS 5.7
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Wed Mar 9 15:07:01 2005