Bruno Haible <[EMAIL PROTECTED]> writes:

> Simon Josefsson wrote:
>> #if defined(HAVE_STRING_H)
>> #  include <string.h>
>> #elif defined(HAVE_STRINGS_H)
>> #  include <strings.h>
>> #endif
>> #if defined(HAVE_MEMORY_H)
>> #  include <memory.h>
>> #endif
>> 
>> Is strings.h needed on any modern platform?
>
> No.
> 1) <string.h> exists on all platforms, for several years now.
>    The #elif branch in the above code is therefore never executed.
> 2) There are a few other functions defined in glibc <strings.h>, but they
>    are not useful. See
>    http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00113.html

I assume that memory.h is a side-effect of using strings.h, and that
memory.h is not needed today either?

I see that argz.c comes from libtool.  Would this patch be acceptable?
I'm cc:ing bug-libtool in case they have some legacy priority that
demand strings.h.

/Simon

--- argz.c      25 Oct 2006 13:16:14 +0200      1.8
+++ argz.c      30 Oct 2006 13:44:32 +0100      
@@ -32,15 +32,7 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <errno.h>
-
-#if defined(HAVE_STRING_H)
 #  include <string.h>
-#elif defined(HAVE_STRINGS_H)
-#  include <strings.h>
-#endif
-#if defined(HAVE_MEMORY_H)
-#  include <memory.h>
-#endif
 
 #define EOS_CHAR '\0'
 


Reply via email to