This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
PATCH: Tix fix for dllexport via TCL_STORAGE_CLASS
- To: insight at sources dot redhat dot com
- Subject: PATCH: Tix fix for dllexport via TCL_STORAGE_CLASS
- From: Mo DeJong <mdejong at cygnus dot com>
- Date: Tue, 14 Aug 2001 19:46:01 -0700 (PDT)
Hi all.
Here is a little patch that does effect Insight.
This will fix the dllimport modifier used by the EXTERN
keyword in tix. This was broken in tix but Tcl 8.0
did not make use of the dllexport modifiers to
function declarations so it did not matter. When tix
is compiled with Tcl 8.3 this blows up rather badly.
This patch has been tested with Cygwin gcc under Windows
so I think it is safe to add.
cheers
Mo
2001-08-11 Mo DeJong <mdejong@cygnus.com>
* generic/tixForm.c:
* generic/tixGrFmt.c:
* generic/tixGrRC.c:
* generic/tixGrSel.c:
* generic/tixGrSort.c:
* generic/tixGrid.c:
* generic/tixItcl.c:
* generic/tixItcl.h:
* generic/tixMethod.c:
* unix/samAppInit.c: Define TCL_STORAGE_CLASS as
DLLEXPORT when BUILD_tix is define to fix dll export
declarations under Windows.
Index: generic/tixForm.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixForm.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixForm.c
--- tixForm.c 2000/02/07 00:19:28 1.1.1.1
+++ tixForm.c 2001/08/14 23:43:02
@@ -45,6 +45,10 @@
int num;
} SpringList;
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
/*
* SubCommands of the tixForm command.
Index: generic/tixGrFmt.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixGrFmt.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixGrFmt.c
--- tixGrFmt.c 2000/02/07 00:19:28 1.1.1.1
+++ tixGrFmt.c 2001/08/14 23:43:03
@@ -45,6 +45,11 @@
int filled;
} GridFmtStruct;
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
static TIX_DECLARE_SUBCMD(Tix_GrFormatBorder);
static TIX_DECLARE_SUBCMD(Tix_GrFormatGrid);
EXTERN TIX_DECLARE_SUBCMD(Tix_GrFormat);
Index: generic/tixGrRC.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixGrRC.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixGrRC.c
--- tixGrRC.c 2000/02/07 00:19:28 1.1.1.1
+++ tixGrRC.c 2001/08/14 23:43:03
@@ -15,6 +15,11 @@
#include <tixDef.h>
#include <tixGrid.h>
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
static TIX_DECLARE_SUBCMD(Tix_GrRCSize);
EXTERN TIX_DECLARE_SUBCMD(Tix_GrSetSize);
Index: generic/tixGrSel.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixGrSel.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixGrSel.c
--- tixGrSel.c 2000/02/07 00:19:28 1.1.1.1
+++ tixGrSel.c 2001/08/14 23:43:03
@@ -15,6 +15,11 @@
#include <tixDef.h>
#include <tixGrid.h>
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN TIX_DECLARE_SUBCMD(Tix_GrSelection);
static TIX_DECLARE_SUBCMD(Tix_GrSelIncludes);
static TIX_DECLARE_SUBCMD(Tix_GrSelModify);
Index: generic/tixGrSort.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixGrSort.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixGrSort.c
--- tixGrSort.c 2000/02/07 00:19:28 1.1.1.1
+++ tixGrSort.c 2001/08/14 23:43:03
@@ -44,6 +44,11 @@
* Forward declarations for procedures defined in this file:
*/
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN TIX_DECLARE_SUBCMD(Tix_GrSort);
static int SortCompareProc _ANSI_ARGS_((CONST VOID *first,
Index: generic/tixGrid.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixGrid.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixGrid.c
--- tixGrid.c 2000/02/07 00:19:28 1.1.1.1
+++ tixGrid.c 2001/08/14 23:43:05
@@ -250,6 +250,11 @@
Tix_GridScrollInfo *scrollInfo));
static void Tix_GrResetRenderBlocks _ANSI_ARGS_((WidgetPtr wPtr));
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
static TIX_DECLARE_SUBCMD(Tix_GrBdType);
static TIX_DECLARE_SUBCMD(Tix_GrCGet);
static TIX_DECLARE_SUBCMD(Tix_GrConfig);
Index: generic/tixItcl.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixItcl.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixItcl.c
--- tixItcl.c 2000/02/07 00:19:28 1.1.1.1
+++ tixItcl.c 2001/08/14 23:43:05
@@ -114,6 +114,11 @@
* with no code and symbols.
*/
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN void TixItclDummy _ANSI_ARGS_((void));
Index: generic/tixItcl.h
===================================================================
RCS file: /cvs/src/src/tix/generic/tixItcl.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixItcl.h
--- tixItcl.h 2000/02/07 00:19:28 1.1.1.1
+++ tixItcl.h 2001/08/14 23:43:05
@@ -38,6 +38,11 @@
TixItclNameSp x; \
x.iPtr = (Interp*)(i);
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN int TixItclSetGlobalNameSp _ANSI_ARGS_((
TixItclNameSp * nameSpPtr, Tcl_Interp * interp));
EXTERN void TixItclRestoreGlobalNameSp _ANSI_ARGS_((
@@ -63,6 +68,11 @@
x.iPtr = (Interp*)(i); \
x.nsToken = NULL;
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN int TixItclSetGlobalNameSp _ANSI_ARGS_((
TixItclNameSp * nameSpPtr, Tcl_Interp * interp));
EXTERN void TixItclRestoreGlobalNameSp _ANSI_ARGS_((
@@ -76,3 +86,6 @@
#endif /* ITCL_2 */
#endif /* TK_8_0_OR_LATER */
+
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLIMPORT
Index: generic/tixMethod.c
===================================================================
RCS file: /cvs/src/src/tix/generic/tixMethod.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tixMethod.c
--- tixMethod.c 2000/02/07 00:19:28 1.1.1.1
+++ tixMethod.c 2001/08/14 23:43:05
@@ -475,6 +475,11 @@
#else
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN int Tix_GlobalEvalArgv _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_CmdInfo * cmdInfoPtr, int argc));
Index: unix/samAppInit.c
===================================================================
RCS file: /cvs/src/src/tix/unix/samAppInit.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 samAppInit.c
--- samAppInit.c 2000/02/07 00:19:29 1.1.1.1
+++ samAppInit.c 2001/08/14 23:43:05
@@ -37,6 +37,11 @@
# endif
#endif
+#ifdef BUILD_tix
+# undef TCL_STORAGE_CLASS
+# define TCL_STORAGE_CLASS DLLEXPORT
+#endif
+
EXTERN int Tclsam_Init _ANSI_ARGS_((Tcl_Interp *interp));
EXTERN int Tksam_Init _ANSI_ARGS_((Tcl_Interp *interp));
EXTERN int Tixsam_Init _ANSI_ARGS_((Tcl_Interp *interp));