-/* 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.
# include "config.h"
#endif
-#include <stdio.h>
-#include <sys/types.h>
-
-#if defined _LIBC || defined STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-char *malloc ();
-#endif
+#include <stdlib.h>
+#include <string.h>
#ifndef HAVE_DECL_STRNLEN
"this configure-time declaration test was not run"
return NULL;
new[len] = '\0';
- return (char *) memcpy (new, s, len);
+ return memcpy (new, s, len);
}
#ifdef weak_alias
weak_alias (__strndup, strndup)
-# strndup.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# strndup.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
# Prerequisites of lib/strndup.c.
AC_DEFUN([gl_PREREQ_STRNDUP], [
- AC_REQUIRE([AC_HEADER_STDC])
AC_CHECK_DECLS(strnlen)
])