From: Keith Seitz <keiths@cygnus.com>
To: Mo DeJong <mdejong@cygnus.com>
Cc: <insight@sources.redhat.com>
Subject: Re: PATCH: Compiling libgui with Tk 8.3.
Date: Mon, 13 Aug 2001 17:26:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.33.0108131724020.22492-100000@makita.cygnus.com> (raw)
In-Reply-To: <Pine.SOL.3.91.1010813170542.12157C-100000@cse.cygnus.com>
On Mon, 13 Aug 2001, Mo DeJong wrote:
> 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.
Let's give it a try. (Does anyone use tkCanvEdge.c stuff?? I don't think
we do in Insight...)
Keith
>
> Index: src/tkCanvEdge.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/libgui/src/tkCanvEdge.c,v
> retrieving revision 1.3
> retrieving revision 1.3.218.1
> diff -u -r1.3 -r1.3.218.1
> --- tkCanvEdge.c 1998/08/14 01:16:57 1.3
> +++ tkCanvEdge.c 2001/08/12 21:44:04 1.3.218.1
> @@ -179,9 +179,15 @@
> 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,
> "none", Tk_Offset(EdgeItem, arrow), TK_CONFIG_DONT_SET_DEFAULT},
> @@ -530,6 +536,17 @@
>
> 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,
>
>
next prev parent reply other threads:[~2001-08-13 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-13 17:14 Mo DeJong
2001-08-13 17:26 ` Keith Seitz [this message]
2001-08-13 17:33 ` Mo DeJong
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.GSO.4.33.0108131724020.22492-100000@makita.cygnus.com \
--to=keiths@cygnus.com \
--cc=insight@sources.redhat.com \
--cc=mdejong@cygnus.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).