[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#1627: Portability Problem on SGI Irix
From:       Klaus Steinberger <Klaus.Steinberger () Physik ! Uni-Muenchen ! DE>
Date:       1999-07-29 12:45:16
[Download RAW message or body]


Package: kdenetwork
Version: 1.1.1

The kmail Application does not compile on SGI Irix 6.x. The compilation
dies in kmail/kmfolder.cpp, as the flock call interferes on SGI with the
structure. This is describe in the SGI Manpages, with the correct solution:

Excerpt from "man flock":

     In C++, the function name flock collides with the structure name flock
     (which is declared in <sys/fcntl.h> and included in <sys/file.h> ).  When
     using flock() in C++, one must define _BSD_COMPAT before including
     sys/file.h


The following patch solves the problem:

*** kmail/kmfolder.cpp.orig     Thu Jul 29 14:32:55 1999
--- kmail/kmfolder.cpp  Thu Jul 29 14:32:59 1999
***************
*** 28,34 ****
--- 28,40 ----
  #include <stdlib.h>
  #include <sys/types.h>
  #include <sys/stat.h>
+ #ifdef __sgi
+ #define _BSD_COMPAT
+ #endif
  #include <sys/file.h>
+ #ifdef __sgi
+ #undef _BSD_COMPAT
+ #endif
  
  #ifndef isblank
  #  define isblank(x) ((x)==' '||(x)=='\t')

Sincerely,
Klaus

-- 
Klaus Steinberger               Beschleunigerlabor der TU und LMU Muenchen
Phone: (+49 89)289 14287        Hochschulgelaende, D-85748 Garching, Germany
FAX:   (+49 89)289 14280        EMail: Klaus.Steinberger@Physik.Uni-Muenchen.DE
URL: http://www.bl.physik.tu-muenchen.de/~k2/
Stimm gegen Spam:	http://www.politik-digital.de/spam/
In a world without fences and walls, who needs Windows and Gates?

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic