This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] include/posix.h


Hello all,

to complete the HP-UX PA port we need to modify the file in the subject.

We conflict with the gcj/javaprims.h and the Boolean.h when we compile java/net/natVMNetworkInterfacePosix.cc

The reason comes from the system header sys/rw_lock.h:

-----


/*
* For source compatibility, need to continue defining TRUE and FALSE for
* user-level applications. Although this file defines a kernel only service,
* some user-level applications are indirectly including this file and
* depending on the defines for TRUE and FALSE. These defines need to
* remain until all the user-level issues have been handled.
*/
#ifndef _KERNEL
#ifndef TRUE
#define TRUE 1
#define FALSE 0
#else
#if ((TRUE != 1) || (FALSE != 0))
This is probably not a good thing....
#endif
#endif /* !TRUE */


-----

Do you have a better idea or is the below ok?

Thanks,
Andreas


2006-05-20 Andreas Tobler <a.tobler@schweiz.ch>


* include/posix.h: Undefine TRUE and FALSE.


Index: include/posix.h =================================================================== --- include/posix.h (revision 113914) +++ include/posix.h (working copy) @@ -47,6 +47,8 @@ #else #define _Jv_platform_solib_suffix ".so" #endif +#undef TRUE +#undef FALSE

// Some POSIX systems don't have O_SYNC and O_DYSNC so we define them here.
// Needed in java/io/natFileDescriptorPosix.cc.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]