From owner-freebsd-current@FreeBSD.ORG Sat Mar 16 20:29:56 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DB363DFE for ; Sat, 16 Mar 2013 20:29:55 +0000 (UTC) (envelope-from kaduk@mit.edu) Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU [18.9.25.14]) by mx1.freebsd.org (Postfix) with ESMTP id 84C66157 for ; Sat, 16 Mar 2013 20:29:54 +0000 (UTC) X-AuditID: 1209190e-b7f266d0000008cb-3d-5144d50fb7bc Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id 4C.03.02251.F05D4415; Sat, 16 Mar 2013 16:24:47 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH-1.MIT.EDU [18.9.28.11]) by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id r2GKOlw3029563; Sat, 16 Mar 2013 16:24:47 -0400 Received: from multics.mit.edu (SYSTEM-LOW-SIPB.MIT.EDU [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id r2GKOjiP030963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 16 Mar 2013 16:24:46 -0400 Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id r2GKOj0L016228; Sat, 16 Mar 2013 16:24:45 -0400 (EDT) Date: Sat, 16 Mar 2013 16:24:44 -0400 (EDT) From: Benjamin Kaduk To: =?ISO-8859-15?Q?Elias_M=E5rtenson?= Subject: Re: Strange error when compiling minimal GSSAPI application In-Reply-To: Message-ID: References: User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-362651775-1363465485=:9389" X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT0eW/6hJosGG5icWcNx+YLJ5M5HZg 8pjxaT6Lx85Zd9kDmKK4bFJSczLLUov07RK4Mh7vXMxc0ClS8fPeD9YGxukCXYycHBICJhIT 3j5igbDFJC7cW8/WxcjFISSwj1Gi+fFvKGcjo8TxP4+hnENMEkcngTicQE4Do0TjkjoQm0VA W2Lt5r9go9gEVCRmvtkIViMiYC2x69tmMJtZQF7i/5XLTCC2sICLxIlLT8DinAKBEjs+TwWL 8wo4SBy9tpgFYn6AROuiX8wgtqiAjsTq/VNYIGoEJU7OfMICMdNfYvK77ywTGAVnIUnNQpKa xcgBZNtITLhXCRHWlrh/s41tASPLKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl1jvdzMEr3UlNJN jKCw5pTk28H49aDSIUYBDkYlHt4GV+dAIdbEsuLK3EOMkhxMSqK8N0+4BArxJeWnVGYkFmfE F5XmpBYfYpTgYFYS4a2uAMrxpiRWVqUW5cOkpDlYlMR5r6Tc9BcSSE8sSc1OTS1ILYLJynBw KEnwnr8M1ChYlJqeWpGWmVOCkGbi4AQZzgM0XOUKyPDigsTc4sx0iPwpRkUpcd7dIM0CIImM 0jy4XljaecUoDvSKMO8nkCoeYMqC634FNJgJaPC+K04gg0sSEVJSDYwJhbtcTJ3rQupqLXPn zy6fl3/LeO51x1dWz3ZUap35uIRhWeBs0/vMug4sS9M+sX/pLE7fcenOobds3wVW2bx+1XVW 3NtjHaMlV/viUjYWNd2bld/WKt7Y5vHGuOlgsqHf6pKO6hVuGa0l+9esahUI1Ux92S2ePJe5 WO09J/OXeoZJ9nPUKpRYijMSDbWYi4oTAYxG/IAWAwAA Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Mar 2013 20:29:56 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---559023410-362651775-1363465485=:9389 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Sat, 16 Mar 2013, Elias M=E5rtenson wrote: > Is there a problem with the GSSAPI implementation in FreeBSD? There might be; I can't remember if I had trouble with it in my current=20 application even before I started using the gss_pseudo_random feature=20 which it does not support (which caused me to switch to the MIT krb5=20 implementation). > I'm trying to compile a minimal application that does nothing more than > including the file gssapi/gssapi_krb5.h: > > #include > > int main(void) > { > return 0; > } You do not mention which version of FreeBSD you are using. > When compiling this with "gcc foo.c" I get the following error: > > In file included from foo.c:1: > /usr/include/gssapi/gssapi_krb5.h:139: error: expected declaration > specifiers or '...' before 'time_t' I find that clang's warning/error messages are frequently more helpful=20 than gcc's. Running the same experiment on my 10-current (r247267) setup= =20 I get a somewhat different error: /usr/include/gssapi/gssapi_krb5.h:56: error: expected '=3D', ',', ';', 'asm= '=20 or '__attribute__' before 'extern' It seems that GSSAPI_CPP_START is never defined, for one. > I have to admit that I'm a bit stumped as to why I get the error message = in > the first place. The line in question looks like this: > > OM_uint32 > gsskrb5_extract_authtime_from_sec_context(OM_uint32 *, gss_ctx_id_t, > time_t *); > > I checked the preprocessor output and there are indeed correct typedefs f= or > OM_uint32, gss_ctx_id_t and time_t, so I can't really see why this error > would occur. The previous line may also be relevant. You do not have any=20 GSSAPI_LIB_FUNCTION or GSSAPI_LIB_CALL macros in the type specification of= =20 the function, though? (I do.) > In any case, given the import program, this behaviour isn't really correc= t > as far as I can tell. > > Any input on this? The provided gssapi_krb5 support is certainly suboptimal -- including the= =20 header at all gives a warning that it uses the deprecated path "gssapi.h"= =20 to get the generic gssapi declarations. Might be, it needs further love. -Ben Kaduk ---559023410-362651775-1363465485=:9389--