aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/attributes.h16
-rw-r--r--src/types.h11
-rw-r--r--src/x11_gl.c3
-rw-r--r--src/x11_vulkan.c3
4 files changed, 21 insertions, 12 deletions
diff --git a/src/attributes.h b/src/attributes.h
new file mode 100644
index 0000000..684ee27
--- /dev/null
+++ b/src/attributes.h
@@ -0,0 +1,16 @@
+// Copyright 2012-2022 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: ISC
+
+#ifndef PUGL_SRC_ATTRIBUTES_H
+#define PUGL_SRC_ATTRIBUTES_H
+
+// Unused parameter macro to suppresses warnings and make it impossible to use
+#if defined(__cplusplus)
+# define PUGL_UNUSED(name)
+#elif defined(__GNUC__) || defined(__clang__)
+# define PUGL_UNUSED(name) name##_unused __attribute__((__unused__))
+#else
+# define PUGL_UNUSED(name) name
+#endif
+
+#endif // PUGL_SRC_ATTRIBUTES_H
diff --git a/src/types.h b/src/types.h
index aa17b7f..e4ca16b 100644
--- a/src/types.h
+++ b/src/types.h
@@ -1,4 +1,4 @@
-// Copyright 2012-2020 David Robillard <d@drobilla.net>
+// Copyright 2012-2022 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
#ifndef PUGL_SRC_TYPES_H
@@ -10,15 +10,6 @@
#include <stddef.h>
#include <stdint.h>
-// Unused parameter macro to suppresses warnings and make it impossible to use
-#if defined(__cplusplus)
-# define PUGL_UNUSED(name)
-#elif defined(__GNUC__) || defined(__clang__)
-# define PUGL_UNUSED(name) name##_unused __attribute__((__unused__))
-#else
-# define PUGL_UNUSED(name) name
-#endif
-
/// Platform-specific world internals
typedef struct PuglWorldInternalsImpl PuglWorldInternals;
diff --git a/src/x11_gl.c b/src/x11_gl.c
index 0e34a66..06e2b22 100644
--- a/src/x11_gl.c
+++ b/src/x11_gl.c
@@ -1,6 +1,7 @@
-// Copyright 2012-2021 David Robillard <d@drobilla.net>
+// Copyright 2012-2022 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
+#include "attributes.h"
#include "stub.h"
#include "types.h"
#include "x11.h"
diff --git a/src/x11_vulkan.c b/src/x11_vulkan.c
index 0b9c50b..72ff701 100644
--- a/src/x11_vulkan.c
+++ b/src/x11_vulkan.c
@@ -1,8 +1,9 @@
-// Copyright 2012-2021 David Robillard <d@drobilla.net>
+// Copyright 2012-2022 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
#define VK_NO_PROTOTYPES 1
+#include "attributes.h"
#include "stub.h"
#include "types.h"
#include "x11.h"