Whamcloud - gitweb
LU-8036 utils: remove ARRAY_SIZE() define from lustreapi.h 18/19818/4
authorJohn L. Hammond <john.hammond@intel.com>
Wed, 27 Apr 2016 16:15:17 +0000 (11:15 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 14 Jun 2016 03:53:40 +0000 (03:53 +0000)
Remove the definition of ARRAY_SIZE() from lustreapi.h.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I57b1893e7ecd57d841f5b9348a8d5285cbc02124
Reviewed-on: http://review.whamcloud.com/19818
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
lustre/include/lustre/lustreapi.h
lustre/utils/lfs.c
lustre/utils/req-layout.c

index 3f0cf97..e67d859 100644 (file)
@@ -46,8 +46,6 @@
 #include <stdint.h>
 #include <lustre/lustre_user.h>
 
-#define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0])))
-
 extern bool liblustreapi_initialized;
 
 
index bcc1963..14a84a9 100644 (file)
 #include <lustre_ver.h>
 #include <lustre_param.h>
 
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0])))
+#endif /* !ARRAY_SIZE */
+
 /* all functions */
 static int lfs_setstripe(int argc, char **argv);
 static int lfs_find(int argc, char **argv);
index 3a975e7..74997cb 100644 (file)
 #include <lustre_req_layout.h>
 #include <lustre/lustreapi.h>
 
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0])))
+#endif /* !ARRAY_SIZE */
+
 #define lustre_swab_generic_32s NULL
 #define lustre_swab_lu_seq_range NULL
 #define lustre_swab_mdt_body NULL