From owner-freebsd-questions@freebsd.org Thu Dec 10 19:49:37 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 824E99D7DA8 for ; Thu, 10 Dec 2015 19:49:37 +0000 (UTC) (envelope-from Jerrold.Heyman@emc.com) Received: from mailuogwhop.emc.com (mailuogwhop.emc.com [168.159.213.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailuogwprd01.lss.emc.com", Issuer "RSA Corporate Server CA v2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CDD719EC for ; Thu, 10 Dec 2015 19:49:36 +0000 (UTC) (envelope-from Jerrold.Heyman@emc.com) Received: from maildlpprd03.lss.emc.com (maildlpprd03.lss.emc.com [10.253.24.35]) by mailuogwprd02.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id tBAJnYT4003351 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 10 Dec 2015 14:49:35 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com tBAJnYT4003351 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=emc.com; s=jan2013; t=1449776975; bh=aLyU30N+W+sRLwSUATYbMD+4wEs=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=aID717yZlf5PjMq5L9TUd3VQq3JD3jAvyExi9g+vZcjS5FVnunc/Rr5X4H1LgzqgN G+LhUhc9UsLHJ0yRQj52+kB634N7wJKXdwMxJRK5FQKAIvuul30SqWl5zZ5/dozhPV tU0ueXJLnIL9wyCezLu77UCFFJ640rG8IGQpcPO0= X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd02.lss.emc.com tBAJnYT4003351 Received: from mailusrhubprd51.lss.emc.com (mailusrhubprd51.lss.emc.com [10.106.48.24]) by maildlpprd03.lss.emc.com (RSA Interceptor) for ; Thu, 10 Dec 2015 14:49:20 -0500 Received: from mxhub33.corp.emc.com (mxhub33.corp.emc.com [10.254.93.81]) by mailusrhubprd51.lss.emc.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.0) with ESMTP id tBAJnLtT015783 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 10 Dec 2015 14:49:21 -0500 Received: from MXHUB225.corp.emc.com (10.253.68.95) by mxhub33.corp.emc.com (10.254.93.81) with Microsoft SMTP Server (TLS) id 8.3.327.1; Thu, 10 Dec 2015 14:49:20 -0500 Received: from MX204CL01.corp.emc.com ([fe80::b84b:d314:29a2:cd6e]) by MXHUB225.corp.emc.com ([10.253.68.95]) with mapi id 14.03.0266.001; Thu, 10 Dec 2015 14:49:20 -0500 From: "Heyman, Jerrold" To: "freebsd-questions@freebsd.org" Subject: and rpc_createerr Thread-Topic: and rpc_createerr Thread-Index: AdEzg0yBm3kk7sToTF2+wjgksEN8IA== Date: Thu, 10 Dec 2015 19:49:17 +0000 Message-ID: <9CDA60925D09954CA4BAD0284E2DFC43024EDE@MX204CL01.corp.emc.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.226.135] MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd51.lss.emc.com X-RSA-Classifications: Source Code, public Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 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: Thu, 10 Dec 2015 19:49:37 -0000 I've just installed FreeBSD 10.2 in order to determine the portability of m= y companies code. Built gcc4.6 out of the ports/lang area, but see the sam= e 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 =3D=3D RPC_PMAPFA= ILURE */ }; __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 s= ource 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 |