gpg-error.h possible(?) syntax error: #define GPG_ERR_SYSTEM_ERROR (1 << 15)

Hedge Hog hedgehogshiatus at gmail.com
Sun Nov 1 11:04:55 CET 2009


Hi,
I'm not a C/C++ guru so would appreciate anyone indicating if the
following is a bug in the generated gpg-error.h file.

This issue arose in the process of trying to create a ruby interface for gpgme.

After checking out the source for libgpg-error-1.7 and running:
./autogen.sh
./configure --enable-maintainer-mode
make

I run swig on an interface file that includes the generated gpg-error.h file.
I get the following error from swig (ver 1.3.36):

libgpg-error-1.7/src/gpg-error.h:346: Error: Syntax error in input(1).

lines 345-7 in gpg-error.h are:

    /* The following error codes are used to map system errors.  */
#define GPG_ERR_SYSTEM_ERROR	(1 << 15)
    GPG_ERR_E2BIG = GPG_ERR_SYSTEM_ERROR | 0,

It is not clear to me if this is an problem with gpg-error.h or swig.

Appreciate any insight.

Hedgehog



More information about the Gnupg-users mailing list