diff options
author | Theodore Ts'o <tytso@mit.edu> | 2004-05-27 20:24:52 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2004-05-27 20:24:52 -0400 |
commit | 37a1ee9b9996e975e724dc00f49925d971c999e1 (patch) | |
tree | 5ba2d022d30d2e4d8a65baab55a27d7ad701dc47 /lib | |
parent | a63d12678369f4ab0edf8fc5741825c035e78bf9 (diff) | |
download | e2fsprogs-37a1ee9b9996e975e724dc00f49925d971c999e1.tar.gz |
uuid.h (UUID_DEFINE): Make the UUID defined as a static
variable, with __attribute__ ((unused)) if we are using GCC.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uuid/ChangeLog | 5 | ||||
-rw-r--r-- | lib/uuid/uuid.h | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/uuid/ChangeLog b/lib/uuid/ChangeLog index 2706bdc4..e7b5bb1e 100644 --- a/lib/uuid/ChangeLog +++ b/lib/uuid/ChangeLog @@ -1,3 +1,8 @@ +2004-05-27 Theodore Ts'o <tytso@mit.edu> + + * 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 <tytso@mit.edu> * Update and clean up uuid man pages diff --git a/lib/uuid/uuid.h b/lib/uuid/uuid.h index ff5459ed..e9cf889a 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" { |