[Box Backup-dev] AIX 5 patch

Stefan Norlin boxbackup-dev at fluffy.co.uk
Tue Apr 25 14:49:22 BST 2006


This is a multi-part message in MIME format.

------=_NextPart_000_02FE_01C6687F.D28C6770
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_02FF_01C6687F.D28C6770"


------=_NextPart_001_02FF_01C6687F.D28C6770
Content-Type: text/plain;
	charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

Hi,

with the attached diff I can compile on AIX 5 and Box Backup
works seemingly ok. I do not consider it a clean portability work
but it is an indication where something needs to be done. Also
there are very few and minor changes which I think is good.

All tests do not pass, I am looking at that. raidfile is one problem
and a bbstored that does not stop is another.

However, I am able to take snapshot backup, browse it and compare
it ok using bbackupquery.

The workaround for malloc(0) is not beatiful but it solves my
problem temporarily.

The installed version of BDB 4.4 depends on pthread library from
which the "hack" in configure.ac originates.

It would be great to be able to link OpenSSL and libdb statically in
order to not have to compile Box for each installation when the OS
versions are not exactly the same and therefore dependencies do
not always work out with dynamic libraries.

For what it is worth...

Regards,
Stefan

------=_NextPart_001_02FF_01C6687F.D28C6770
Content-Type: text/html;
	charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-15">
<META content=3D"MSHTML 6.00.2900.2802" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>with the attached diff I can compile on =
AIX 5 and=20
Box Backup</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>works seemingly ok. I do not consider =
it=20
</FONT><FONT face=3DArial size=3D2>a clean portability work</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>but it is an indication where something =

</FONT><FONT face=3DArial size=3D2>needs to be done. Also</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>there are very few and minor changes =
</FONT><FONT=20
face=3DArial size=3D2>which I think is good.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>All tests do not pass, I am looking at =
that.=20
raidfile is one problem</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and a bbstored that does not stop is=20
another.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>However, I am able to take snapshot =
backup, browse=20
it and compare</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>it </FONT><FONT face=3DArial =
size=3D2>ok using=20
bbackupquery.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The workaround for malloc(0) is not =
beatiful but it=20
solves my</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>problem temporarily.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The installed version of BDB 4.4 =
depends on pthread=20
library from</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>which the "hack" in configure.ac=20
originates.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>It would be great to be able to link =
OpenSSL and=20
libdb statically in</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>order to </FONT><FONT face=3DArial =
size=3D2>not have to=20
compile Box for each installation when the OS</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>versions are not exactly the same and =
therefore=20
dependencies do</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>not always work out with dynamic=20
libraries.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>For what it is worth...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Regards,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Stefan</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>

------=_NextPart_001_02FF_01C6687F.D28C6770--

------=_NextPart_000_02FE_01C6687F.D28C6770
Content-Type: text/plain;
	name="aix5-svn-diff.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="aix5-svn-diff.txt"

Index: infrastructure/BoxPlatform.pm.in=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
--- infrastructure/BoxPlatform.pm.in    (revision 555)=0A=
+++ infrastructure/BoxPlatform.pm.in    (working copy)=0A=
@@ -17,7 +17,7 @@=0A=
        $build_os =3D 'CYGWIN' if $build_os =3D~ m/CYGWIN/;=0A=
 =0A=
        $make_command =3D ($build_os eq 'Darwin') ? 'bsdmake' : =
($build_os eq=0A=
'SunOS') ? 'gmake' : 'make';=0A=
-       $bsd_make =3D ($build_os ne 'Linux' && $build_os ne 'CYGWIN' &&=0A=
        $build_os ne "SunOS");=0A=
+       $bsd_make =3D ($build_os ne 'AIX' && $build_os ne 'Linux' && =
$build_os=0A=
ne 'CYGWIN' && $build_os ne "SunOS");=0A=
 =0A=
        # blank extra flags by default=0A=
        $platform_compile_line_extra =3D '@CPPFLAGS@ @CXXFLAGS@=0A=
@CXXFLAGS_STRICT@';=0A=
Index: configure.ac=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
--- configure.ac        (revision 555)=0A=
+++ configure.ac        (working copy)=0A=
@@ -43,6 +43,8 @@=0A=
 AC_CHECK_LIB([z], [zlibVersion],, [AC_MSG_ERROR([[cannot find zlib]])])=0A=
 VL_LIB_READLINE([have_libreadline=3Dyes], [have_libreadline=3Dno])=0A=
 =0A=
+AC_SEARCH_LIBS([pthread_cond_init], [pthread])=0A=
+=0A=
 ## Check for Berkely DB. Restrict to certain versions=0A=
 AX_PATH_BDB(, [=0A=
   LIBS=3D"$BDB_LIBS $LIBS"=0A=
Index: lib/common/BoxPlatform.h=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
--- lib/common/BoxPlatform.h    (revision 555)=0A=
+++ lib/common/BoxPlatform.h    (working copy)=0A=
@@ -46,6 +46,11 @@=0A=
        #define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE=0A=
 #endif=0A=
 =0A=
+// On AIX too...=0A=
+#ifdef _AIX=0A=
+#define PLATFORM_CLIB_FNS_INTERCEPTION_IMPOSSIBLE=0A=
+#endif=0A=
+=0A=
 // Disable memory testing under Darwin, it just doesn't like it very =
much.=0A=
 #ifdef __APPLE__=0A=
        // TODO: We really should get some decent leak detection code.=0A=
Index: lib/common/StreamableMemBlock.cpp=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
--- lib/common/StreamableMemBlock.cpp   (revision 555)=0A=
+++ lib/common/StreamableMemBlock.cpp   (working copy)=0A=
@@ -260,6 +260,11 @@=0A=
        =0A=
        =0A=
        // Allocate a new block (this way to be exception safe)=0A=
+#ifdef _AIX=0A=
+       // Ugly hack to avoid returning NULL on AIX when size =3D=3D 0=0A=
+       // This should be fixed some other way...=0A=
+       if(size =3D=3D 0) size =3D 1;=0A=
+#endif=0A=
        char *pblock =3D (char*)malloc(size);=0A=
        if(pblock =3D=3D 0)=0A=
        {=0A=

------=_NextPart_000_02FE_01C6687F.D28C6770--




More information about the Boxbackup-dev mailing list