c99_compat.h: remove inline and __func__ shims
We're requiring C11 now, and both "inline" and __func__ is supported in C++ code as well. So no need for these compatibility-shims anymore. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16812>
This commit is contained in:

committed by
Marge Bot

parent
8575d0e84b
commit
806272ec97
@@ -38,16 +38,6 @@
|
|||||||
|
|
||||||
# if _MSC_VER < 1900
|
# if _MSC_VER < 1900
|
||||||
# error "Microsoft Visual Studio 2015 or higher required"
|
# error "Microsoft Visual Studio 2015 or higher required"
|
||||||
# endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Visual Studio will complain if we define the `inline` keyword, but
|
|
||||||
* actually it only supports the keyword on C++.
|
|
||||||
*
|
|
||||||
* To avoid this the _ALLOW_KEYWORD_MACROS must be set.
|
|
||||||
*/
|
|
||||||
# if !defined(_ALLOW_KEYWORD_MACROS)
|
|
||||||
# define _ALLOW_KEYWORD_MACROS
|
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -65,30 +55,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* C99 inline keyword
|
|
||||||
*/
|
|
||||||
#ifndef inline
|
|
||||||
# ifdef __cplusplus
|
|
||||||
/* C++ supports inline keyword */
|
|
||||||
# elif defined(__GNUC__)
|
|
||||||
# define inline __inline__
|
|
||||||
# elif defined(_MSC_VER)
|
|
||||||
# define inline __inline
|
|
||||||
# elif defined(__ICL)
|
|
||||||
# define inline __inline
|
|
||||||
# elif defined(__INTEL_COMPILER)
|
|
||||||
/* Intel compiler supports inline keyword */
|
|
||||||
# elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
|
|
||||||
# define inline __inline
|
|
||||||
# elif (__STDC_VERSION__ >= 199901L)
|
|
||||||
/* C99 supports inline keyword */
|
|
||||||
# else
|
|
||||||
# define inline
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C99 restrict keyword
|
* C99 restrict keyword
|
||||||
*
|
*
|
||||||
@@ -108,22 +74,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* C99 __func__ macro
|
|
||||||
*/
|
|
||||||
#ifndef __func__
|
|
||||||
# if (__STDC_VERSION__ >= 199901L)
|
|
||||||
/* C99 */
|
|
||||||
# elif defined(__GNUC__)
|
|
||||||
# define __func__ __FUNCTION__
|
|
||||||
# elif defined(_MSC_VER)
|
|
||||||
# define __func__ __FUNCTION__
|
|
||||||
# else
|
|
||||||
# define __func__ "<unknown>"
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Simple test case for debugging */
|
/* Simple test case for debugging */
|
||||||
#if 0
|
#if 0
|
||||||
static inline const char *
|
static inline const char *
|
||||||
|
Reference in New Issue
Block a user