From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31264 invoked by alias); 8 Feb 2005 21:27:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31183 invoked from network); 8 Feb 2005 21:27:15 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 8 Feb 2005 21:27:15 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j18LRFng029022 for ; Tue, 8 Feb 2005 16:27:15 -0500 Received: from zenia.home.redhat.com (sebastian-int.corp.redhat.com [172.16.52.221]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j18LREO09424; Tue, 8 Feb 2005 16:27:14 -0500 To: gdb-patches@sources.redhat.com Subject: PATCH to expect: use proper version of TclRegComp From: Jim Blandy Date: Tue, 08 Feb 2005 22:43:00 -0000 Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-02/txt/msg00039.txt.bz2 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 * 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); }