r2070: Let's try to overload srnlen and strndup for AIX where they are natly broken.
authorSimo Sorce <idra@samba.org>
Wed, 25 Aug 2004 14:24:16 +0000 (14:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:52:29 +0000 (10:52 -0500)
source/configure.in
source/lib/util_str.c

index d35e89c81f6cd497b51d48ef1b24d1de4dfde69e..4329665ba1a1a0421fddadfdd8587fcca0cc15e4 100644 (file)
@@ -1206,6 +1206,8 @@ if test "$enable_shared" = "yes"; then
                        fi
 
                        AC_DEFINE(STAT_ST_BLOCKSIZE,DEV_BSIZE,[The size of a block])
+                       AC_DEFINE(BROKEN_STRNLEN,1,[Does strnlen work correctly])
+                       AC_DEFINE(BROKEN_STRNDUP,1,[Does strndup work correctly])
                        ;;
                *hpux*) AC_DEFINE(HPUX,1,[Whether the host os is HPUX])
                        SHLIBEXT="sl"
index 1083076edd4d1893621a641335a87f89532086b8..3e6de23e55dc2f89b01f7d084275b007acdef9f4 100644 (file)
@@ -1502,7 +1502,7 @@ int fstr_sprintf(fstring s, const char *fmt, ...)
 }
 
 
-#ifndef HAVE_STRNDUP
+#if !defined(HAVE_STRNDUP) || defined(BROKEN_STRNDUP)
 /**
  Some platforms don't have strndup.
 **/
@@ -1522,7 +1522,7 @@ int fstr_sprintf(fstring s, const char *fmt, ...)
 }
 #endif
 
-#ifndef HAVE_STRNLEN
+#if !defined(HAVE_STRNLEN) || defined(BROKEN_STRNLEN)
 /**
  Some platforms don't have strnlen
 **/