The Samba-Bugzilla – Attachment 416 Details for
Bug 1097
strnlen and strndup broken on AIX
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Configure test for broken strnlen
broken-strnlen.patch (text/plain), 1.73 KB, created by
Tim Potter
on 2004-02-20 15:41:36 UTC
(
hide
)
Description:
Configure test for broken strnlen
Filename:
MIME Type:
Creator:
Tim Potter
Created:
2004-02-20 15:41:36 UTC
Size:
1.73 KB
patch
obsolete
>Index: configure.in >=================================================================== >RCS file: /data/cvs/samba/source/configure.in,v >retrieving revision 1.525 >diff -u -r1.525 configure.in >--- configure.in 19 Feb 2004 21:56:49 -0000 1.525 >+++ configure.in 20 Feb 2004 23:39:00 -0000 >@@ -2227,6 +2227,31 @@ > AC_DEFINE(BROKEN_NISPLUS_INCLUDE_FILES,1,[Whether the nisplus include files are broken]) > fi > >+################################################# >+# If you can believe it some versions of AIX have a broken strnlen. >+# Actually it isn't a POSIX function so there is no official definition. >+ >+if test x"$ac_cv_func_strnlen" = x"yes"; then >+ AC_CACHE_CHECK([for broken strnlen],samba_cv_HAVE_BROKEN_STRNLEN, [ >+ AC_TRY_RUN_STRICT([ >+#include <stdio.h> >+#include <string.h> >+int main(void) >+{ >+ char *s1 = "01234567891"; >+ int len = strnlen(s1,10); >+ >+ if (len == 10) >+ return 1; >+ return 0; >+} >+ ],[],[$CPPFLAGS],[$LDFLAGS], >+ samba_cv_HAVE_BROKEN_STRNLEN=yes,samba_cv_HAVE_BROKEN_STRNLEN=no)]) >+ >+ if test x"$samba_cv_HAVE_BROKEN_STRNLEN" = x"yes"; then >+ AC_DEFINE(HAVE_BROKEN_STRNLEN,1,[Whether strnlen is broken]) >+ fi >+fi > > ################################################# > # check for smbwrapper support >Index: lib/util_str.c >=================================================================== >RCS file: /data/cvs/samba/source/lib/util_str.c,v >retrieving revision 1.109 >diff -u -r1.109 util_str.c >--- lib/util_str.c 13 Feb 2004 22:35:02 -0000 1.109 >+++ lib/util_str.c 20 Feb 2004 23:39:03 -0000 >@@ -1432,9 +1432,9 @@ > } > #endif > >-#ifndef HAVE_STRNLEN >+#if !defined(HAVE_STRNLEN) || defined(HAVE_BROKEN_STRNLEN) > /** >- Some platforms don't have strnlen >+ Some platforms don't have strnlen or it's broken > **/ > > size_t strnlen(const char *s, size_t n)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1097
:
409
| 416