[kde-solaris] Solaris unistd.h

Hans Meine meine at informatik.uni-hamburg.de
Tue Jan 27 12:26:11 CET 2004

Hash: SHA1

Hi everybody!

As I already wrote about one year ago, on 2003-2-18, I have serious problems 
with compiling KDE on Solaris, as unistd.h contains the following part:

/* large file compilation environment setup */
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
#pragma redefine_extname        ftruncate       ftruncate64
#pragma redefine_extname        lseek           lseek64
#pragma redefine_extname        pread           pread64
#pragma redefine_extname        pwrite          pwrite64
#pragma redefine_extname        truncate        truncate64
#pragma redefine_extname        lockf           lockf64
#pragma redefine_extname        tell            tell64
#define ftruncate                       ftruncate64
#define lseek                           lseek64
#define pread                           pread64
#define pwrite                          pwrite64
#define truncate                        truncate64
#define lockf                           lockf64
#define tell                            tell64
#endif  /* !_LP64 && _FILE_OFFSET_BITS == 64 */

_FILE_OFFSET_BITS is indeed set to 64 by configure, and I get loads of 
messages like "no matching function for call to `QString::truncate64 (int)' " 
all over the place (kdenetwork/{kdict,kget,krbf} to mention a few, 
koffice/lib/kofficecore/koDocument.cc for example complains about a missing 
"KIO::NetAccess::stat64" which seems to be related).

Similar messages come with open64 and so on and can be traced back to some bad
defines in the mentioned header which confuse the compiler resp. sometimes
the linker (if it reads the Qt headers after the #define).

Now what I find strange is that I never read anything about this problem on
this list, is there a possible fix for the header? I am trying to fight it by 
putting #undef's in many places , but there must be a better fix!?

uname -a:
  "SunOS kogs47 5.8 Generic_108528-17 sun4u sparc SUNW,Ultra-1"
ls -l /usr/include/unistd.h:
  "-rw-r--r-- 1 root bin 34396 Jan 5 2000 /usr/include/unistd.h"

   /  /
 /  / ANS
Version: GnuPG v1.2.3 (GNU/Linux)


More information about the kde-solaris mailing list