From: Theodore Ts'o Date: Fri, 28 May 2004 00:24:52 +0000 (-0400) Subject: uuid.h (UUID_DEFINE): Make the UUID defined as a static X-Git-Tag: E2FSPROGS-1_36~155 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37a1ee9b9996e975e724dc00f49925d971c999e1;p=thirdparty%2Fe2fsprogs.git uuid.h (UUID_DEFINE): Make the UUID defined as a static variable, with __attribute__ ((unused)) if we are using GCC. --- diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index 2706bdc44..e7b5bb1e3 100644 --- a/lib/uuid/ChangeLog +++ b/lib/uuid/ChangeLog @@ -1,3 +1,8 @@ +2004-05-27 Theodore Ts'o + + * uuid.h (UUID_DEFINE): Make the UUID defined as a static + variable, with __attribute__ ((unused)) if we are using GCC. + 2004-05-04 Theodore Ts'o * Update and clean up uuid man pages diff --git a/lib/uuid/uuid.h b/lib/uuid/uuid.h index ff5459ed1..e9cf889ae 100644 --- a/lib/uuid/uuid.h +++ b/lib/uuid/uuid.h @@ -52,8 +52,13 @@ typedef unsigned char uuid_t[16]; #define UUID_TYPE_DCE_RANDOM 4 /* Allow UUID constants to be defined */ +#ifdef __GNUC__ #define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ - const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} + static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} +#else +#define UUID_DEFINE(name,u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15) \ + static const uuid_t name = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} +#endif #ifdef __cplusplus extern "C" {