Re: [eigen] Dev branch: Name clash with termios system header |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Dev branch: Name clash with termios system header
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 18 Sep 2009 07:10:55 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=VcALn5ypzzYw5rz2S5cMc4zAtbEGQLEuxw+a3XBHmvg=; b=ZmLKhfc8L80HXPPRzDC6CP4MgRjSPSztsv0OXdKbZHDg7OIk2Csn+k8aLo8c0p01VE gQ4Dtwj4aPxVPDoftIJHDBA20J3rGmsHlm4OM90emt7caAEgLK5ZBilrRwecE4CZawq9 VuyKPCUYscTM4q7bhd8rqPD1wOVeBy2j6ynnw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=FMFEYJOx7cdT0xhqyyr2wo2Nxv9QJPzNyzSt3aK50DKLxyKGGeQYCXOvDA56SU6VSF kI87jcBAS8bU1qH0K6VdcNDxdosQ0RHk901wPA9IYtWDrQN+slEg2RGuZJMUaqHe3T/u FvOuoDnYgY/w6vlxBfUcrvtimc6l4XpV0Umuo=
2009/9/18 Adolfo Rodríguez <dofo79@xxxxxxxxx>:
> Hi all,
>
> We recently updated from the stable to the development branch of eigen to
> try out the new SVD implementations. In doing so we encountered a nasty name
> clash, which is not eigen's fault, but for archival purposes I think it's
> good to comment it here on the list, just in case someone else bumps into
> it.
>
> It turns out that including termios.h (definitions used by the terminal I/O
> interfaces) defines the macro B0 (specific offending header:
> bits/termios.h), which incidentally is a local variable in
> Core/products/GeneralBlockPanelKernel.h. We currently get away with the
> situation by undefing B0 in the corresponding file, but this is an ugly hack
> in the long run. Since there is no chance that those legacy termios macros
> will change, could it be possible to rename the temporaries in
> Core/products/GeneralBlockPanelKernel.h to slightly less generic names?
> (prepending/appending 1-2 characters should be enough).
This isn't the first time that we have to #undef very polluting
symbols from standard headers: we already have to undef "vector" from
Apple's altivec.h, and "minor" from the GNU libc headers, among
others.
bits/termios.h isn't a C++ header, it's a C header, so in fact it's
just an "accident" that you can use it in C++, so i'll just #undef B0.
FYI, in C++, the reserved symbols that the standard library may claim
must start _ and then a capital letter, e.g. _B0.
Benoit
>
> Thanks in advance,
>
> Adolfo.
>
>
>
>
> --
> Adolfo Rodríguez Tsouroukdissian, Ph. D.
>
> Robotics engineer
> PAL ROBOTICS S.L
> http://www.pal-robotics.com
> Tel. +34.93.414.53.47
> Fax.+34.93.209.11.09
> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
> contener información privilegiada y/o confidencial que está dirigida
> exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
> destinatario indicado, o el empleado encargado de su entrega a dicha
> persona, por favor, notifíquelo inmediatamente y remita el mensaje original
> a la dirección de correo electrónico indicada. Cualquier copia, uso o
> distribución no autorizados de esta comunicación queda estrictamente
> prohibida.
>
> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
> contain confidential information which is privileged and intended only for
> the individual or entity to whom they are addressed. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution or use of this e-mail and/or accompanying document(s) is
> strictly prohibited. If you have received this e-mail in error, please
> immediately notify the sender at the above e-mail address.
>