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:    dholland
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 19 01:50:00 +0000 2012
>Closed-Date:    Thu Jun 18 02:01:52 +0000 2015
>Last-Modified:  Thu Jun 18 02:01:52 +0000 2015
>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.


From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46354 CVS commit: pkgsrc/sysutils/cfengine2
Date: Thu, 18 Jun 2015 01:58:30 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Thu Jun 18 01:58:30 UTC 2015

 Modified Files:
 	pkgsrc/sysutils/cfengine2: distinfo
 Added Files:
 	pkgsrc/sysutils/cfengine2/patches: patch-src_do.c

 Log Message:
 PR 46354 Lloyd Parkes: remove unnecessary gccism for non-gcc compilers.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.14 pkgsrc/sysutils/cfengine2/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/cfengine2/patches/patch-src_do.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: rhaen->dholland
Responsible-Changed-By: dholland@NetBSD.org
Responsible-Changed-When: Thu, 18 Jun 2015 02:01:52 +0000
Responsible-Changed-Why:
I did it


State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 18 Jun 2015 02:01:52 +0000
State-Changed-Why:
patch applied
(sorry, there was no reason this had to sit around for three years!)


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.