[PyKDE] FreeBSD build problems error 23512

Jim Bublitz jbublitz at nwinternet.com
Fri Aug 30 22:01:01 BST 2002


On 30-Aug-02 Steve Simmons wrote:
> Jim Bublitz <jbublitz at nwinternet.com> wrote:
 
>>Quoting from an earlier post by Steve Simmons:

>>To make a long story short, atoll() is coming into FreeBSD but
>>isn't there yet.  The source shows it to be a one-liner, so
>>adding this to the appropriate kio module did the trick:
 
>>inline kiofilesize_t atoll( char * s ) { return (kiofilesize_t)
>>    strtoll(s, (char **)NULL, 10); }
 
> Sorry, I should have given a bit more detail when originally
> posting. After the atoll() error that Chris describes, I added
> the above inline definition at line 5493 to kio/kiohuge.cpp.
 
> Geez, I gotta take better notes.  :-)  It took 10 minutes to
> find where the change had been made.
 
> Please also note that adding the line there is a very shakey
> hack, not a long-term fix.  I'm trying to figure out where the
> real fix goes, because (a) I strongly suspect that this line
> should *not* be applied when building on systems that already
> define atoll(), and (b) I think kiohuge.cpp gets built by other
> things so a new build will wipe out the fix.
 
kiohuge.cpp is (re)created by build.py on each run by concatenating
together all of the the cpp files that sip creates, but *only* if
the -c switch is used, so it isn't guaranteed to exist. 

The patch should probably go into filesize_t.sip. 'atoll' is called
in the "%ConvertToTypeCode" block, and everything within that block
is C++ code, so something in that block like:

    #ifdef no_atoll
        #define atoll(s)    strtoll(s, (char **)NULL, 10)

You can probably work out a way to #define no_atoll automatically in
build.py by doing a test compile of a short program (see how
-fno_exception is tested for). Let me know if you want me to throw
something together - I don't have any way to test the FreeBSD
performance of it though.

Actually, it shouldn't be that hard, so I'll just go ahead and do
it. In the meantime, why don't you stick the #define above in
filesize_t.sip and see if it works. It'll take me a few days to
modify build.py, and I'm at the point where I might as well throw a
new release together (other build.py fixes, ~KApplication) - I'll
wait until you've tested the build.py patches (no root stuff)
before doing the release, so let me know on that and the #define
above.


Jim




More information about the PyQt mailing list