{"thread":{"id":"32341","subject":"[PATCH 3/4] Generalize the inclusion of strings.h","startedAt":"2012-12-14T19:57:01Z","lastAt":"2012-12-14T19:57:01Z","messageCount":1,"participants":["David Michael"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"204878","messageId":"CAEvUa7mnxWL0SHyEq0jefkxSZWYB-VWG6XoTYrdqP62bOWfamQ@mail.gmail.com","threadId":"32341","inReplyTo":null,"subject":"[PATCH 3/4] Generalize the inclusion of strings.h","fromName":"David Michael","fromEmail":"fedora.dm0@gmail.com","sentAt":"2012-12-14T19:57:01Z","receivedAt":"2012-12-14T19:57:01Z","isPatch":true,"sender":{"key":"fedora.dm0@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1379865?v=4"},"body":"The header strings.h was formerly only included for a particular platform to\ndefine strcasecmp, but another platform requiring this inclusion has been\nfound.  The build system will now include the file based on its presence\ndetermined by configure.\n\nSigned-off-by: David Michael <fedora.dm0@gmail.com>\n---\n Makefile          | 6 ++++++\n configure.ac      | 6 ++++++\n git-compat-util.h | 2 +-\n 3 files changed, 13 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 735a834..fb78f7f 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -74,6 +74,8 @@ all::\n # Define NO_D_TYPE_IN_DIRENT if your platform defines DT_UNKNOWN but lacks\n # d_type in struct dirent (Cygwin 1.5, fixed in Cygwin 1.7).\n #\n+# Define HAVE_STRINGS_H if you have strings.h and need it for strcasecmp.\n+#\n # Define NO_STRCASESTR if you don't have strcasestr.\n #\n # Define NO_MEMMEM if you don't have memmem.\n@@ -1892,6 +1894,10 @@ ifdef HAVE_LIBCHARSET_H\n     EXTLIBS += $(CHARSET_LIB)\n endif\n\n+ifdef HAVE_STRINGS_H\n+    BASIC_CFLAGS += -DHAVE_STRINGS_H\n+endif\n+\n ifdef HAVE_DEV_TTY\n     BASIC_CFLAGS += -DHAVE_DEV_TTY\n endif\ndiff --git a/configure.ac b/configure.ac\nindex 3347c17..4176db8 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -886,6 +886,12 @@ AC_CHECK_HEADER([libcharset.h],\n [HAVE_LIBCHARSET_H=YesPlease],\n [HAVE_LIBCHARSET_H=])\n GIT_CONF_SUBST([HAVE_LIBCHARSET_H])\n+#\n+# Define HAVE_STRINGS_H if you have strings.h\n+AC_CHECK_HEADER([strings.h],\n+[HAVE_STRINGS_H=YesPlease],\n+[HAVE_STRINGS_H=])\n+GIT_CONF_SUBST([HAVE_STRINGS_H])\n # Define CHARSET_LIB if libiconv does not export the locale_charset symbol\n # and libcharset does\n CHARSET_LIB=\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex ace1549..d7359ef 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -99,7 +99,7 @@\n #include <stdlib.h>\n #include <stdarg.h>\n #include <string.h>\n-#ifdef __TANDEM /* or HAVE_STRINGS_H or !NO_STRINGS_H? */\n+#ifdef HAVE_STRINGS_H\n #include <strings.h> /* for strcasecmp() */\n #endif\n #include <errno.h>\n--\n1.7.11.7\n"}]}