From: Takashi Iwai Subject: Re: SALSA-Lib versus C++ Date: Mon, 02 Jul 2007 15:31:57 +0200 Message-ID: References: <20070701193324.241cff62.alsauser@pragmasoft.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (ns2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id ABCBF103849 for ; Mon, 2 Jul 2007 15:31:57 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: "J. Scott Merritt" Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 02 Jul 2007 15:06:44 +0200, I wrote: > > At Sun, 1 Jul 2007 19:33:24 -0400, > J. Scott Merritt wrote: > > > > Dear List, > > > > It -appears- to me that the source file headers generated by > > SALSA-Lib-0.0.5 (for example SALSA:asoundlib.h) are not > > generally usable from within a C++ program compiled with g++. > > > > The first problem that I encountered was a failure in > > IOC_TYPECHECK from asm-generic/ioctl.h. After much searching, > > I concluded that this is a component of continuing struggles > > related to "sanitized linux-kernel-headers". Some of the Debian > > folks have supplied patches to disable this particular check when > > the ioctl.h file is included from userland, but these patched > > headers are not present in my cross-compile environment. This > > behavior apparently is not a problem with gcc or g++ < 2.3.3 - > > but shows up in later versions of g++. ... a real mess as best > > I can tell ... > > > > The next problem is that when warnings are enabled, g++ > > complains vigorously about void pointers that are implicitly > > cast to typed pointers through-out all of the SALSA-Lib > > supplied header files. > > > > Perhaps SALSA-Lib was never intended from usable from C++ > > programs - and indeed it could argued that its intended > > application (embedded systems) should avoid the use of C++. > > If this is the case, perhaps a mention of this restriction > > might be appropriate on the SALSA-Lib Website and/or in > > its README file ? > > Did you try to include it from extern "C" { .. } block? ... looks like C++ really doesn't like the conversion. So, don't use C++. I hate it :) Takashi