egl/main: replace __FUNCTION__ with __func__
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 28 Feb 2015 16:39:10 +0000 (16:39 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 5 Mar 2015 14:45:53 +0000 (14:45 +0000)
The latter is a C99 standard, and our current wrapper c99_compat.h
should handle non-compliant compilers.
Drop the c99_compat.h inclusion from eglcompiler.h altogether, as it's
no longer required.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/egl/main/eglapi.c
src/egl/main/eglcompiler.h

index cc74b1a7b08e60a43ef86ed704b2a3a19b9f9999..225883006447a35049f8521abc6abe726cccc432 100644 (file)
          _eglUnlockDisplay(disp);               \
       /* EGL error codes are non-zero */        \
       if (err)                                  \
-         _eglError(err, __FUNCTION__);          \
+         _eglError(err, __func__);              \
       return ret;                               \
    } while (0)
 
 
 #define _EGL_CHECK_DISPLAY(disp, ret, drv)         \
    do {                                            \
-      drv = _eglCheckDisplay(disp, __FUNCTION__);  \
+      drv = _eglCheckDisplay(disp, __func__);      \
       if (!drv)                                    \
          RETURN_EGL_ERROR(disp, 0, ret);           \
    } while (0)
 
 #define _EGL_CHECK_OBJECT(disp, type, obj, ret, drv)      \
    do {                                                   \
-      drv = _eglCheck ## type(disp, obj, __FUNCTION__);   \
+      drv = _eglCheck ## type(disp, obj, __func__);       \
       if (!drv)                                           \
          RETURN_EGL_ERROR(disp, 0, ret);                  \
    } while (0)
index 2e1c8b92f7baaff986f18b8174252ddabea0e27f..f5fb86931017629609eefb9621feec19dc99e801 100644 (file)
@@ -31,9 +31,6 @@
 #define EGLCOMPILER_INCLUDED
 
 
-#include "c99_compat.h" /* __func__, etc. */
-
-
 /**
  * Get standard integer types
  */
 #  endif
 #endif
 
-/* XXX: Use standard `__func__` instead */
-#ifndef __FUNCTION__
-#  define __FUNCTION__ __func__
-#endif
-
 #define STATIC_ASSERT(COND) \
    do { \
       (void) sizeof(char [1 - 2*!(COND)]); \