aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2023-01-10 11:56:11 +0200
committerLasse Collin <lasse.collin@tukaani.org>2023-01-11 17:49:59 +0200
commit674c89fdb8c457ebc3a0652e235d8b6cd7b7dee2 (patch)
tree0c550e64b9e101c1d24255b2e1818c7313bfb540
parentxz: Include <strings.h> in suffix.c if needed for strcasecmp(). (diff)
downloadxz-674c89fdb8c457ebc3a0652e235d8b6cd7b7dee2.tar.xz
sysdefs.h: Don't include strings.h anymore.
On some platforms src/xz/suffix.c may need <strings.h> for strcasecmp() but suffix.c includes the header when it needs it. Unless there is an old system that otherwise supports enough C99 to build XZ Utils but doesn't have C89/C90-compatible <string.h>, there should be no need to include <strings.h> in sysdefs.h.
-rw-r--r--src/common/sysdefs.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
index 2fbcd593..97be4ee3 100644
--- a/src/common/sysdefs.h
+++ b/src/common/sysdefs.h
@@ -149,14 +149,8 @@ typedef unsigned char _Bool;
# define __bool_true_false_are_defined 1
#endif
-// string.h should be enough but let's include strings.h too if it exists
-// since that shouldn't do any harm but may improve portability.
#include <string.h>
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-
// As of MSVC 2013, inline and restrict are supported with
// non-standard keywords.
#if defined(_WIN32) && defined(_MSC_VER)