__func__ is the ISO C99 way of getting the current function name.

Signed-off-by: Jesse Adkins <[email protected]>
---
 exa/exa_priv.h                 |    2 +-
 hw/xfree86/common/xf86Xinput.h |    2 +-
 hw/xquartz/X11Application.m    |    2 +-
 hw/xquartz/darwin.h            |    2 +-
 hw/xquartz/darwinEvents.c      |    4 ++--
 hw/xquartz/threadSafety.h      |    2 +-
 hw/xwin/winshadgdi.c           |    6 +++---
 miext/damage/damage.c          |    4 ++--
 8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/exa/exa_priv.h b/exa/exa_priv.h
index 58d04b0..bf05dd4 100644
--- a/exa/exa_priv.h
+++ b/exa/exa_priv.h
@@ -63,7 +63,7 @@
 #if DEBUG_TRACE_FALL
 #define EXA_FALLBACK(x)                                        \
 do {                                                           \
-       ErrorF("EXA fallback at %s: ", __FUNCTION__);           \
+       ErrorF("EXA fallback at %s: ", __func__);               \
        ErrorF x;                                               \
 } while (0)
 
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 20a3f1b..0c99179 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -84,7 +84,7 @@
 #define XI_VERIFY_VALUATORS(num_valuators)                                     
\
        if (num_valuators > MAX_VALUATORS) {                                    
\
                xf86Msg(X_ERROR, "%s: num_valuator %d is greater than"          
\
-                       " MAX_VALUATORS\n", __FUNCTION__, num_valuators);       
\
+                       " MAX_VALUATORS\n", __func__, num_valuators);   \
                return;                                                         
\
        }
 
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 805ed99..b8c942c 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -138,7 +138,7 @@ static void message_kit_thread (SEL selector, NSObject 
*arg) {
     r = mach_msg (&msg.hdr, MACH_SEND_MSG, msg.hdr.msgh_size,
                  0, MACH_PORT_NULL, 0, MACH_PORT_NULL);
     if (r != KERN_SUCCESS)
-               ErrorF("%s: mach_msg failed: %x\n", __FUNCTION__, r);
+               ErrorF("%s: mach_msg failed: %x\n", __func__, r);
 }
 
 - (void) handleMachMessage:(void *)_msg {
diff --git a/hw/xquartz/darwin.h b/hw/xquartz/darwin.h
index 350eade..4b257f3 100644
--- a/hw/xquartz/darwin.h
+++ b/hw/xquartz/darwin.h
@@ -82,7 +82,7 @@ extern int              darwinMainScreenY;
 #ifdef ENABLE_DEBUG_LOG
 extern FILE *debug_log_fp;
 #define DEBUG_LOG_NAME "x11-debug.txt"
-#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, 
"%s:%s:%s:%d " msg, threadSafetyID(pthread_self()), __FILE__, __FUNCTION__, 
__LINE__, ##args ); fflush(debug_log_fp);
+#define DEBUG_LOG(msg, args...) if (debug_log_fp) fprintf(debug_log_fp, 
"%s:%s:%s:%d " msg, threadSafetyID(pthread_self()), __FILE__, __func__, 
__LINE__, ##args ); fflush(debug_log_fp);
 #else
 #define DEBUG_LOG(msg, args...) 
 #endif
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 147b32a..fd1f325 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -109,7 +109,7 @@ void darwinEvents_lock(void) {
     int err;
     if((err = pthread_mutex_lock(&mieq_lock))) {
         ErrorF("%s:%s:%d: Failed to lock mieq_lock: %d\n",
-               __FILE__, __FUNCTION__, __LINE__, err);
+               __FILE__, __func__, __LINE__, err);
         spewCallStack();
     }
     if(darwinEvents == NULL) {
@@ -122,7 +122,7 @@ void darwinEvents_unlock(void) {
     int err;
     if((err = pthread_mutex_unlock(&mieq_lock))) {
         ErrorF("%s:%s:%d: Failed to unlock mieq_lock: %d\n",
-               __FILE__, __FUNCTION__, __LINE__, err);
+               __FILE__, __func__, __LINE__, err);
         spewCallStack();
     }
 }
diff --git a/hw/xquartz/threadSafety.h b/hw/xquartz/threadSafety.h
index 7b00910..6b2d787 100644
--- a/hw/xquartz/threadSafety.h
+++ b/hw/xquartz/threadSafety.h
@@ -43,7 +43,7 @@ void _threadSafetyAssert(pthread_t tid, const char *file, 
const char *fun, int l
 /* Get a string that identifies our thread nicely */
 const char *threadSafetyID(pthread_t tid);
 
-#define threadSafetyAssert(tid) _threadSafetyAssert(tid, __FILE__, 
__FUNCTION__, __LINE__)
+#define threadSafetyAssert(tid) _threadSafetyAssert(tid, __FILE__, __func__, 
__LINE__)
 
 #ifdef DEBUG_THREADS
 #define TA_APPKIT() threadSafetyAssert(APPKIT_THREAD_ID)
diff --git a/hw/xwin/winshadgdi.c b/hw/xwin/winshadgdi.c
index 96d149c..d473298 100644
--- a/hw/xwin/winshadgdi.c
+++ b/hw/xwin/winshadgdi.c
@@ -229,11 +229,11 @@ winQueryRGBBitsAndMasks (ScreenPtr pScreen)
       pdw = (DWORD*) ((CARD8*)pbmih + sizeof (BITMAPINFOHEADER));
       
 #if CYGDEBUG
-      winDebug ("%s - Masks: %08x %08x %08x\n", __FUNCTION__,
+      winDebug ("%s - Masks: %08x %08x %08x\n", __func__,
              pdw[0], pdw[1], pdw[2]);
-      winDebug ("%s - Bitmap: %dx%d %d bpp %d planes\n", __FUNCTION__,
+      winDebug ("%s - Bitmap: %dx%d %d bpp %d planes\n", __func__,
               pbmih->biWidth, pbmih->biHeight, pbmih->biBitCount, 
pbmih->biPlanes);
-      winDebug ("%s - Compression: %d %s\n", __FUNCTION__,
+      winDebug ("%s - Compression: %d %s\n", __func__,
               pbmih->biCompression,
               (pbmih->biCompression == BI_RGB?"(BI_RGB)":
                (pbmih->biCompression == BI_RLE8?"(BI_RLE8)":
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 1cf0513..ddb89e8 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -213,7 +213,7 @@ damageReportDamagePostRendering (DamagePtr pDamage, 
RegionPtr pOldDamage, Region
 #if DAMAGE_DEBUG_ENABLE
 static void
 _damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, int 
subWindowMode, const char *where)
-#define damageRegionAppend(d,r,c,m) _damageRegionAppend(d,r,c,m,__FUNCTION__)
+#define damageRegionAppend(d,r,c,m) _damageRegionAppend(d,r,c,m,__func__)
 #else
 static void
 damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip,
@@ -408,7 +408,7 @@ damageRegionProcessPending (DrawablePtr pDrawable)
 }
 
 #if DAMAGE_DEBUG_ENABLE
-#define damageDamageBox(d,b,m) _damageDamageBox(d,b,m,__FUNCTION__)
+#define damageDamageBox(d,b,m) _damageDamageBox(d,b,m,__func__)
 static void
 _damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode, const 
char *where)
 #else
-- 
1.7.0.4

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to