summaryrefslogtreecommitdiff
path: root/lib/libdrm/tests/util/common.h
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2016-03-20 10:20:15 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2016-03-20 10:20:15 +0000
commit463789b8671482b661f77e2cebfb7be3bda94309 (patch)
treefebd90adea88473ce0558056b04ab792c26eb20d /lib/libdrm/tests/util/common.h
parent7566c3dace59661ce2bb9d4aa5de5552101e61f8 (diff)
Import libdrm 2.4.67
Diffstat (limited to 'lib/libdrm/tests/util/common.h')
-rw-r--r--lib/libdrm/tests/util/common.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/libdrm/tests/util/common.h b/lib/libdrm/tests/util/common.h
new file mode 100644
index 000000000..5d572c2dd
--- /dev/null
+++ b/lib/libdrm/tests/util/common.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2008 Tungsten Graphics
+ * Jakob Bornecrantz <jakob@tungstengraphics.com>
+ * Copyright 2008 Intel Corporation
+ * Jesse Barnes <jesse.barnes@intel.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#ifndef UTIL_COMMON_H
+#define UTIL_COMMON_H
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+#endif
+
+#endif /* UTIL_COMMON_H */