projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused vars and decls in obstack.
[gnulib.git]
/
lib
/
strndup.c
diff --git
a/lib/strndup.c
b/lib/strndup.c
index
6f59717
..
f85627e
100644
(file)
--- a/
lib/strndup.c
+++ b/
lib/strndup.c
@@
-1,4
+1,4
@@
-/* Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000
, 2003
Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@
-21,14
+21,14
@@
# include "config.h"
#endif
# include "config.h"
#endif
-#include <std
io
.h>
-#include <s
ys/types
.h>
+#include <std
lib
.h>
+#include <s
tring
.h>
-#if
defined _LIBC || defined STDC_HEADERS
-# include <stdlib.h>
-#
include <string.h>
-#
else
-
char *malloc
();
+#if
ndef HAVE_DECL_STRNLEN
+"this configure-time declaration test was not run"
+#
endif
+#
if !HAVE_DECL_STRNLEN
+
size_t strnlen
();
#endif
#undef __strndup
#endif
#undef __strndup
@@
-48,7
+48,7
@@
__strndup (const char *s, size_t n)
return NULL;
new[len] = '\0';
return NULL;
new[len] = '\0';
- return
(char *)
memcpy (new, s, len);
+ return memcpy (new, s, len);
}
#ifdef weak_alias
weak_alias (__strndup, strndup)
}
#ifdef weak_alias
weak_alias (__strndup, strndup)