diff options
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 7f555ec..2716467 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.118.2.10 2005/05/24 04:19:33 das Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.118.2.11 2005/06/18 21:46:42 das Exp $ */ #ifndef _TCLINT @@ -51,6 +51,31 @@ #include <string.h> #endif +/* + * Ensure WORDS_BIGENDIAN is defined correcly: + * Needs to happen here in addition to configure to work with + * fat compiles on Darwin (i.e. ppc and i386 at the same time). + */ + +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_PARAM_H +# include <sys/param.h> +#endif +#ifdef BYTE_ORDER +# ifdef BIG_ENDIAN +# if BYTE_ORDER == BIG_ENDIAN +# define WORDS_BIGENDIAN +# endif +# endif +# ifdef LITTLE_ENDIAN +# if BYTE_ORDER == LITTLE_ENDIAN +# undef WORDS_BIGENDIAN +# endif +# endif +#endif + #undef TCL_STORAGE_CLASS #ifdef BUILD_tcl # define TCL_STORAGE_CLASS DLLEXPORT |