From owner-freebsd-questions@freebsd.org Fri Dec 11 05:21:20 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4156A9D62DD for ; Fri, 11 Dec 2015 05:21:20 +0000 (UTC) (envelope-from ike@michaeleichorn.com) Received: from mx1.eichornenterprises.com (mx1.eichornenterprises.com [104.236.13.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.eichornenterprises.com", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D42AF1A81 for ; Fri, 11 Dec 2015 05:21:19 +0000 (UTC) (envelope-from ike@michaeleichorn.com) Received: from mail.eichornenterprises.com (cpe-184-59-147-149.neo.res.rr.com [184.59.147.149]) by mx1.eichornenterprises.com (OpenSMTPD) with ESMTP id 98298e11; Fri, 11 Dec 2015 00:21:06 -0500 (EST) Received: by mail.eichornenterprises.com (OpenSMTPD) with ESMTPSA id 31b55dc9 TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Fri, 11 Dec 2015 00:21:04 -0500 (EST) Message-ID: <1449811260.30424.50.camel@michaeleichorn.com> Subject: Re: and rpc_createerr From: "Michael B. Eichorn" To: "Heyman, Jerrold" , "freebsd-questions@freebsd.org" Date: Fri, 11 Dec 2015 00:21:00 -0500 In-Reply-To: <9CDA60925D09954CA4BAD0284E2DFC43024EDE@MX204CL01.corp.emc.com> References: <9CDA60925D09954CA4BAD0284E2DFC43024EDE@MX204CL01.corp.emc.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 05:21:20 -0000 On Thu, 2015-12-10 at 19:49 +0000, Heyman, Jerrold wrote: > I've just installed FreeBSD 10.2 in order to determine the > portability of my companies code.  Built gcc4.6 out of the ports/lang > area, but see the same issue using /usr/bin/cc (clang 3.4.1). > > in /usr/include/rpc/clnt.h the following snippet: > > /* >  * If a creation fails, the following allows the user to figure out > why. >  */ > struct rpc_createerr { >         enum clnt_stat cf_stat; >         struct rpc_err cf_error;  /* userful when cf_stat == > RPC_PMAPFAILURE */ > }; > > __BEGIN_DECLS > extern struct rpc_createerr    *__rpc_createeer(void); > __END_DECLS > #define rpc_createerr          (*(__rpc_createeerr())) > > Note that the #define becomes active once the file is included, and > in my source code I have multiple > >    struct rpc_createerr *ce; > > declarations.  Both cc and gcc cite this as an error, though for > different reasons. > > gcc complains that a '(' is found where a '{' is expected. > The cc error message is 'error: declaration of anyonymous struct must > be a definition'. > > My other ports - Linux, AIX, Solaris, Mac OSX, do not have the > #define in /usr/include/rpc/clnt.h. > The HP-UX does, but it is encapsulated within a #ifdef _REENTRANT / > #endif block. > > Is this an actual error, or is there something on FreeBSD that I need > to do that is different than the other platforms? > > Thanks in advance, > > jerry > > Jerry Heyman                           | > Principal Software Engineer            |    Software is the > difference > EMC Data Domain                        |    between hardware and > reality > Jerrold.Heyman@emc.com / 919.597.7812  | The freebsd-questions hasn't been very good at answering these kind of questions of late, you might have better luck on a more technical list like freebsd-hackers.