guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 241/437: Add fallback logic instead of error if cannot f


From: Andy Wingo
Subject: [Guile-commits] 241/437: Add fallback logic instead of error if cannot figure __WORDSIZE.
Date: Mon, 2 Jul 2018 05:14:29 -0400 (EDT)

wingo pushed a commit to branch lightning
in repository guile.

commit b279feb7c580dabfa6014e41060b1d22fd119712
Author: pcpa <address@hidden>
Date:   Mon Sep 9 19:19:45 2013 -0300

    Add fallback logic instead of error if cannot figure __WORDSIZE.
    
    This was an issue on FreeBSD 8.x, and the logic used is the same as
    FreeBSD 9.1 stdint.h.
---
 include/lightning.h | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/lightning.h b/include/lightning.h
index 5fdbc29..87de1d1 100644
--- a/include/lightning.h
+++ b/include/lightning.h
@@ -48,8 +48,13 @@
 #    else
 #      define __WORDSIZE       64
 #    endif
-#  else
-#    error cannot figure __WORDSIZE
+#  else                                                /* From FreeBSD 9.1 
stdint.h */
+#    if defined(UINTPTR_MAX) && defined(UINT64_MAX) && \
+       (UINTPTR_MAX == UINT64_MAX)
+#      define __WORDSIZE       64
+#    else
+#      define __WORDSIZE       32
+#    endif
 #  endif
 #endif
 #ifndef __LITTLE_ENDIAN



reply via email to

[Prev in Thread] Current Thread [Next in Thread]