gpgme.h in 0.4.3 breaks with C++ compilers
Werner Koch
wk at gnupg.org
Mon Dec 22 23:11:29 CET 2003
On Mon, 22 Dec 2003 19:46:31 +0100, Daniel Molkentin said:
> Hi!
> I noticed g++ bailing out on gpgme.h from both 0.4.3 and CVS for using the
> (reserved) class keyword:
Please apply the patch below to gpgme.h.
You should also subscribe to gpa-dev because that is the Aegypten
developer's list. To request a CC, an MFT header is the best choice.
Thanks,
Werner
diff -u -r1.131 gpgme.h
--- gpgme.h 19 Nov 2003 15:15:21 -0000 1.131
+++ gpgme.h 22 Dec 2003 22:03:18 -0000
@@ -44,7 +44,11 @@
#if 0 /* just to make Emacs auto-indent happy */
}
#endif
-#endif
+/* Keyword renaming for the sake of C doubleplus. */
+#define _GPGME_D_CLASS clazz
+#else
+#define _GPGME_D_CLASS class
+#endif /* __cplusplus */
#include <gpg-error.h>
@@ -507,7 +511,7 @@
gpgme_error_t status;
/* Crypto backend specific signature class. */
- unsigned int class;
+ unsigned int _GPGME_D_CLASS;
/* The user ID string. */
char *uid;
@@ -1087,7 +1091,7 @@
char *fpr;
/* Crypto backend specific signature class. */
- unsigned int class;
+ unsigned int _GPGME_D_CLASS;
};
typedef struct _gpgme_new_signature *gpgme_new_signature_t;
More information about the Gpa-dev
mailing list