From owner-freebsd-gnome@FreeBSD.ORG Mon Sep 13 15:43:41 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0598816A4D6 for ; Mon, 13 Sep 2004 15:43:41 +0000 (GMT) Received: from postal2.es.net (postal2.es.net [198.128.3.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id D3C3B43D2D for ; Mon, 13 Sep 2004 15:43:40 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal2.es.net (Postal Node 2) with ESMTP (SSL) id IBA74465; Mon, 13 Sep 2004 08:43:40 -0700 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 42EC05D04; Mon, 13 Sep 2004 08:43:37 -0700 (PDT) To: Joe Marcus Clarke In-reply-to: Your message of "Sun, 12 Sep 2004 14:45:45 EDT." <1095014744.2740.3.camel@shumai.marcuscom.com> Date: Mon, 13 Sep 2004 08:43:35 -0700 From: "Kevin Oberman" Message-Id: <20040913154337.42EC05D04@ptavv.es.net> cc: FreeBSD GNOME Users Subject: Re: Porting problem on V5 with gettext/libintl X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 15:43:41 -0000 > From: Joe Marcus Clarke > Date: Sun, 12 Sep 2004 14:45:45 -0400 > > On Fri, 2004-09-10 at 18:44, Kevin Oberman wrote: > > I am attempting to port the current release of GnomeMeeting to FreeBSD > > and especially FreeBSD V5. I am not a C++ programmer and not much of a C > > programmer, so I am not surprised that I'm having a problem. > > > > I have one module that uses gettext and I am getting errors on the > > inclusion of the libintl.h header file. > > > > In file included from main_window.cpp:71: > > /usr/local/include/libintl.h:118: error: expected unqualified-id before "const" > > /usr/local/include/libintl.h:118: error: expected `)' before "const" > > /usr/local/include/libintl.h:118: error: expected init-declarator before "const"/usr/local/include/libintl.h:118: error: expected `,' or `;' before "const" > > /usr/local/include/libintl.h:134: error: expected unqualified-id before "const" > > /usr/local/include/libintl.h:134: error: expected `)' before "const" > > /usr/local/include/libintl.h:134: error: expected init-declarator before "const"/usr/local/include/libintl.h:134: error: expected `,' or `;' before "const" > > /usr/local/include/libintl.h:152: error: expected unqualified-id before " const" > > /usr/local/include/libintl.h:152: error: expected `)' before "const" > > /usr/local/include/libintl.h:152: error: expected init-declarator before "const"/usr/local/include/libintl.h:152: error: expected `,' or `;' before "const" > > /usr/local/include/libintl.h:233: error: expected unqualified-id before "const" > > /usr/local/include/libintl.h:233: error: expected `)' before "const" > > /usr/local/include/libintl.h:233: error: expected init-declarator before "const"/usr/local/include/libintl.h:233: error: expected `,' or `;' before "const" > > /usr/local/include/libintl.h:251: error: expected unqualified-id before "const" > > /usr/local/include/libintl.h:251: error: expected `)' before "const" > > /usr/local/include/libintl.h:251: error: expected init-declarator before "const"/usr/local/include/libintl.h:251: error: expected `,' or `;' before "const" > > /usr/local/include/libintl.h:269: error: expected unqualified-id before "const" > > /usr/local/include/libintl.h:269: error: expected `)' before "const" > > /usr/local/include/libintl.h:269: error: expected init-declarator before "const"/usr/local/include/libintl.h:269: error: expected `,' or `;' before "const" > > > > The exact lines in the header file are very similar: > > 118: extern char *gettext (const char *__msgid) > > _INTL_ASM (libintl_gettext); > > > > 134: extern char *dgettext (const char *__domainname, const char *__msgid) > > _INTL_ASM (libintl_dgettext); > > > > 152: extern char *dcgettext (const char *__domainname, const char *__msgid, > > int __category) > > _INTL_ASM (libintl_dcgettext); > > > > 233: extern char *textdomain (const char *__domainname) > > _INTL_ASM (libintl_textdomain); > > > > 251: extern char *bindtextdomain (const char *__domainname, const char *__dirname) > > _INTL_ASM (libintl_bindtextdomain); > > > > 259: extern char *bind_textdomain_codeset (const char *__domainname, > > const char *__codeset) > > _INTL_ASM (libintl_bind_textdomain_codeset); > > > > I do notice that all are #ifdefed to compile when _INTL_REDIRECT_INLINE > > is not defined. > > > > Any idea what this is caused by? Do I need to include some things before > > including it? It clearly works OK on Linux, so it's either a gcc 3.4 > > issue or a Linuxism nd I would suspect that it would have popped up on > > other ports. > > > > Any clues? > > I'm no C++ expert, but it looks like an extern C { ... } maybe required > around the libintl.h include. Thanks, Joe. libintl.h is already "C++ized" by being enclosed with: #ifdef __cplusplus extern "C" { #endif [...] #ifdef __cplusplus } #endif So I'm still trying to figure this one out. I may have to learn a bit more about C++ some day. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634