Skip to content

Instantly share code, notes, and snippets.

@boxbackup-bot
Created May 19, 2019 10:03
Show Gist options
  • Save boxbackup-bot/73eff8f444a6c1e8089e6f8f5ceff759 to your computer and use it in GitHub Desktop.
Save boxbackup-bot/73eff8f444a6c1e8089e6f8f5ceff759 to your computer and use it in GitHub Desktop.
Trac issue 4 attachment
Index: infrastructure/BoxPlatform.pm.in
===================================================================
--- infrastructure/BoxPlatform.pm.in (revision 555)
+++ infrastructure/BoxPlatform.pm.in (working copy)
@@ -17,7 +17,7 @@
$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
$make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq
'SunOS') ? 'gmake' : 'make';
- $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&
$build_os ne "SunOS");
+ $bsd_make = ($build_os ne 'AIX' && $build_os ne 'Linux' && $build_os
ne 'CYGWIN' && $build_os ne "SunOS");
# blank extra flags by default
$platform_compile_line_extra = '@CPPFLAGS@ @CXXFLAGS@
@CXXFLAGS_STRICT@';
Index: configure.ac
===================================================================
--- configure.ac (revision 555)
+++ configure.ac (working copy)
@@ -43,6 +43,8 @@
AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])
VL_LIB_READLINE([have_libreadline=yes], [have_libreadline=no])
+AC_SEARCH_LIBS([pthread_cond_init], [pthread])
+
## Check for Berkely DB. Restrict to certain versions
AX_PATH_BDB(, [
LIBS="$BDB_LIBS $LIBS"
Index: lib/common/BoxPlatform.h
===================================================================
--- lib/common/BoxPlatform.h (revision 555)
+++ lib/common/BoxPlatform.h (working copy)
@@ -46,6 +46,11 @@
#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
#endif
+// On AIX too...
+#ifdef _AIX
+#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE
+#endif
+
// Disable memory testing under Darwin, it just doesn't like it very much.
#ifdef __APPLE__
// TODO: We really should get some decent leak detection code.
Index: lib/common/StreamableMemBlock.cpp
===================================================================
--- lib/common/StreamableMemBlock.cpp (revision 555)
+++ lib/common/StreamableMemBlock.cpp (working copy)
@@ -260,6 +260,11 @@
// Allocate a new block (this way to be exception safe)
+#ifdef _AIX
+ // Ugly hack to avoid returning NULL on AIX when size == 0
+ // This should be fixed some other way...
+ if(size == 0) size = 1;
+#endif
char *pblock = (char*)malloc(size);
if(pblock == 0)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment