[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnadmin hotcopy problem with strings > 2G

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: 2004-05-04 11:11:12 CEST

Dimitri Papadopoulos-Orfanos wrote:
> On RH8 the native off_t is 64-bit or 32-bit depending on the compilation
> options. So it does make sense to compile APR with "large file" support.

This is a dangerous advice.
Assuming a C function "void foo(off_t);", you get two different effective
prototypes depending on the settings. However, the symbol which the linker
sees will be called "foo", no matter what. Programs assuming 64 bit off_t
will happily call a 32 bit foo and break silently and mysteriously.

The solution is rather to
# define foo foo64
void foo(off_t);

To make programs trying to load the wrong lib fail at (dynamic-) linktime. One
could even have support for both then, just as glibc has.


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 4 10:12:11 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.