aboutsummaryrefslogtreecommitdiff
path: root/src/common/tuklib_config.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2020-02-18 19:12:35 +0200
committerLasse Collin <lasse.collin@tukaani.org>2020-02-18 19:12:35 +0200
commitfddd31175e74a538997a939d930462fde17d2dd4 (patch)
tree72d855e9617a14407f8c7ce488877d1ab284044c /src/common/tuklib_config.h
parentDo not check for HAVE_CONFIG_H in tuklib_config.h. (diff)
downloadxz-fddd31175e74a538997a939d930462fde17d2dd4.tar.xz
Revert the previous commit and add a comment.
The previous commit broke crc32_tablegen.c. If the whole package is built without config.h (with defines set on the compiler command line) this should still work fine as long as these headers conform to C99 well enough.
Diffstat (limited to 'src/common/tuklib_config.h')
-rw-r--r--src/common/tuklib_config.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/common/tuklib_config.h b/src/common/tuklib_config.h
index 8f2e9618..9d470ba7 100644
--- a/src/common/tuklib_config.h
+++ b/src/common/tuklib_config.h
@@ -1,7 +1,10 @@
-#include "sysdefs.h"
-
-// sysdefs.h takes care of these.
-// #include <stddef.h>
-// #include <stdbool.h>
-// #include <inttypes.h>
-// #include <limits.h>
+// If config.h isn't available, assume that the headers required by
+// tuklib_common.h are available. This is required by crc32_tablegen.c.
+#ifdef HAVE_CONFIG_H
+# include "sysdefs.h"
+#else
+# include <stddef.h>
+# include <stdbool.h>
+# include <inttypes.h>
+# include <limits.h>
+#endif