NetBSD Problem Report #46354

From www@NetBSD.org  Thu Apr 19 01:49:39 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id A306563B915
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 19 Apr 2012 01:49:39 +0000 (UTC)
Message-Id: <20120419014939.06A8963B86B@www.NetBSD.org>
Date: Thu, 19 Apr 2012 01:49:39 +0000 (UTC)
From: Lloyd.Parkes@ird.govt.nz
Reply-To: Lloyd.Parkes@ird.govt.nz
To: gnats-bugs@NetBSD.org
Subject: sysutils/cfengine2 only compiles with GCC
X-Send-Pr-Version: www-1.0

>Number:         46354
>Category:       pkg
>Synopsis:       sysutils/cfengine2 only compiles with GCC
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    rhaen
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 19 01:50:00 +0000 2012
>Last-Modified:  Wed Apr 25 08:15:12 +0000 2012
>Originator:     Lloyd Parkes
>Release:        Solaris 5.10
>Organization:
Inland Revenue
>Environment:
SunOS package-builder 5.10 Generic_147440-14 sun4v sparc SUNW,Sun-Fire-T200

>Description:
One line in src/do.c in cfengine2 uses what appears to be a non-standard construct with the ternary operator. The Sun Pro C compiler considers it a syntax error and so do I.

>How-To-Repeat:
Build sysutils/cfengine2 from pkgsrc with the Sun Pro C compiler.
>Fix:
I'll put this patch somewhere on the web once I get it home.

$NetBSD$

--- src/do.c.orig       Sun Mar  8 09:27:56 2009
+++ src/do.c    Tue Apr 17 17:19:17 2012
@@ -2846,7 +2846,7 @@

    ExpandVarstring(ptr->name,name,"");

-   snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", name, ptr->cmp, ptr->ver ? ptr->ver: "" ,ptr->action, ptr->defines ?: "", ptr->elsedef ?: "");
+   snprintf(lock,CF_BUFSIZE-1,"%s_%d_%s_%d_%s_%s", name, ptr->cmp, ptr->ver ? ptr->ver: "" ,ptr->action, ptr->defines ?ptr->defines: "", ptr->elsedef ?ptr->elsedef: "");

    if (!GetLock(ASUniqueName("packages"),CanonifyName(lock),ptr->ifelapsed,ptr->expireafter,VUQNAME,CFSTARTTIME))
       {

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->rhaen
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Wed, 25 Apr 2012 08:15:12 +0000
Responsible-Changed-Why:
Over to maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.