From 8399430859147b9e5746ba21e70b7b57283d5e27 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 20 Jun 2013 18:26:04 +0200 Subject: [PATCH 1/5] waf: fix build on AIX7 the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did) Signed-off-by: Christian Ambach --- buildtools/wafsamba/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 17aef27..d115b5f 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -322,7 +322,7 @@ def configure(conf): else: conf.env.HAVE_LD_VERSION_SCRIPT = False - if sys.platform == "aix5" or sys.platform == "aix6": + if sys.platform.startswith('aix'): conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) # Might not be needed if ALL_SOURCE is defined # conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True) -- 1.7.11.7 From cf4d882a21b743fab01d6a6c8a53438f09fe0cd0 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 20 Jun 2013 18:27:13 +0200 Subject: [PATCH 2/5] s3:lib/system fix build on AIX 7 AIX uses struct stat64 with struct timespec64, do direct assignment does not work any more. Pair-Programmed-With: Volker Lendecke Signed-off-by: Christian Ambach --- source3/lib/system.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source3/lib/system.c b/source3/lib/system.c index 8dbf7dc..8252e4f 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -228,7 +228,10 @@ static struct timespec get_atimespec(const struct stat *pst) return ret; #else #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - return pst->st_atim; + struct timespec ret; + ret.tv_sec = pst->st_atim.tv_sec; + ret.tv_nsec = pst->st_atim.tv_nsec; + return ret; #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) struct timespec ret; ret.tv_sec = pst->st_atime; @@ -263,7 +266,10 @@ static struct timespec get_mtimespec(const struct stat *pst) return ret; #else #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - return pst->st_mtim; + struct timespec ret; + ret.tv_sec = pst->st_mtim.tv_sec; + ret.tv_nsec = pst->st_mtim.tv_nsec; + return ret; #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) struct timespec ret; ret.tv_sec = pst->st_mtime; @@ -298,7 +304,10 @@ static struct timespec get_ctimespec(const struct stat *pst) return ret; #else #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - return pst->st_ctim; + struct timespec ret; + ret.tv_sec = pst->st_ctim.tv_sec; + ret.tv_nsec = pst->st_ctim.tv_nsec; + return ret; #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) struct timespec ret; ret.tv_sec = pst->st_ctime; -- 1.7.11.7 From d39473ac055cd84eeccce1bd94a80063093afa5b Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 25 Jun 2013 18:37:35 +0200 Subject: [PATCH 3/5] waf: add --without-gettext option Signed-off-by: Christian Ambach --- buildtools/wafsamba/wscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index d115b5f..fe2e515 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -82,6 +82,9 @@ def set_options(opt): help='additional directory to search for gettext', action='store', dest='gettext_location', default='/usr/local', match = ['Checking for library intl', 'Checking for header libintl.h']) + opt.add_option('--without-gettext', + help=("Disable use of gettext"), + action="store_true", dest='disable_gettext', default=False) gr = opt.option_group('developer options') -- 1.7.11.7 From cf2bd9878139cb418bdf62e9e2023b416ec089a0 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 25 Jun 2013 18:38:23 +0200 Subject: [PATCH 4/5] lib/replace skip gettext checks when configured with --without-gettext Signed-off-by: Christian Ambach --- lib/replace/wscript | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index 2117f56..43a7ff0 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -363,17 +363,19 @@ removeea setea headers='netinet/in.h arpa/nameser.h resolv.h') - if not conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h'): - # Some hosts need lib iconv for linking with lib intl - # So we try with flags just in case it helps. - oldflags = conf.env['LDFLAGS_INTL'] - conf.env['LDFLAGS_INTL'] = "-liconv" - if not conf.CHECK_LIB('intl'): - conf.env['LDFLAGS_INTL'] = oldflags - else: - conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h') - - conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h') + if not Options.options.disable_gettext: + if not conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h'): + # Some hosts need lib iconv for linking with lib intl + # So we try with flags just in case it helps. + oldflags = conf.env['LDFLAGS_INTL'] + conf.env['LDFLAGS_INTL'] = "-liconv" + if not conf.CHECK_LIB('intl'): + conf.env['LDFLAGS_INTL'] = oldflags + else: + conf.CHECK_FUNCS_IN('gettext', 'intl', checklibc=True, headers='libintl.h') + + conf.CHECK_FUNCS_IN('dgettext gettext', 'intl', headers='libintl.h') + conf.CHECK_FUNCS_IN('pthread_create', 'pthread', checklibc=True, headers='pthread.h') conf.CHECK_FUNCS_IN('crypt', 'crypt', checklibc=True) -- 1.7.11.7 From ae6b8a524c8b6b850d106eb93bc6ac4f583530fa Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Tue, 25 Jun 2013 18:39:24 +0200 Subject: [PATCH 5/5] s3-waf: skip tests for gettext this is already done in lib/replace Signed-off-by: Christian Ambach --- source3/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/wscript b/source3/wscript index 3c0145b..4cefd06 100644 --- a/source3/wscript +++ b/source3/wscript @@ -98,7 +98,7 @@ def configure(conf): conf.CHECK_FUNCS('memalign posix_memalign hstrerror') conf.CHECK_FUNCS('shmget') conf.CHECK_FUNCS_IN('shm_open', 'rt', checklibc=True) - conf.CHECK_FUNCS('gettext dgettext bindtextdomain textdomain bind_textdomain_codeset') + conf.CHECK_FUNCS('bindtextdomain textdomain bind_textdomain_codeset') #FIXME: for some reason this one still fails conf.CHECK_FUNCS_IN('yp_get_default_domain', 'nsl') conf.CHECK_FUNCS_IN('dn_expand _dn_expand __dn_expand', 'resolv') -- 1.7.11.7