> The problem is pretty clear. Some compliations might have be a 64-bit
> int and some might be a 32-bit int. In my case perl bindings are
> picking up the 64-bit off_t form perl via the SWIG_PL_INCLUDES variable.
> libsvn_client sees it as 32-bit, the bindings see it as 64-bit. This is
> a problem.
Although I agree its a problem, which may well be addressed by changing
the particular usage you encountered to an unambiguous type such as
apr_uint32_t, I think the real error is in how you are compiling svn. If
you have decided to use the Perl bindings then you should compile svn in
the same approximate environment that Perl was compiled in. This
includes subtle things like _FILE_OFFSET_BITS, as well as other things
such as FD_SETSIZE or other nasty things that can trip you up if they
are set to different values in different applications. Likewise things
like threading.
There is an implied contract between the Perl distribution and its
users. If you want to use Perl in your app, you have to play Perl's
game. The same can be said for Python, Tcl, SLang, or any other library
for that matter. These days, you get to make an almost universal choice
for your platform. You either compile everything with 64bit support or
nothing, or else you do everything twice and get to futz around with
library paths.
Another popular library you may run into this exact problem with is
libz. It also defines z_off_t in terms of off_t, which makes calls to
thinks like gzseek() dangerous if you mix and match _FILE_OFFSET_BITS
values betwwen the app that uses it and the way the library was compiled.
In an ideal world, every application or library that needed offsets
would be sensitive to _FILE_OFFSET_BITS and provide both whatever32 and
whatever64 functions, and switch between them as needed. This is not an
ideal world :)
Kean
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 12 13:18:28 2004