summaryrefslogtreecommitdiff
path: root/source4/lib/util_str.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-25 10:25:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:41 -0500
commit98f9d5cdf6451298001dc7ac71336d4206010181 (patch)
tree059eb00e409afa8c22304d00a3b0958813d22d3b /source4/lib/util_str.c
parent17781196bf4f4ab8943bdc6c20225e1028aab1a6 (diff)
downloadsamba-98f9d5cdf6451298001dc7ac71336d4206010181.tar.gz
samba-98f9d5cdf6451298001dc7ac71336d4206010181.tar.bz2
samba-98f9d5cdf6451298001dc7ac71336d4206010181.zip
r3210: split lib/replace.o into a separate build subsystem LIBREPLACE, and
make the ldb tools depend on it. This should help the build of the ldb tools on platforms without strnlen() or strndup() (This used to be commit e6ddb9d8f3a218b22b0176a2525b5daaca7170e4)
Diffstat (limited to 'source4/lib/util_str.c')
-rw-r--r--source4/lib/util_str.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/source4/lib/util_str.c b/source4/lib/util_str.c
index 07a2c1dbd1..95c0b84d98 100644
--- a/source4/lib/util_str.c
+++ b/source4/lib/util_str.c
@@ -872,39 +872,6 @@ char *binary_string(char *buf, int len)
return s;
}
-#ifndef HAVE_STRNDUP
-/**
- Some platforms don't have strndup.
-**/
- char *strndup(const char *s, size_t n)
-{
- char *ret;
-
- n = strnlen(s, n);
- ret = malloc(n+1);
- if (!ret)
- return NULL;
- memcpy(ret, s, n);
- ret[n] = 0;
-
- return ret;
-}
-#endif
-
-#ifndef HAVE_STRNLEN
-/**
- Some platforms don't have strnlen
-**/
- size_t strnlen(const char *s, size_t n)
-{
- int i;
- for (i=0; s[i] && i<n; i++)
- /* noop */ ;
- return i;
-}
-#endif
-
-
/**
Unescape a URL encoded string, in place.
**/