wingo pushed a commit to branch lightning
in repository guile.

commit b279feb7c580dabfa6014e41060b1d22fd119712
Author: pcpa <[email protected]>
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