Mesa (master): egl/main: replace __FUNCTION__ with __func__

Emil Velikov evelikov at kemper.freedesktop.org
Thu Mar 5 14:51:51 UTC 2015


Module: Mesa
Branch: master
Commit: d780012cd75c24394b043b107d17eb8199ae2dc7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d780012cd75c24394b043b107d17eb8199ae2dc7

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Sat Feb 28 16:39:10 2015 +0000

egl/main: replace __FUNCTION__ with __func__

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 at gmail.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Reviewed-by: Brian Paul <brianp at vmware.com>

---

 src/egl/main/eglapi.c      |    6 +++---
 src/egl/main/eglcompiler.h |    8 --------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index cc74b1a..2258830 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -113,7 +113,7 @@
          _eglUnlockDisplay(disp);               \
       /* EGL error codes are non-zero */        \
       if (err)                                  \
-         _eglError(err, __FUNCTION__);          \
+         _eglError(err, __func__);              \
       return ret;                               \
    } while (0)
 
@@ -131,14 +131,14 @@
 
 #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)
diff --git a/src/egl/main/eglcompiler.h b/src/egl/main/eglcompiler.h
index 2e1c8b9..f5fb869 100644
--- a/src/egl/main/eglcompiler.h
+++ b/src/egl/main/eglcompiler.h
@@ -31,9 +31,6 @@
 #define EGLCOMPILER_INCLUDED
 
 
-#include "c99_compat.h" /* __func__, etc. */
-
-
 /**
  * Get standard integer types
  */
@@ -79,11 +76,6 @@
 #  endif
 #endif
 
-/* XXX: Use standard `__func__` instead */
-#ifndef __FUNCTION__
-#  define __FUNCTION__ __func__
-#endif
-
 #define STATIC_ASSERT(COND) \
    do { \
       (void) sizeof(char [1 - 2*!(COND)]); \




More information about the mesa-commit mailing list