summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2005-10-10 21:27:33 (GMT)
committerhobbs <hobbs@noemail.net>2005-10-10 21:27:33 (GMT)
commit2557400acf2d2838700869c83efa87628a29ffa5 (patch)
tree7dd514595785183f584628b845c8ba6743572ae3
parent7277cea9722a29aaf5d94f05f0def1f7ab1c0113 (diff)
downloadtk-2557400acf2d2838700869c83efa87628a29ffa5.zip
tk-2557400acf2d2838700869c83efa87628a29ffa5.tar.gz
tk-2557400acf2d2838700869c83efa87628a29ffa5.tar.bz2
* generic/tkInt.h: add MODULE_SCOPE and WORDS_BIGENDIAN checks
that will work with OS X universal binary compiles. (steffen) FossilOrigin-Name: 3d9d04678a19151f8a1daacea12389ae3d2f8b03
-rw-r--r--ChangeLog3
-rw-r--r--generic/tkInt.h41
2 files changed, 43 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d6d85d7..4139a57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2005-10-10 Jeff Hobbs <jeffh@ActiveState.com>
+ * generic/tkInt.h: add MODULE_SCOPE and WORDS_BIGENDIAN checks
+ that will work with OS X universal binary compiles. (steffen)
+
* generic/tkConfig.c (Tk_DeleteOptionTable, Tk_CreateOptionTable):
properly alloc/delete one more option. [Bug 1319720] (melbardis)
diff --git a/generic/tkInt.h b/generic/tkInt.h
index fb52bdd..b263d10 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: $Id: tkInt.h,v 1.56.2.5 2005/07/28 03:45:03 hobbs Exp $
+ * RCS: $Id: tkInt.h,v 1.56.2.6 2005/10/10 21:27:33 hobbs Exp $
*/
#ifndef _TKINT
@@ -28,6 +28,45 @@
#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
+# undef WORDS_BIGENDIAN
+# define WORDS_BIGENDIAN
+# endif
+# endif
+# ifdef LITTLE_ENDIAN
+# if BYTE_ORDER == LITTLE_ENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+# endif
+#endif
+
+/*
+ * Used to tag functions that are only to be visible within the module being
+ * built and not outside it (where this is supported by the linker).
+ */
+
+#ifndef MODULE_SCOPE
+# ifdef __cplusplus
+# define MODULE_SCOPE extern "C"
+# else
+# define MODULE_SCOPE extern
+# endif
+#endif
+
+/*
* Opaque type declarations:
*/