+2001-08-12 Mo DeJong <mdejong@redhat.com>
+
+ * src/tkCanvEdge.c: Work around Windows gcc problem
+ initializing a static member with a dll imported
+ symbol by assigning the function pointer at runtime.
+ Static initialization works just fine in VC++ but
+ fails when compiling with the Windows version of gcc.
+
2001-08-12 Keith Seitz <keiths@redhat.com>
Update tkTable to version 2.7:
static Tk_CustomOption arrowShapeOption =
{ ParseArrowShape, PrintArrowShape, (ClientData) NULL};
-static Tk_CustomOption tagsOption = {Tk_CanvasTagsParseProc,
- Tk_CanvasTagsPrintProc, (ClientData) NULL};
+/*
+ * The callbacks for tagsOption are initialized in ConfigureEdge()
+ */
+
+static Tk_CustomOption tagsOption =
+{ (Tk_OptionParseProc *) NULL,
+ (Tk_OptionPrintProc *) NULL,
+ (ClientData) NULL};
static Tk_ConfigSpec configSpecs[] = {
{TK_CONFIG_UID, "-arrow", (char *) NULL, (char *) NULL,
tkwin = Tk_CanvasTkwin(canvas);
bgBorder = ((TkCanvas *) canvas)->bgBorder;
+ /*
+ * Init callbacks in tagsOption before accessing configSpecs.
+ * This init can't be done statically when using Windows gcc
+ * since these symbols are imported from the Tk dll.
+ */
+
+ if (tagsOption.parseProc == NULL) {
+ tagsOption.parseProc = Tk_CanvasTagsParseProc;
+ tagsOption.printProc = Tk_CanvasTagsPrintProc;
+ }
+
if (Tk_ConfigureWidget(interp, tkwin,
configSpecs, argc, argv,
(char *) edgePtr, flags) != TCL_OK) {