GNOME Bugzilla – Bug 652625
Prevent redefinition of ALIGN
Last modified: 2015-02-07 16:59:55 UTC
On some platforms there is already a definition of ALIGN, like on OpenBSD in /usr/include/machine/param.h. The attached diff renames the local definition to G_ALIGN to prevent a redefinition.
Created attachment 189965 [details] [review] Rename ALIGN to G_ALIGN
Or should a construct like: #ifdef ALIGN #undef ALIGN #endif be used?
Review of attachment 189965 [details] [review]: ::: girepository/giroffsets.c @@ +351,3 @@ } +#define G_ALIGN(n, align) (((n) + (align) - 1) & ~((align) - 1)) g-i is totally not consistent, but I've been trying to move new symbols/macros to be GI_ prefixed over G_, because we're not glib (at least, not yet). So can you call it GI_ALIGN() ?
Yep, OK to commit it as GI_ALIGN() then?
(In reply to comment #4) > Yep, OK to commit it as GI_ALIGN() then? Yep, thanks!
Hi. Just for the sake of completeness, the ALIGN redefinition on OpenBSD was due to a bug in our glib package which I fixed a couple minutes ago in our ports tree. That said, ALIGN is very generic, so I welcome the move to using GI_ALIGN.
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]