Ticket #4: aix5-svn.patch

File aix5-svn.patch, 2.3 KB (added by martin, 4 years ago)

Initial patch from Stefan

Line 
1Index: infrastructure/BoxPlatform.pm.in
2===================================================================
3--- infrastructure/BoxPlatform.pm.in    (revision 555)
4+++ infrastructure/BoxPlatform.pm.in    (working copy)
5@@ -17,7 +17,7 @@
6        $build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
7 
8        $make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq
9'SunOS') ? 'gmake' : 'make';
10-       $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&
11        $build_os ne "SunOS");
12+       $bsd_make = ($build_os ne 'AIX' && $build_os ne 'Linux' && $build_os
13ne 'CYGWIN' && $build_os ne "SunOS");
14 
15        # blank extra flags by default
16        $platform_compile_line_extra = '@CPPFLAGS@ @CXXFLAGS@
17@CXXFLAGS_STRICT@';
18Index: configure.ac
19===================================================================
20--- configure.ac        (revision 555)
21+++ configure.ac        (working copy)
22@@ -43,6 +43,8 @@
23 AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])
24 VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no])
25 
26+AC_SEARCH_LIBS([pthread_cond_init], [pthread])
27+
28 ## Check for Berkely DB. Restrict to certain versions
29 AX_PATH_BDB(, [
30   LIBS="$BDB_LIBS $LIBS"
31Index: lib/common/BoxPlatform.h
32===================================================================
33--- lib/common/BoxPlatform.h    (revision 555)
34+++ lib/common/BoxPlatform.h    (working copy)
35@@ -46,6 +46,11 @@
36        #define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
37 #endif
38 
39+// On AIX too...
40+#ifdef _AIX
41+#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
42+#endif
43+
44 // Disable memory testing under Darwin, it just doesn't like it very much.
45 #ifdef __APPLE__
46        // TODO: We really should get some decent leak detection code.
47Index: lib/common/StreamableMemBlock.cpp
48===================================================================
49--- lib/common/StreamableMemBlock.cpp   (revision 555)
50+++ lib/common/StreamableMemBlock.cpp   (working copy)
51@@ -260,6 +260,11 @@
52       
53       
54        // Allocate a new block (this way to be exception safe)
55+#ifdef _AIX
56+       // Ugly hack to avoid returning NULL on AIX when size == 0
57+       // This should be fixed some other way...
58+       if(size == 0) size = 1;
59+#endif
60        char *pblock = (char*)malloc(size);
61        if(pblock == 0)
62        {