summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-05-22 17:23:30 +1000
committerJeremy Allison <jra@samba.org>2013-05-23 03:52:10 +0200
commit9ddfd7d8784e6f546628f48990b69ee2850be52d (patch)
tree4f485437320aae1f9945fb4b567acbe48f94c7af /lib
parente896f3c5bf5dee3c771985cd9dd2eb376481c22b (diff)
downloadsamba-9ddfd7d8784e6f546628f48990b69ee2850be52d.tar.gz
samba-9ddfd7d8784e6f546628f48990b69ee2850be52d.tar.bz2
samba-9ddfd7d8784e6f546628f48990b69ee2850be52d.zip
lib/replace: Set BROKEN_STRNLEN and BROKEN_STRNDUP on all AIX
The background is in https://bugzilla.samba.org/show_bug.cgi?id=1097 and wider reports are at http://stackoverflow.com/questions/2091460/strndup-call-is-currupting-stack-frames Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 23 03:52:10 CEST 2013 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/replace/wscript13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index bc45ee9043..2117f56e22 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -228,6 +228,19 @@ struct foo bar = { .y = 'X', .x = 1 };
# these may be builtins, so we need the link=False strategy
conf.CHECK_FUNCS('strdup memmem printf memset memcpy memmove strcpy strncpy bzero', link=False)
+ # See https://bugzilla.samba.org/show_bug.cgi?id=1097
+ #
+ # Ported in from autoconf where it was added with this commit:
+ # commit 804cfb20a067b4b687089dc72a8271b3abf20f31
+ # Author: Simo Sorce <idra@samba.org>
+ # Date: Wed Aug 25 14:24:16 2004 +0000
+ # r2070: Let's try to overload srnlen and strndup for AIX where they are natly broken.
+
+ host_os = sys.platform
+ if host_os.rfind('aix') > -1:
+ conf.DEFINE('BROKEN_STRNLEN', 1)
+ conf.DEFINE('BROKEN_STRNDUP', 1)
+
conf.CHECK_FUNCS('shl_load shl_unload shl_findsym')
conf.CHECK_FUNCS('pipe strftime srandom random srand rand usleep setbuffer')
conf.CHECK_FUNCS('lstat getpgrp utime utimes setuid seteuid setreuid setresuid setgid setegid')