gallium: Define C99 restrict keyword where absent.
This commit is contained in:
parent
e1003336f0
commit
6c1aa4fd49
|
@ -122,6 +122,27 @@ typedef unsigned char boolean;
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Define the C99 restrict keyword.
|
||||||
|
*
|
||||||
|
* See also:
|
||||||
|
* - http://cellperformance.beyond3d.com/articles/2006/05/demystifying-the-restrict-keyword.html
|
||||||
|
*/
|
||||||
|
#ifndef restrict
|
||||||
|
# if (__STDC_VERSION__ >= 199901L)
|
||||||
|
/* C99 */
|
||||||
|
# elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
|
||||||
|
/* C99 */
|
||||||
|
# elif defined(__GNUC__)
|
||||||
|
# define restrict __restrict__
|
||||||
|
# elif defined(_MSC_VER)
|
||||||
|
# define restrict __restrict
|
||||||
|
# else
|
||||||
|
# define restrict /* */
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Function visibility */
|
/* Function visibility */
|
||||||
#ifndef PUBLIC
|
#ifndef PUBLIC
|
||||||
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
|
||||||
|
|
Loading…
Reference in New Issue