Mesa (main): include: drop c11_compat.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 2 13:50:05 UTC 2022


Module: Mesa
Branch: main
Commit: df2dd474c73982e89d0ed71951ff723eb7060ce6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=df2dd474c73982e89d0ed71951ff723eb7060ce6

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Wed Jun  1 13:38:39 2022 +0200

include: drop c11_compat.h

We now require C11, and C++ supports static_assert just fine, which is
the only thing this header ever added support for. So let's get rid of
this needless header.

Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>

---

 include/c11_compat.h                    | 27 ---------------------------
 src/amd/common/ac_sqtt.h                |  1 -
 src/imagination/vulkan/pvr_cmd_buffer.c |  1 -
 src/util/macros.h                       |  3 ---
 4 files changed, 32 deletions(-)

diff --git a/include/c11_compat.h b/include/c11_compat.h
deleted file mode 100644
index d35740f47a4..00000000000
--- a/include/c11_compat.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright 2019 Intel Corporation */
-/* SPDX-License-Identifier: MIT */
-
-#include "no_extern_c.h"
-
-#ifndef _C11_COMPAT_H_
-#define _C11_COMPAT_H_
-
-#if defined(__cplusplus)
-   /* This is C++ code, not C */
-#elif (__STDC_VERSION__ >= 201112L)
-   /* Already C11 */
-#else
-
-
-/*
- * C11 static_assert() macro
- * assert.h only defines that name for C11 and above
- */
-#ifndef static_assert
-#define static_assert _Static_assert
-#endif
-
-
-#endif /* !C++ && !C11 */
-
-#endif /* _C11_COMPAT_H_ */
diff --git a/src/amd/common/ac_sqtt.h b/src/amd/common/ac_sqtt.h
index 55130aa2221..05798b7e1da 100644
--- a/src/amd/common/ac_sqtt.h
+++ b/src/amd/common/ac_sqtt.h
@@ -30,7 +30,6 @@
 #include <stdbool.h>
 
 #include <assert.h>
-#include "c11_compat.h"
 #include "ac_rgp.h"
 
 struct radeon_cmdbuf;
diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c
index 0afd463e2fb..4fe224f481d 100644
--- a/src/imagination/vulkan/pvr_cmd_buffer.c
+++ b/src/imagination/vulkan/pvr_cmd_buffer.c
@@ -29,7 +29,6 @@
 #include <string.h>
 #include <vulkan/vulkan.h>
 
-#include "c11_compat.h"
 #include "hwdef/rogue_hw_defs.h"
 #include "hwdef/rogue_hw_utils.h"
 #include "pvr_bo.h"
diff --git a/src/util/macros.h b/src/util/macros.h
index a5dc4846211..dd8af86bcf8 100644
--- a/src/util/macros.h
+++ b/src/util/macros.h
@@ -26,9 +26,6 @@
 
 #include <stdio.h>
 #include <assert.h>
-
-#include "c11_compat.h"
-
 #include <stdint.h>
 
 /* Compute the size of an array */



More information about the mesa-commit mailing list