Combine pal_compiler.h definitions (#1240)
authorAdeel Mujahid <adeelbm@outlook.com>
Thu, 2 Jan 2020 01:01:57 +0000 (03:01 +0200)
committerJan Kotas <jkotas@microsoft.com>
Thu, 2 Jan 2020 01:01:57 +0000 (17:01 -0800)
src/libraries/Native/Unix/Common/pal_compiler.h
src/libraries/Native/Unix/System.Globalization.Native/pal_compiler.h [deleted file]

index b87de64..cb22fc1 100644 (file)
@@ -9,11 +9,14 @@
 #endif
 
 #ifdef static_assert
-#define c_static_assert(e) static_assert((e),"")
+#define c_static_assert_msg(e, msg) static_assert((e), msg)
+#define c_static_assert(e) c_static_assert_msg(e,"")
 #elif __has_extension(c_static_assert)
-#define c_static_assert(e) _Static_assert((e), "")
+#define c_static_assert_msg(e, msg) _Static_assert((e), msg)
+#define c_static_assert(e) c_static_assert_msg(e, "")
 #else
-#define c_static_assert(e) typedef char __c_static_assert__[(e)?1:-1]
+#define c_static_assert_msg(e, msg) typedef char __c_static_assert__[(e)?1:-1]
+#define c_static_assert(e) c_static_assert_msg(e, "")
 #endif
 
 #define DLLEXPORT __attribute__ ((__visibility__ ("default")))
diff --git a/src/libraries/Native/Unix/System.Globalization.Native/pal_compiler.h b/src/libraries/Native/Unix/System.Globalization.Native/pal_compiler.h
deleted file mode 100644 (file)
index 01ba72a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#pragma once
-
-#ifndef __has_extension
-#define __has_extension(...) 0
-#endif
-
-#ifdef static_assert
-#define c_static_assert_msg(e, msg) static_assert((e), msg)
-#elif __has_extension(c_static_assert)
-#define c_static_assert_msg(e, msg) _Static_assert((e), msg)
-#else
-#define c_static_assert_msg(e, msg) typedef char __c_static_assert__[(e)?1:-1]
-#endif
-
-#define DLLEXPORT __attribute__ ((__visibility__ ("default")))