From cb35def20795beb81fb85be2b583504dd726abfa Mon Sep 17 00:00:00 2001
From: Mark Grondona <mgrondona@llnl.gov>
Date: Mon, 6 May 2002 22:33:21 +0000
Subject: [PATCH]  o conditionally include config.h  o include inittypes.h if
 available (for systems w/out stdint.h)

---
 src/common/bitstring.h | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/common/bitstring.h b/src/common/bitstring.h
index 1c0d306dfc4..d12f51c7f27 100644
--- a/src/common/bitstring.h
+++ b/src/common/bitstring.h
@@ -15,11 +15,22 @@
  * bitstrings are zero origin
  */
 
-#include <stdint.h>
-
 #ifndef _BITSTRING_H_
 #define	_BITSTRING_H_
 
+#if HAVE_CONFIG_H
+#  include <config.h>
+#  if HAVE_INTTYPES_H
+#    include <inttypes.h>
+#  else
+#    if HAVE_STDINT_H
+#      include <stdint.h>
+#    endif
+#  endif  /* HAVE_INTTYPES_H */
+#else	/* !HAVE_CONFIG_H */
+#  include <inttypes.h>
+#endif  /*  HAVE_CONFIG_H */
+
 #define BITSTR_SHIFT_WORD8	3
 #define BITSTR_SHIFT_WORD32	5
 #define BITSTR_SHIFT_WORD64	6
-- 
GitLab