summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-10-10 20:29:49 (GMT)
committerhobbs <hobbs>2005-10-10 20:29:49 (GMT)
commit7e733ab325057aac1e7d23f4e6dda37e65bce9d2 (patch)
tree8dff482ab66b267064ff77683b382c9f74fedb13
parent9500cbcc13a4de799d51779752efd4fecdfba4ea (diff)
downloadtk-7e733ab325057aac1e7d23f4e6dda37e65bce9d2.zip
tk-7e733ab325057aac1e7d23f4e6dda37e65bce9d2.tar.gz
tk-7e733ab325057aac1e7d23f4e6dda37e65bce9d2.tar.bz2
* macosx/tkMacOSXInt.h: Move MODULE_SCOPE defn to tkInt.h and add
* generic/tkInt.h: WORDS_BIGENDIAN checks that will work with OS X universal binary compiles. (steffen)
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkInt.h41
-rw-r--r--macosx/tkMacOSXInt.h10
3 files changed, 45 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c60f50..52c4921 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2005-10-10 Jeff Hobbs <jeffh@ActiveState.com>
+ * macosx/tkMacOSXInt.h: Move MODULE_SCOPE defn to tkInt.h and add
+ * generic/tkInt.h: WORDS_BIGENDIAN checks that will work with
+ OS X universal binary compiles. (steffen)
+
* generic/tkMenu.c (TkSetWindowMenuBar): do not call TkMenuInit if
the winPtr indicates TK_ALREADY_DEAD. This prevents reinit that
creates a Tk exit handler after all exit handlers should be
diff --git a/generic/tkInt.h b/generic/tkInt.h
index 9c350af..cafe4a3 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.67 2005/09/21 10:54:40 dkf Exp $
+ * RCS: $Id: tkInt.h,v 1.68 2005/10/10 20:29:49 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:
*/
diff --git a/macosx/tkMacOSXInt.h b/macosx/tkMacOSXInt.h
index 81e8e72..8bb1ad5 100644
--- a/macosx/tkMacOSXInt.h
+++ b/macosx/tkMacOSXInt.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXInt.h,v 1.9 2005/10/04 21:46:31 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXInt.h,v 1.10 2005/10/10 20:29:49 hobbs Exp $
*/
#ifndef _TKMACINT
@@ -33,14 +33,6 @@
#include <Carbon/Carbon.h>
-/*
- * Should be defined by configure, but some extensions may access
- * this file without setting it.
- */
-#ifndef MODULE_SCOPE
-#define MODULE_SCOPE __private_extern__
-#endif
-
struct TkWindowPrivate {
TkWindow *winPtr; /* Ptr to tk window or NULL if Pixmap */
CGrafPtr grafPtr;