]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
Revert the previous commit and add a comment.
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 18 Feb 2020 17:12:35 +0000 (19:12 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Tue, 18 Feb 2020 17:12:35 +0000 (19:12 +0200)
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.

src/common/tuklib_config.h

index 8f2e9618567769fd1dbf119ef5aab5f2f515cfa8..9d470ba732f106e51b4a0aa0c6411568b5de916e 100644 (file)
@@ -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