Whamcloud - gitweb
uuid.h (UUID_DEFINE): Make the UUID defined as a static
authorTheodore Ts'o <tytso@mit.edu>
Fri, 28 May 2004 00:24:52 +0000 (20:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 28 May 2004 00:24:52 +0000 (20:24 -0400)
variable, with __attribute__ ((unused)) if we are using GCC.

lib/uuid/ChangeLog
lib/uuid/uuid.h

index 2706bdc..e7b5bb1 100644 (file)
@@ -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
index ff5459e..e9cf889 100644 (file)
@@ -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" {