From 37a1ee9b9996e975e724dc00f49925d971c999e1 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 27 May 2004 20:24:52 -0400 Subject: [PATCH] uuid.h (UUID_DEFINE): Make the UUID defined as a static variable, with __attribute__ ((unused)) if we are using GCC. --- lib/uuid/ChangeLog | 5 +++++ lib/uuid/uuid.h | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index 2706bdc..e7b5bb1 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 ff5459e..e9cf889 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" { -- 1.8.3.1