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

Re: #ifdef ALPHA?



On Fri, Dec 04, 1998 at 04:18:02PM -0800, Joey Hess wrote:
> Hi, what's the correct way to ifdef something out so it's only done on the
> alpha arch? Does #ifdef ALPHA work? Please cc to me, I'm not on this list.

AFAIK, there is no ALPHA constant.  There is a __alpha in GCC.  Since
we are patching for GCC or egcs, it may be ok to use it.  In general,
it is better to avoid ifdefs for architectures and change the code
according to the real problem.  For example, create a constant call
ALIGN_BOUNDARY that is 4 for i386 and 8 for Alpha.  Set this in a
config.h sort of way, and change the code to use the macro.  There
should be a way to use this method in nearly every case.


Reply to: