[Botan-devel] Botan on Solaris

Jack Lloyd lloyd at randombit.net
Tue Dec 2 12:23:49 EST 2008


On Tue, Dec 02, 2008 at 05:36:30PM +0100, Rickard Bondesson wrote:
> Hmmm, now I got this. Seems like more missing headers. Sorry for the trouble...
> 

Actually it's apparently quite a bit more messy than that:

http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6395191

"If -D_XOPEN_SOURCE_EXTENDED=1, g++ cannot compile even an empty body
that #includes <iostream>.  If it's undefined, then gcc cannot compile
C code."

My bet is that removing the XOPEN defines entirely will do the trick
for everywhere, since botan isn't really using anything too exotic on
the Unix interface side.

Patch trying this attached, let me know if it helps.

-Jack
-------------- next part --------------
#
# old_revision [729e0e8c82616b76d7525791360566f3b10d6338]
#
# patch "src/alloc/alloc_mmap/mmap_mem.cpp"
#  from [a869406286cb0af53a30ae6343136b3a0d01b753]
#    to [da6c129f2262c2bc00513107acb05c58527720d4]
# 
# patch "src/entropy/unix_procs/unix_cmd.cpp"
#  from [323234c8a55b841b479b34dd26722d02cfb89b24]
#    to [fed918cb7cd797bfdf88c7b8b215fb12996a76ae]
#
============================================================
--- src/alloc/alloc_mmap/mmap_mem.cpp   a869406286cb0af53a30ae6343136b3a0d01b753
+++ src/alloc/alloc_mmap/mmap_mem.cpp   da6c129f2262c2bc00513107acb05c58527720d4
@@ -6,14 +6,6 @@
 #include <botan/mmap_mem.h>
 #include <cstring>
 
-#ifndef _XOPEN_SOURCE
-  #define _XOPEN_SOURCE 500
-#endif
-
-#ifndef _XOPEN_SOURCE_EXTENDED
-  #define _XOPEN_SOURCE_EXTENDED 1
-#endif
-
 #include <sys/types.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
============================================================
--- src/entropy/unix_procs/unix_cmd.cpp 323234c8a55b841b479b34dd26722d02cfb89b24
+++ src/entropy/unix_procs/unix_cmd.cpp fed918cb7cd797bfdf88c7b8b215fb12996a76ae
@@ -3,14 +3,6 @@
 * (C) 1999-2007 Jack Lloyd                       *
 *************************************************/
 
-#ifndef _XOPEN_SOURCE
-  #define _XOPEN_SOURCE 500
-#endif
-
-#ifndef _XOPEN_SOURCE_EXTENDED
-  #define _XOPEN_SOURCE_EXTENDED 1
-#endif
-
 #include <botan/unix_cmd.h>
 #include <botan/parsing.h>
 #include <botan/exceptn.h>


More information about the botan-devel mailing list