summaryrefslogtreecommitdiff
path: root/src/factor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/factor.c')
-rw-r--r--src/factor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/factor.c b/src/factor.c
index 473eee70d..95451a58d 100644
--- a/src/factor.c
+++ b/src/factor.c
@@ -118,7 +118,14 @@
#endif
#ifndef USE_LONGLONG_H
-# define USE_LONGLONG_H 1
+/* With the way we use longlong.h, it's only safe to use
+ when UWtype = UHWtype, as there were various cases
+ (as can be seen in the history for longlong.h) where
+ for example, _LP64 was required to enable W_TYPE_SIZE==64 code,
+ to avoid compile time or run time issues. */
+# if LONG_MAX == INTMAX_MAX
+# define USE_LONGLONG_H 1
+# endif
#endif
#if USE_LONGLONG_H