From: Mo DeJong <mdejong@cygnus.com>
To: insight@sources.redhat.com
Subject: PATCH: Tix fix for dllexport via TCL_STORAGE_CLASS
Date: Tue, 14 Aug 2001 19:46:00 -0000 [thread overview]
Message-ID: <Pine.SUN.3.91.1010814193830.29712A-100000@rtl.cygnus.com> (raw)
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));
next reply other threads:[~2001-08-14 19:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-14 19:46 Mo DeJong [this message]
2001-08-15 11:23 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.SUN.3.91.1010814193830.29712A-100000@rtl.cygnus.com \
--to=mdejong@cygnus.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).