Include strings.h where available
authorEli Zaretskii <eliz@gnu.org>
Fri, 14 Oct 2016 07:08:25 +0000 (10:08 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 14 Oct 2016 07:08:25 +0000 (10:08 +0300)
gdb/ChangeLog

2016-10-14  Eli Zaretskii  <eliz@gnu.org>

* common/common-defs.h [HAVE_STRINGS_H]: Include strings.h if
available, to get prototypes of 'strcasecmp' and 'strncasecmp'.

gdb/ChangeLog
gdb/common/common-defs.h

index 57fdc643014a0c0bbaccb7d09fcc6ff37a778d71..045bdc8db442f6162f117bf4f6899ef0aa90b022 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-14  Eli Zaretskii  <eliz@gnu.org>
+
+       * common/common-defs.h [HAVE_STRINGS_H]: Include strings.h if
+       available, to get prototypes of 'strcasecmp' and 'strncasecmp'.
+
 2016-10-13  Pedro Alves  <palves@redhat.com>
 
        * contrib/ari/gdb_ari.sh (boolean): Suggest bool instead.
index 0d8d1001b1443a1d5ba03fcbfb9d011e4b29abd2..b82906f1ebc6fed652cd7145eb5e3d7d5c3cb098 100644 (file)
@@ -49,6 +49,9 @@
 #include <stdint.h>
 
 #include <string.h>
+#ifdef HAVE_STRINGS_H
+#include <strings.h>   /* for strcasecmp and strncasecmp */
+#endif
 #include <errno.h>
 #include <alloca.h>