Include memory.h, string.h, and/or strings.h as needed.
authorJim Meyering <jim@meyering.net>
Sun, 18 Jun 2000 18:16:54 +0000 (18:16 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 18 Jun 2000 18:16:54 +0000 (18:16 +0000)
(this snippet comes from src/system.h).

lib/strnlen.c

index f5681ca..556d2d5 100644 (file)
 # include <config.h>
 #endif
 
-#include <string.h>
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#else
+# include <strings.h>
+#endif
 
 #ifndef HAVE_DECL_MEMCHR
 "this configure-time declaration test was not run"