svn commit: samba r20112 - in branches/SAMBA_3_0_24/source/lib: .

jra at samba.org jra at samba.org
Mon Dec 11 20:41:11 GMT 2006


Author: jra
Date: 2006-12-11 20:41:11 +0000 (Mon, 11 Dec 2006)
New Revision: 20112

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20112

Log:
Forgot to merge to 3.0.24 - *BSD compile fix.
Jeremy.

Modified:
   branches/SAMBA_3_0_24/source/lib/util.c


Changeset:
Modified: branches/SAMBA_3_0_24/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0_24/source/lib/util.c	2006-12-11 20:14:49 UTC (rev 20111)
+++ branches/SAMBA_3_0_24/source/lib/util.c	2006-12-11 20:41:11 UTC (rev 20112)
@@ -2434,8 +2434,16 @@
 #undef strdup
 #endif
 #endif
+
+#ifndef HAVE_STRDUP
+#define strdup rep_strdup
+#endif
+
 	char *s1 = strdup(s);
 #if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strdup
+#undef strdup
+#endif
 #define strdup(s) __ERROR_DONT_USE_STRDUP_DIRECTLY
 #endif
 	if (!s1)
@@ -2455,8 +2463,17 @@
 #undef strndup
 #endif
 #endif
+
+#if (defined(BROKEN_STRNDUP) || !defined(HAVE_STRNDUP))
+#undef HAVE_STRNDUP
+#define strndup rep_strndup
+#endif
+
 	char *s1 = strndup(s, n);
 #if defined(PARANOID_MALLOC_CHECKER)
+#ifdef strndup
+#undef strndup
+#endif
 #define strndup(s,n) __ERROR_DONT_USE_STRNDUP_DIRECTLY
 #endif
 	if (!s1)



More information about the samba-cvs mailing list