open64() and truncate64() in KDE

Ian Reinhart Geiser geiseri at
Sat Sep 21 04:50:41 BST 2002

Hash: SHA1

	As I fight with getting KDE to build on 64bit platforms I have found an 
irritatteing issue.  I must be missing something obvious, but I get the 
samething on 64bit PPC and Solaris.
	Someone decided it was a good idea to typedef open() and truncate() to 
open64() and truncate64() on these platforms.  While this may be a good idea 
for their libc, its hell on kdelibs.  All open() and truncate() functions 
seem to get clobbered.  This is bigtime in kdDebug()...

KDE Network agrivates this the most because things like the inclusion of 
unistd.h and calling KExtSocket::open() are done.  Now my current hack is to 
go into these header files (no just doing this in the cpp files dosent help 
one bit)  and doing:
	#ifdef open
	#undef open

Now this allows KDE to build, but this method is realy leaveing a sour taste 
in my mouth.  Is there a better way?  Or should I just go forth and keep 
doing this fix until everything compiles?  I am sure this method is bound to 
introduce bugs...

- -ian reinhart geiser
- -- 
"Contrary to popular belief, penguins are not the salvation of modern
technology.  Neither do they throw parties for the urban proletariat."
Version: GnuPG v1.0.7 (GNU/Linux)


More information about the kde-core-devel mailing list