aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/egl/main')
-rw-r--r--src/egl/main/eglapi.c19
-rw-r--r--src/egl/main/eglarray.h3
-rw-r--r--src/egl/main/eglcompiler.h8
-rw-r--r--src/egl/main/eglconfig.c6
-rw-r--r--src/egl/main/eglconfig.h10
-rw-r--r--src/egl/main/eglcontext.h13
-rw-r--r--src/egl/main/eglcurrent.c20
-rw-r--r--src/egl/main/eglcurrent.h7
-rw-r--r--src/egl/main/egldisplay.h7
-rw-r--r--src/egl/main/egldriver.h4
-rw-r--r--src/egl/main/eglimage.h13
-rw-r--r--src/egl/main/eglmutex.h10
-rw-r--r--src/egl/main/eglscreen.h3
-rw-r--r--src/egl/main/eglsurface.h13
-rw-r--r--src/egl/main/eglsync.h14
15 files changed, 82 insertions, 68 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index db44a266ef7..cc74b1a7b08 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -86,6 +86,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "c99_compat.h"
#include "eglglobals.h"
#include "eglcontext.h"
@@ -161,7 +162,7 @@
_EGL_CHECK_OBJECT(disp, Sync, s, ret, drv)
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckDisplay(_EGLDisplay *disp, const char *msg)
{
if (!disp) {
@@ -176,7 +177,7 @@ _eglCheckDisplay(_EGLDisplay *disp, const char *msg)
}
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckSurface(_EGLDisplay *disp, _EGLSurface *surf, const char *msg)
{
_EGLDriver *drv = _eglCheckDisplay(disp, msg);
@@ -190,7 +191,7 @@ _eglCheckSurface(_EGLDisplay *disp, _EGLSurface *surf, const char *msg)
}
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckContext(_EGLDisplay *disp, _EGLContext *context, const char *msg)
{
_EGLDriver *drv = _eglCheckDisplay(disp, msg);
@@ -204,7 +205,7 @@ _eglCheckContext(_EGLDisplay *disp, _EGLContext *context, const char *msg)
}
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckConfig(_EGLDisplay *disp, _EGLConfig *conf, const char *msg)
{
_EGLDriver *drv = _eglCheckDisplay(disp, msg);
@@ -218,7 +219,7 @@ _eglCheckConfig(_EGLDisplay *disp, _EGLConfig *conf, const char *msg)
}
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
{
_EGLDriver *drv = _eglCheckDisplay(disp, msg);
@@ -235,7 +236,7 @@ _eglCheckSync(_EGLDisplay *disp, _EGLSync *s, const char *msg)
#ifdef EGL_MESA_screen_surface
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckScreen(_EGLDisplay *disp, _EGLScreen *scrn, const char *msg)
{
_EGLDriver *drv = _eglCheckDisplay(disp, msg);
@@ -249,7 +250,7 @@ _eglCheckScreen(_EGLDisplay *disp, _EGLScreen *scrn, const char *msg)
}
-static INLINE _EGLDriver *
+static inline _EGLDriver *
_eglCheckMode(_EGLDisplay *disp, _EGLMode *m, const char *msg)
{
_EGLDriver *drv = _eglCheckDisplay(disp, msg);
@@ -269,7 +270,7 @@ _eglCheckMode(_EGLDisplay *disp, _EGLMode *m, const char *msg)
/**
* Lookup and lock a display.
*/
-static INLINE _EGLDisplay *
+static inline _EGLDisplay *
_eglLockDisplay(EGLDisplay display)
{
_EGLDisplay *dpy = _eglLookupDisplay(display);
@@ -282,7 +283,7 @@ _eglLockDisplay(EGLDisplay display)
/**
* Unlock a display.
*/
-static INLINE void
+static inline void
_eglUnlockDisplay(_EGLDisplay *dpy)
{
_eglUnlockMutex(&dpy->Mutex);
diff --git a/src/egl/main/eglarray.h b/src/egl/main/eglarray.h
index d07f301f242..bde5ba50f80 100644
--- a/src/egl/main/eglarray.h
+++ b/src/egl/main/eglarray.h
@@ -29,6 +29,7 @@
#ifndef EGLARRAY_INCLUDED
#define EGLARRAY_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
@@ -75,7 +76,7 @@ _eglFlattenArray(_EGLArray *array, void *buffer, EGLint elem_size, EGLint size,
_EGLArrayForEach flatten);
-static INLINE EGLint
+static inline EGLint
_eglGetArraySize(_EGLArray *array)
{
return (array) ? array->Size : 0;
diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h
index 5ea83d6145a..2e1c8b92f7b 100644
--- a/src/egl/main/eglcompiler.h
+++ b/src/egl/main/eglcompiler.h
@@ -31,7 +31,7 @@
#define EGLCOMPILER_INCLUDED
-#include "c99_compat.h" /* inline, __func__, etc. */
+#include "c99_compat.h" /* __func__, etc. */
/**
@@ -66,12 +66,6 @@
#endif
-/* XXX: Use standard `inline` keyword instead */
-#ifndef INLINE
-# define INLINE inline
-#endif
-
-
/**
* Function visibility
*/
diff --git a/src/egl/main/eglconfig.c b/src/egl/main/eglconfig.c
index 1ac716c86e7..50fcbb09042 100644
--- a/src/egl/main/eglconfig.c
+++ b/src/egl/main/eglconfig.c
@@ -36,6 +36,8 @@
#include <stdlib.h>
#include <string.h>
#include <assert.h>
+#include "c99_compat.h"
+
#include "eglconfig.h"
#include "egldisplay.h"
#include "eglcurrent.h"
@@ -481,7 +483,7 @@ _eglMatchConfig(const _EGLConfig *conf, const _EGLConfig *criteria)
return matched;
}
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglIsConfigAttribValid(_EGLConfig *conf, EGLint attr)
{
if (_eglOffsetOfConfig(attr) < 0)
@@ -651,7 +653,7 @@ _eglCompareConfigs(const _EGLConfig *conf1, const _EGLConfig *conf2,
}
-static INLINE
+static inline
void _eglSwapConfigs(const _EGLConfig **conf1, const _EGLConfig **conf2)
{
const _EGLConfig *tmp = *conf1;
diff --git a/src/egl/main/eglconfig.h b/src/egl/main/eglconfig.h
index b00f872ef10..5fa8f330076 100644
--- a/src/egl/main/eglconfig.h
+++ b/src/egl/main/eglconfig.h
@@ -34,6 +34,8 @@
#include <assert.h>
#include <stddef.h>
+#include "c99_compat.h"
+
#include "egltypedefs.h"
@@ -86,7 +88,7 @@ struct _egl_config
/**
* Map an EGL attribute enum to the offset of the member in _EGLConfig.
*/
-static INLINE EGLint
+static inline EGLint
_eglOffsetOfConfig(EGLint attr)
{
switch (attr) {
@@ -141,7 +143,7 @@ _eglOffsetOfConfig(EGLint attr)
* in the attribute enums. The separation is to catch application errors.
* Drivers should never set a key that is an invalid attribute.
*/
-static INLINE void
+static inline void
_eglSetConfigKey(_EGLConfig *conf, EGLint key, EGLint val)
{
EGLint offset = _eglOffsetOfConfig(key);
@@ -153,7 +155,7 @@ _eglSetConfigKey(_EGLConfig *conf, EGLint key, EGLint val)
/**
* Return the value for a given key.
*/
-static INLINE EGLint
+static inline EGLint
_eglGetConfigKey(const _EGLConfig *conf, EGLint key)
{
EGLint offset = _eglOffsetOfConfig(key);
@@ -177,7 +179,7 @@ _eglLookupConfig(EGLConfig config, _EGLDisplay *dpy);
/**
* Return the handle of a linked config.
*/
-static INLINE EGLConfig
+static inline EGLConfig
_eglGetConfigHandle(_EGLConfig *conf)
{
return (EGLConfig) conf;
diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h
index 73badc5d6b9..5b574b5548f 100644
--- a/src/egl/main/eglcontext.h
+++ b/src/egl/main/eglcontext.h
@@ -31,6 +31,7 @@
#ifndef EGLCONTEXT_INCLUDED
#define EGLCONTEXT_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
#include "egldisplay.h"
@@ -81,7 +82,7 @@ _eglBindContext(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read,
/**
* Increment reference count for the context.
*/
-static INLINE _EGLContext *
+static inline _EGLContext *
_eglGetContext(_EGLContext *ctx)
{
if (ctx)
@@ -93,7 +94,7 @@ _eglGetContext(_EGLContext *ctx)
/**
* Decrement reference count for the context.
*/
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglPutContext(_EGLContext *ctx)
{
return (ctx) ? _eglPutResource(&ctx->Resource) : EGL_FALSE;
@@ -104,7 +105,7 @@ _eglPutContext(_EGLContext *ctx)
* Link a context to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
-static INLINE EGLContext
+static inline EGLContext
_eglLinkContext(_EGLContext *ctx)
{
_eglLinkResource(&ctx->Resource, _EGL_RESOURCE_CONTEXT);
@@ -116,7 +117,7 @@ _eglLinkContext(_EGLContext *ctx)
* Unlink a linked context from its display.
* Accessing an unlinked context should generate EGL_BAD_CONTEXT error.
*/
-static INLINE void
+static inline void
_eglUnlinkContext(_EGLContext *ctx)
{
_eglUnlinkResource(&ctx->Resource, _EGL_RESOURCE_CONTEXT);
@@ -127,7 +128,7 @@ _eglUnlinkContext(_EGLContext *ctx)
* Lookup a handle to find the linked context.
* Return NULL if the handle has no corresponding linked context.
*/
-static INLINE _EGLContext *
+static inline _EGLContext *
_eglLookupContext(EGLContext context, _EGLDisplay *dpy)
{
_EGLContext *ctx = (_EGLContext *) context;
@@ -140,7 +141,7 @@ _eglLookupContext(EGLContext context, _EGLDisplay *dpy)
/**
* Return the handle of a linked context, or EGL_NO_CONTEXT.
*/
-static INLINE EGLContext
+static inline EGLContext
_eglGetContextHandle(_EGLContext *ctx)
{
_EGLResource *res = (_EGLResource *) ctx;
diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c
index fcb732d4984..d358feaad5e 100644
--- a/src/egl/main/eglcurrent.c
+++ b/src/egl/main/eglcurrent.c
@@ -28,6 +28,8 @@
#include <stdlib.h>
#include <string.h>
+#include "c99_compat.h"
+
#include "egllog.h"
#include "eglmutex.h"
#include "eglcurrent.h"
@@ -55,7 +57,7 @@ static __thread const _EGLThreadInfo *_egl_TLS
__attribute__ ((tls_model("initial-exec")));
#endif
-static INLINE void _eglSetTSD(const _EGLThreadInfo *t)
+static inline void _eglSetTSD(const _EGLThreadInfo *t)
{
pthread_setspecific(_egl_TSD, (const void *) t);
#ifdef GLX_USE_TLS
@@ -63,7 +65,7 @@ static INLINE void _eglSetTSD(const _EGLThreadInfo *t)
#endif
}
-static INLINE _EGLThreadInfo *_eglGetTSD(void)
+static inline _EGLThreadInfo *_eglGetTSD(void)
{
#ifdef GLX_USE_TLS
return (_EGLThreadInfo *) _egl_TLS;
@@ -72,7 +74,7 @@ static INLINE _EGLThreadInfo *_eglGetTSD(void)
#endif
}
-static INLINE void _eglFiniTSD(void)
+static inline void _eglFiniTSD(void)
{
_eglLockMutex(&_egl_TSDMutex);
if (_egl_TSDInitialized) {
@@ -86,7 +88,7 @@ static INLINE void _eglFiniTSD(void)
_eglUnlockMutex(&_egl_TSDMutex);
}
-static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
+static inline EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
{
if (!_egl_TSDInitialized) {
_eglLockMutex(&_egl_TSDMutex);
@@ -112,23 +114,23 @@ static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
static const _EGLThreadInfo *_egl_TSD;
static void (*_egl_FreeTSD)(_EGLThreadInfo *);
-static INLINE void _eglSetTSD(const _EGLThreadInfo *t)
+static inline void _eglSetTSD(const _EGLThreadInfo *t)
{
_egl_TSD = t;
}
-static INLINE _EGLThreadInfo *_eglGetTSD(void)
+static inline _EGLThreadInfo *_eglGetTSD(void)
{
return (_EGLThreadInfo *) _egl_TSD;
}
-static INLINE void _eglFiniTSD(void)
+static inline void _eglFiniTSD(void)
{
if (_egl_FreeTSD && _egl_TSD)
_egl_FreeTSD((_EGLThreadInfo *) _egl_TSD);
}
-static INLINE EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
+static inline EGLBoolean _eglInitTSD(void (*dtor)(_EGLThreadInfo *))
{
if (!_egl_FreeTSD && dtor) {
_egl_FreeTSD = dtor;
@@ -179,7 +181,7 @@ _eglDestroyThreadInfo(_EGLThreadInfo *t)
/**
* Make sure TSD is initialized and return current value.
*/
-static INLINE _EGLThreadInfo *
+static inline _EGLThreadInfo *
_eglCheckedGetTSD(void)
{
if (_eglInitTSD(&_eglDestroyThreadInfo) != EGL_TRUE) {
diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h
index 45fcc64aad4..a2856d25956 100644
--- a/src/egl/main/eglcurrent.h
+++ b/src/egl/main/eglcurrent.h
@@ -29,6 +29,7 @@
#ifndef EGLCURRENT_INCLUDED
#define EGLCURRENT_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
@@ -61,7 +62,7 @@ struct _egl_thread_info
/**
* Return true if a client API enum is recognized.
*/
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglIsApiValid(EGLenum api)
{
return (api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API);
@@ -72,7 +73,7 @@ _eglIsApiValid(EGLenum api)
* Convert a client API enum to an index, for use by thread info.
* The client API enum is assumed to be valid.
*/
-static INLINE EGLint
+static inline EGLint
_eglConvertApiToIndex(EGLenum api)
{
return api - _EGL_API_FIRST_API;
@@ -83,7 +84,7 @@ _eglConvertApiToIndex(EGLenum api)
* Convert an index, used by thread info, to a client API enum.
* The index is assumed to be valid.
*/
-static INLINE EGLenum
+static inline EGLenum
_eglConvertApiFromIndex(EGLint idx)
{
return _EGL_API_FIRST_API + idx;
diff --git a/src/egl/main/egldisplay.h b/src/egl/main/egldisplay.h
index bcdc2b2b693..213b96a680d 100644
--- a/src/egl/main/egldisplay.h
+++ b/src/egl/main/egldisplay.h
@@ -31,6 +31,7 @@
#ifndef EGLDISPLAY_INCLUDED
#define EGLDISPLAY_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
#include "egldefines.h"
@@ -197,7 +198,7 @@ _eglCheckResource(void *res, _EGLResourceType type, _EGLDisplay *dpy);
* Lookup a handle to find the linked display.
* Return NULL if the handle has no corresponding linked display.
*/
-static INLINE _EGLDisplay *
+static inline _EGLDisplay *
_eglLookupDisplay(EGLDisplay display)
{
_EGLDisplay *dpy = (_EGLDisplay *) display;
@@ -210,7 +211,7 @@ _eglLookupDisplay(EGLDisplay display)
/**
* Return the handle of a linked display, or EGL_NO_DISPLAY.
*/
-static INLINE EGLDisplay
+static inline EGLDisplay
_eglGetDisplayHandle(_EGLDisplay *dpy)
{
return (EGLDisplay) ((dpy) ? dpy : EGL_NO_DISPLAY);
@@ -240,7 +241,7 @@ _eglUnlinkResource(_EGLResource *res, _EGLResourceType type);
/**
* Return true if the resource is linked.
*/
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglIsResourceLinked(_EGLResource *res)
{
return res->IsLinked;
diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h
index e34f19f9a20..ccb70ace4f9 100644
--- a/src/egl/main/egldriver.h
+++ b/src/egl/main/egldriver.h
@@ -32,6 +32,8 @@
#define EGLDRIVER_INCLUDED
+#include "c99_compat.h"
+
#include "egltypedefs.h"
#include "eglapi.h"
#include <stddef.h>
@@ -43,7 +45,7 @@
* semicolon when used.
*/
#define _EGL_DRIVER_TYPECAST(drvtype, egltype, code) \
- static INLINE struct drvtype *drvtype(const egltype *obj) \
+ static inline struct drvtype *drvtype(const egltype *obj) \
{ return (struct drvtype *) code; }
diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h
index 1b4d6cd0bb1..71c52cadb97 100644
--- a/src/egl/main/eglimage.h
+++ b/src/egl/main/eglimage.h
@@ -30,6 +30,7 @@
#ifndef EGLIMAGE_INCLUDED
#define EGLIMAGE_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
#include "egldisplay.h"
@@ -92,7 +93,7 @@ _eglInitImage(_EGLImage *img, _EGLDisplay *dpy);
/**
* Increment reference count for the image.
*/
-static INLINE _EGLImage *
+static inline _EGLImage *
_eglGetImage(_EGLImage *img)
{
if (img)
@@ -104,7 +105,7 @@ _eglGetImage(_EGLImage *img)
/**
* Decrement reference count for the image.
*/
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglPutImage(_EGLImage *img)
{
return (img) ? _eglPutResource(&img->Resource) : EGL_FALSE;
@@ -115,7 +116,7 @@ _eglPutImage(_EGLImage *img)
* Link an image to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
-static INLINE EGLImageKHR
+static inline EGLImageKHR
_eglLinkImage(_EGLImage *img)
{
_eglLinkResource(&img->Resource, _EGL_RESOURCE_IMAGE);
@@ -127,7 +128,7 @@ _eglLinkImage(_EGLImage *img)
* Unlink a linked image from its display.
* Accessing an unlinked image should generate EGL_BAD_PARAMETER error.
*/
-static INLINE void
+static inline void
_eglUnlinkImage(_EGLImage *img)
{
_eglUnlinkResource(&img->Resource, _EGL_RESOURCE_IMAGE);
@@ -138,7 +139,7 @@ _eglUnlinkImage(_EGLImage *img)
* Lookup a handle to find the linked image.
* Return NULL if the handle has no corresponding linked image.
*/
-static INLINE _EGLImage *
+static inline _EGLImage *
_eglLookupImage(EGLImageKHR image, _EGLDisplay *dpy)
{
_EGLImage *img = (_EGLImage *) image;
@@ -151,7 +152,7 @@ _eglLookupImage(EGLImageKHR image, _EGLDisplay *dpy)
/**
* Return the handle of a linked image, or EGL_NO_IMAGE_KHR.
*/
-static INLINE EGLImageKHR
+static inline EGLImageKHR
_eglGetImageHandle(_EGLImage *img)
{
_EGLResource *res = (_EGLResource *) img;
diff --git a/src/egl/main/eglmutex.h b/src/egl/main/eglmutex.h
index 2ec965c1249..b58f0e3faef 100644
--- a/src/egl/main/eglmutex.h
+++ b/src/egl/main/eglmutex.h
@@ -29,30 +29,32 @@
#ifndef EGLMUTEX_INCLUDED
#define EGLMUTEX_INCLUDED
+#include "c99_compat.h"
+
#include "eglcompiler.h"
#include "c11/threads.h"
typedef mtx_t _EGLMutex;
-static INLINE void _eglInitMutex(_EGLMutex *m)
+static inline void _eglInitMutex(_EGLMutex *m)
{
mtx_init(m, mtx_plain);
}
-static INLINE void
+static inline void
_eglDestroyMutex(_EGLMutex *m)
{
mtx_destroy(m);
}
-static INLINE void
+static inline void
_eglLockMutex(_EGLMutex *m)
{
mtx_lock(m);
}
-static INLINE void
+static inline void
_eglUnlockMutex(_EGLMutex *m)
{
mtx_unlock(m);
diff --git a/src/egl/main/eglscreen.h b/src/egl/main/eglscreen.h
index 1cede449a04..542f2de886f 100644
--- a/src/egl/main/eglscreen.h
+++ b/src/egl/main/eglscreen.h
@@ -31,6 +31,7 @@
#ifndef EGLSCREEN_INCLUDED
#define EGLSCREEN_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
@@ -82,7 +83,7 @@ _eglLookupScreen(EGLScreenMESA screen, _EGLDisplay *dpy);
/**
* Return the handle of a linked screen.
*/
-static INLINE EGLScreenMESA
+static inline EGLScreenMESA
_eglGetScreenHandle(_EGLScreen *screen)
{
return (screen) ? screen->Handle : (EGLScreenMESA) 0;
diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h
index d13d301f643..898f3a4f929 100644
--- a/src/egl/main/eglsurface.h
+++ b/src/egl/main/eglsurface.h
@@ -31,6 +31,7 @@
#ifndef EGLSURFACE_INCLUDED
#define EGLSURFACE_INCLUDED
+#include "c99_compat.h"
#include "egltypedefs.h"
#include "egldisplay.h"
@@ -105,7 +106,7 @@ _eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint in
/**
* Increment reference count for the surface.
*/
-static INLINE _EGLSurface *
+static inline _EGLSurface *
_eglGetSurface(_EGLSurface *surf)
{
if (surf)
@@ -117,7 +118,7 @@ _eglGetSurface(_EGLSurface *surf)
/**
* Decrement reference count for the surface.
*/
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglPutSurface(_EGLSurface *surf)
{
return (surf) ? _eglPutResource(&surf->Resource) : EGL_FALSE;
@@ -128,7 +129,7 @@ _eglPutSurface(_EGLSurface *surf)
* Link a surface to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
-static INLINE EGLSurface
+static inline EGLSurface
_eglLinkSurface(_EGLSurface *surf)
{
_eglLinkResource(&surf->Resource, _EGL_RESOURCE_SURFACE);
@@ -140,7 +141,7 @@ _eglLinkSurface(_EGLSurface *surf)
* Unlink a linked surface from its display.
* Accessing an unlinked surface should generate EGL_BAD_SURFACE error.
*/
-static INLINE void
+static inline void
_eglUnlinkSurface(_EGLSurface *surf)
{
_eglUnlinkResource(&surf->Resource, _EGL_RESOURCE_SURFACE);
@@ -151,7 +152,7 @@ _eglUnlinkSurface(_EGLSurface *surf)
* Lookup a handle to find the linked surface.
* Return NULL if the handle has no corresponding linked surface.
*/
-static INLINE _EGLSurface *
+static inline _EGLSurface *
_eglLookupSurface(EGLSurface surface, _EGLDisplay *dpy)
{
_EGLSurface *surf = (_EGLSurface *) surface;
@@ -164,7 +165,7 @@ _eglLookupSurface(EGLSurface surface, _EGLDisplay *dpy)
/**
* Return the handle of a linked surface, or EGL_NO_SURFACE.
*/
-static INLINE EGLSurface
+static inline EGLSurface
_eglGetSurfaceHandle(_EGLSurface *surf)
{
_EGLResource *res = (_EGLResource *) surf;
diff --git a/src/egl/main/eglsync.h b/src/egl/main/eglsync.h
index 9708d095cfd..cd2d78326f9 100644
--- a/src/egl/main/eglsync.h
+++ b/src/egl/main/eglsync.h
@@ -30,6 +30,8 @@
#define EGLSYNC_INCLUDED
+#include "c99_compat.h"
+
#include "egltypedefs.h"
#include "egldisplay.h"
@@ -61,7 +63,7 @@ _eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync,
/**
* Increment reference count for the sync.
*/
-static INLINE _EGLSync *
+static inline _EGLSync *
_eglGetSync(_EGLSync *sync)
{
if (sync)
@@ -73,7 +75,7 @@ _eglGetSync(_EGLSync *sync)
/**
* Decrement reference count for the sync.
*/
-static INLINE EGLBoolean
+static inline EGLBoolean
_eglPutSync(_EGLSync *sync)
{
return (sync) ? _eglPutResource(&sync->Resource) : EGL_FALSE;
@@ -84,7 +86,7 @@ _eglPutSync(_EGLSync *sync)
* Link a sync to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
-static INLINE EGLSyncKHR
+static inline EGLSyncKHR
_eglLinkSync(_EGLSync *sync)
{
_eglLinkResource(&sync->Resource, _EGL_RESOURCE_SYNC);
@@ -95,7 +97,7 @@ _eglLinkSync(_EGLSync *sync)
/**
* Unlink a linked sync from its display.
*/
-static INLINE void
+static inline void
_eglUnlinkSync(_EGLSync *sync)
{
_eglUnlinkResource(&sync->Resource, _EGL_RESOURCE_SYNC);
@@ -106,7 +108,7 @@ _eglUnlinkSync(_EGLSync *sync)
* Lookup a handle to find the linked sync.
* Return NULL if the handle has no corresponding linked sync.
*/
-static INLINE _EGLSync *
+static inline _EGLSync *
_eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy)
{
_EGLSync *sync = (_EGLSync *) handle;
@@ -119,7 +121,7 @@ _eglLookupSync(EGLSyncKHR handle, _EGLDisplay *dpy)
/**
* Return the handle of a linked sync, or EGL_NO_SYNC_KHR.
*/
-static INLINE EGLSyncKHR
+static inline EGLSyncKHR
_eglGetSyncHandle(_EGLSync *sync)
{
_EGLResource *res = (_EGLResource *) sync;