From owner-svn-src-all@FreeBSD.ORG Sun Jun 20 00:34:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E4D106564A; Sun, 20 Jun 2010 00:34:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 008CE8FC13; Sun, 20 Jun 2010 00:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5K0Y6GB041026; Sun, 20 Jun 2010 00:34:06 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5K0Y6xl041024; Sun, 20 Jun 2010 00:34:06 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201006200034.o5K0Y6xl041024@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 20 Jun 2010 00:34:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209358 - head/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Jun 2010 00:34:07 -0000 Author: marcel Date: Sun Jun 20 00:34:06 2010 New Revision: 209358 URL: http://svn.freebsd.org/changeset/base/209358 Log: Unbreak platforms with char unsigned by default. Oddly enough, GCC isn't satisfied with a simple cast to int in the check against EOF, so the fix is a bit involved by actually having to go through a temporary variable. Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sat Jun 19 22:13:40 2010 (r209357) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sun Jun 20 00:34:06 2010 (r209358) @@ -67,8 +67,12 @@ * for all subsequent invocations, which is the effect desired. */ #undef unput -#define unput(c) \ - if (c != EOF) yyunput( c, yytext_ptr ) +#define unput(c) \ + do { \ + int _c = c; \ + if (_c != EOF) \ + yyunput(_c, yytext_ptr); \ + } while(0) #endif static int id_or_type(const char *);