gmp-6.2.1 on Tru64 with gcc.

Jay K jayk123 at hotmail.com
Sat Jul 3 22:29:15 UTC 2021


On OSF/1/Tru64, inttypes.h lacks uint_least32_t and gcc's stdint.h does have uint_least32_t.

autoconf says uint_least32_t is there because it includes stdint.h, but then:

#if HAVE_INTTYPES_H      /* for uint_least32_t */
# include <inttypes.h>
#else                    <== the problem
# if HAVE_STDINT_H
#  include <stdint.h>
# endif
#endif

leading to:

../gmp-impl.h:233:1: error: unknown type name 'uint_least32_t'
In file included from hgcd_appr.c:35:0:
../gmp-impl.h:233:1: error: unknown type name 'uint_least32_t'

So please remove the else?
and then whitespace and comment:

diff -u gmp-impl.h.orig  gmp-impl.h
--- gmp-impl.h.orig     2021-07-03 18:23:37 -0400
+++ gmp-impl.h  2021-07-03 18:25:04 -0400
@@ -152,12 +152,12 @@
 #endif
 #endif

-#if HAVE_INTTYPES_H      /* for uint_least32_t */
+/* uint_least32_t can be in inttypes.h or stdint.h */
+#if HAVE_INTTYPES_H
 # include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
 #endif

Thank you,
 - Jay


More information about the gmp-devel mailing list