mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Rename stdnoreturn.h to helpers.h
This file will contain more compiler-specific helpers. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
2
include/extern/err.h
vendored
2
include/extern/err.h
vendored
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "extern/stdnoreturn.h"
|
||||
#include "helpers.h"
|
||||
|
||||
#define warn rgbds_warn
|
||||
#define vwarn rgbds_vwarn
|
||||
|
||||
38
include/extern/stdnoreturn.h
vendored
38
include/extern/stdnoreturn.h
vendored
@@ -1,38 +0,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 */
|
||||
Reference in New Issue
Block a user