bug-gmp
[Top][All Lists]
Advanced

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

Defines under MacOS X


From: Jon Becker
Subject: Defines under MacOS X
Date: Wed, 22 Aug 2001 09:27:46 -0700 (PDT)

Hi there,

It appears that cc under MacOS X does not define either "_ARCH_PPC" or
"__powerpc__" (or "_ARCH_PWR" or course).  As a result, a bunch of
things defined in longlong.h which could be in assembly are falling
back to C versions.

The symbol "__ppc__" is defined, so the following patch should do the
trick:

--- gmp-3.1.1.old/longlong.h    Mon Jul 24 10:04:09 2000
+++ gmp-3.1.1.new/longlong.h    Wed Aug 22 08:58:53 2001
@@ -672,7 +672,7 @@

 /* We should test _IBMR2 here when we add assembly support for the system
    vendor compilers.  */
-#if (defined (_ARCH_PPC) || defined (_ARCH_PWR) || defined (__powerpc__)) && 
W_TYPE_SIZE == 32
+#if (defined (_ARCH_PPC) || defined (_ARCH_PWR) || defined (__powerpc__) || 
defined (__ppc__)) && W_TYPE_SIZE == 32
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
   do {                                                                 \
     if (__builtin_constant_p (bh) && (bh) == 0)                              \

  
Apologies is this ends up line-wrapping strangely.

FWIW, there's a test in gmp-impl.h which checks for _ARCH_PPC, but not
__powerpc__.  On MacOS X this doesn't matter because it also tests for
__BIG_ENDIAN__, which is defined.

-Jon



reply via email to

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