This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH to expect: use proper version of TclRegComp


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);
  			  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]