Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH to expect: use proper version of TclRegComp
Date: Tue, 08 Feb 2005 22:43:00 -0000	[thread overview]
Message-ID: <vt2d5vaivzl.fsf@zenia.home> (raw)


I've committed the following to uberbaum's expect sources, as an
obvious fix.  Those sources don't seem to track the official Expect
sources any more, but the bug at hand doesn't exist in the official
sources anyway, so there's no need to push this upstream.

Without this patch, a build with --enable-shared breaks.  Non-shared
library builds work only because exp_clib.o in libexpect.a is never
needed to resolve any references in the executable, so it never gets
pulled in, so the unresolved reference it contains to TclRegComp never
gets noticed.  However, all the .o's get included in the shared
libexpect, so linking the expect executable against the .so does
produce an error.

2005-02-08  Jim Blandy  <jimb@redhat.com>

	* exp_clib.c (expectv): Use Expect_TclRegComp, not TclRegComp.
	This seems to have been missed in Ian Roxborough's 2001-07-09
	change.

Index: expect/exp_clib.c
===================================================================
RCS file: /cvs/src/src/expect/exp_clib.c,v
retrieving revision 1.3
diff -c -p -r1.3 exp_clib.c
*** expect/exp_clib.c	20 Nov 2002 00:28:58 -0000	1.3
--- expect/exp_clib.c	8 Feb 2005 21:15:30 -0000
*************** struct exp_case *ecases;
*** 773,779 ****
  	for (ec=ecases;ec->type != exp_end;ec++) {
  		if ((ec->type == exp_regexp) && !ec->re) {
  			TclRegError((char *)0);
! 			if (!(ec->re = (void*)TclRegComp(ec->pattern))) {
  				fprintf(stderr,"regular expression %s is bad: %s",ec->pattern,TclGetRegError());
  				return_errno(EINVAL);
  			  }
--- 773,779 ----
  	for (ec=ecases;ec->type != exp_end;ec++) {
  		if ((ec->type == exp_regexp) && !ec->re) {
  			TclRegError((char *)0);
! 			if (!(ec->re = (void*)Expect_TclRegComp(ec->pattern))) {
  				fprintf(stderr,"regular expression %s is bad: %s",ec->pattern,TclGetRegError());
  				return_errno(EINVAL);
  			  }


             reply	other threads:[~2005-02-08 21:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-08 22:43 Jim Blandy [this message]
2005-02-09  3:12 ` Andrew Cagney
2005-02-09 10:16   ` Jim Blandy

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=vt2d5vaivzl.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=gdb-patches@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