From owner-freebsd-bugs Tue Jun 6 17: 0: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 6152D37B9A4 for ; Tue, 6 Jun 2000 17:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA77872; Tue, 6 Jun 2000 17:00:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id DA31337BB9F; Tue, 6 Jun 2000 16:50:24 -0700 (PDT) Message-Id: <20000606235024.DA31337BB9F@hub.freebsd.org> Date: Tue, 6 Jun 2000 16:50:24 -0700 (PDT) From: pfeifer@dbai.tuwien.ac.at To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/19077: #define trace _nc_trace in /usr/include/ncurses.h causes collateral damage. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 19077 >Category: misc >Synopsis: #define trace _nc_trace in /usr/include/ncurses.h causes collateral damage. >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 06 17:00:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Gerald Pfeifer >Release: n/a >Organization: Vienna University of Technology >Environment: n/a (Problem destilled from bug reports of 4.0-STABLE users and inspection) >Description: The following change to /usr/include/ncurses.h which adds a #define trace _nc_trace causes problems with our Wine port and probably further software: 1.1.1.3 (vendor branch) Wed May 24 10:44:45 2000 UTC by peter CVS Tags: v5_0_19991023, HEAD; Branch: NCURSES Bring in the fix for the trace/_nc_trace issue, without breaking the vendor branching. The author has fixed this also so we can do this safely. 1.1.1.2.2.1 Tue May 23 13:42:17 2000 UTC by ache Branch: RELENG_4 MFC: trace -> _nc_trace For example, consider the following snippet: void _nc_trace() { } #define trace _nc_trace main() { long trace=0; if( &trace != &_nc_trace ) printf("Okay\n"); } As another example, consider Wine, where this change causes: ../libwine.so: undefined reference to `__GET_DEBUGGING__nc_trace' due to a new interaction with the TRACE macro in debugtools.h. http://cvs.winehq.com/cvsweb/wine/include/debugtools.h?rev=1.9 has the source of that Wine include file. The new #define in ncurses.h clearly breaks ANSI/ISO C compliant code. >How-To-Repeat: Try the code snippet from "Full Description". Compile the Wine port. >Fix: a. Remove that #define. b. Adding a stub instead of that #define. Andrey A. Chernov who introduced the breakage cannot install a fix by himself, but suggested the following: --- include/curses.h.in.bak Wed May 24 14:44:45 2000 +++ include/curses.h.in Mon Jun 5 02:28:33 2000 @@ -1313,8 +1313,7 @@ extern char *_tracechtype(chtype); extern char *_tracechtype2(int, chtype); extern char *_tracemouse(const MEVENT *); -#define trace _nc_trace -extern void trace(const unsigned int); +extern void _nc_trace(const unsigned int); /* trace masks */ #define TRACE_DISABLE 0x0000 /* turn off tracing */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message