shithub: rgbds

Download patch

ref: 0ae69b3114b096cf1b0a1ed6a5740db0b00b0955
parent: 95ccc48d0c30380bfc4367f442f3fea1af75e79a
author: Antonio Niño Díaz <[email protected]>
date: Sun Apr 1 20:39:12 EDT 2018

Rename stdnoreturn.h to helpers.h

This file will contain more compiler-specific helpers.

Signed-off-by: Antonio Niño Díaz <[email protected]>

--- a/include/asm/main.h
+++ b/include/asm/main.h
@@ -12,7 +12,7 @@
 #include <stdbool.h>
 #include <stdint.h>
 
-#include "extern/stdnoreturn.h"
+#include "helpers.h"
 
 struct sOptions {
 	char binary[2];
--- a/include/extern/err.h
+++ b/include/extern/err.h
@@ -17,7 +17,7 @@
 
 #include <stdarg.h>
 
-#include "extern/stdnoreturn.h"
+#include "helpers.h"
 
 #define warn rgbds_warn
 #define vwarn rgbds_vwarn
--- a/include/extern/stdnoreturn.h
+++ /dev/null
@@ -1,38 +1,0 @@
-/*
- * This file is part of RGBDS.
- *
- * Copyright (c) 2014-2018, RGBDS contributors.
- *
- * SPDX-License-Identifier: MIT
- */
-
-#ifndef EXTERN_STDNORETURN_H
-#define EXTERN_STDNORETURN_H
-
-#if defined(__STDC_VERSION__)
-	#if __STDC_VERSION__ >= 201112L
-		/* C11 or newer */
-		#define noreturn _Noreturn
-	#endif
-#endif
-
-#if defined(__GNUC__) && !defined(noreturn)
-	#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ >= 5))
-		/* GCC 2.5 or newer */
-		#define noreturn __attribute__ ((noreturn))
-	#endif
-#endif
-
-#if defined(_MSC_VER) && !defined(noreturn)
-	#if _MSC_VER >= 1310
-		/* MS Visual Studio 2003/.NET Framework 1.1 or newer */
-		#define noreturn _declspec(noreturn)
-	#endif
-#endif
-
-#if !defined(noreturn)
-	/* Unsupported, but no need to throw a fit */
-	#define noreturn
-#endif
-
-#endif /* EXTERN_STDNORETURN_H */
--- /dev/null
+++ b/include/helpers.h
@@ -1,0 +1,38 @@
+/*
+ * This file is part of RGBDS.
+ *
+ * Copyright (c) 2014-2018, RGBDS contributors.
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#ifndef HELPERS_H
+#define HELPERS_H
+
+#if defined(__STDC_VERSION__)
+	#if __STDC_VERSION__ >= 201112L
+		/* C11 or newer */
+		#define noreturn _Noreturn
+	#endif
+#endif
+
+#if defined(__GNUC__) && !defined(noreturn)
+	#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ >= 5))
+		/* GCC 2.5 or newer */
+		#define noreturn __attribute__ ((noreturn))
+	#endif
+#endif
+
+#if defined(_MSC_VER) && !defined(noreturn)
+	#if _MSC_VER >= 1310
+		/* MS Visual Studio 2003/.NET Framework 1.1 or newer */
+		#define noreturn _declspec(noreturn)
+	#endif
+#endif
+
+#if !defined(noreturn)
+	/* Unsupported, but no need to throw a fit */
+	#define noreturn
+#endif
+
+#endif /* HELPERS_H */
--- a/include/link/script.h
+++ b/include/link/script.h
@@ -11,7 +11,7 @@
 
 #include <stdint.h>
 
-#include "extern/stdnoreturn.h"
+#include "helpers.h"
 
 noreturn void script_fatalerror(const char *fmt, ...);