Date: Fri, 6 Jun 2008 02:30:39 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/124334: lib/libc/glob.c fails to compile under -CURRENT with default warning commentary and custom CFLAGs Message-ID: <200806060230.m562UduG040594@www.freebsd.org> Resent-Message-ID: <200806060240.m562e35Y029067@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 124334 >Category: misc >Synopsis: lib/libc/glob.c fails to compile under -CURRENT with default warning commentary and custom CFLAGs >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jun 06 02:40:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Garrett Cooper >Release: 8-CURRENT >Organization: >Environment: FreeBSD optimus 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon May 19 02:21:07 PDT 2008 root@optimus:/usr/obj/usr/src/sys/OPTIMUS i386 >Description: libc always complains and dies after I cvs sync my srcs, until I apply the following change to correct the types that get passed into g_strchr and globexp2. Please see the following patch for more details.. # Helpful portions of make.conf CFLAGS=-O3 -pipe -fno-strict-aliasing CPUTYPE=prescott This issue exists in 7.x as well, pending Warner Losh's changes to the code in revision 1.26 of the file. >How-To-Repeat: 1. Checkout latest sources from CVS 2. make buildworld "CFLAGS=-O3 -pipe -fno-strict-aliasing" CPUTYPE=prescott >Fix: See attached patch. Patch attached with submission follows: Index: lib/libc/gen/glob.c =================================================================== RCS file: /home/ncvs/src/lib/libc/gen/glob.c,v retrieving revision 1.26 diff -r1.26 glob.c 242c242 < const Char* ptr = pattern; --- > Char* ptr = (Char*) pattern; 249,250c249,250 < while ((ptr = (const Char *) g_strchr((Char *) ptr, LBRACE)) != NULL) < if (!globexp2(ptr, pattern, pglob, &rv, limit)) --- > while ((ptr = (Char *) g_strchr(ptr, LBRACE)) != NULL) > if (!globexp2((const Char*) ptr, pattern, pglob, &rv, limit)) >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806060230.m562UduG040594>