Skip to content

Commit fcbb2ba

Browse files
clhinmetux
authored andcommitted
treewide: replace __FUNCTION__ by __func__
prefer C99 standard over non-standard legacy symbols Signed-off-by: Chase <[email protected]> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
1 parent 434331e commit fcbb2ba

File tree

16 files changed

+31
-35
lines changed

16 files changed

+31
-35
lines changed

exa/exa_priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#if DEBUG_TRACE_FALL
6060
#define EXA_FALLBACK(x) \
6161
do { \
62-
ErrorF("EXA fallback at %s: ", __FUNCTION__); \
62+
ErrorF("EXA fallback at %s: ", __func__); \
6363
ErrorF x; \
6464
} while (0)
6565

glamor/glamor_compositerects.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ _pixman_region_init_clipped_rectangles(pixman_region16_t * region,
9292
free(boxes);
9393

9494
DEBUGF("%s: nrects=%d, region=(%d, %d), (%d, %d) x %d\n",
95-
__FUNCTION__, num_rects,
95+
__func__, num_rects,
9696
region->extents.x1, region->extents.y1,
9797
region->extents.x2, region->extents.y2, j);
9898
return ret;
@@ -113,7 +113,7 @@ glamor_composite_rectangles(CARD8 op,
113113
Bool need_free_region = FALSE;
114114

115115
DEBUGF("%s(op=%d, %08x x %d [(%d, %d)x(%d, %d) ...])\n",
116-
__FUNCTION__, op,
116+
__func__, op,
117117
(color->alpha >> 8 << 24) |
118118
(color->red >> 8 << 16) |
119119
(color->green >> 8 << 8) |
@@ -124,7 +124,7 @@ glamor_composite_rectangles(CARD8 op,
124124
return;
125125

126126
if (RegionNil(dst->pCompositeClip)) {
127-
DEBUGF("%s: empty clip, skipping\n", __FUNCTION__);
127+
DEBUGF("%s: empty clip, skipping\n", __func__);
128128
return;
129129
}
130130

@@ -180,15 +180,15 @@ glamor_composite_rectangles(CARD8 op,
180180
break;
181181
}
182182
}
183-
DEBUGF("%s: converted to op %d\n", __FUNCTION__, op);
183+
DEBUGF("%s: converted to op %d\n", __func__, op);
184184

185185
if (!_pixman_region_init_clipped_rectangles(&region,
186186
num_rects, rects,
187187
dst->pDrawable->x,
188188
dst->pDrawable->y,
189189
&dst->pCompositeClip->extents))
190190
{
191-
DEBUGF("%s: allocation failed for region\n", __FUNCTION__);
191+
DEBUGF("%s: allocation failed for region\n", __func__);
192192
return;
193193
}
194194

@@ -198,14 +198,14 @@ glamor_composite_rectangles(CARD8 op,
198198
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv))
199199
goto fallback;
200200
if (dst->alphaMap) {
201-
DEBUGF("%s: fallback, dst has an alpha-map\n", __FUNCTION__);
201+
DEBUGF("%s: fallback, dst has an alpha-map\n", __func__);
202202
goto fallback;
203203
}
204204

205205
need_free_region = TRUE;
206206

207207
DEBUGF("%s: drawable extents (%d, %d),(%d, %d) x %d\n",
208-
__FUNCTION__,
208+
__func__,
209209
RegionExtents(&region)->x1, RegionExtents(&region)->y1,
210210
RegionExtents(&region)->x2, RegionExtents(&region)->y2,
211211
RegionNumRects(&region));
@@ -214,13 +214,13 @@ glamor_composite_rectangles(CARD8 op,
214214
(!pixman_region_intersect(&region, &region, dst->pCompositeClip) ||
215215
RegionNil(&region))) {
216216
DEBUGF("%s: zero-intersection between rectangles and clip\n",
217-
__FUNCTION__);
217+
__func__);
218218
pixman_region_fini(&region);
219219
return;
220220
}
221221

222222
DEBUGF("%s: clipped extents (%d, %d),(%d, %d) x %d\n",
223-
__FUNCTION__,
223+
__func__,
224224
RegionExtents(&region)->x1, RegionExtents(&region)->y1,
225225
RegionExtents(&region)->x2, RegionExtents(&region)->y2,
226226
RegionNumRects(&region));
@@ -232,7 +232,7 @@ glamor_composite_rectangles(CARD8 op,
232232
pixman_region_translate(&region, -dst->pDrawable->x, -dst->pDrawable->y);
233233

234234
DEBUGF("%s: drawable extents (%d, %d),(%d, %d)\n",
235-
__FUNCTION__, dst_x, dst_y,
235+
__func__, dst_x, dst_y,
236236
RegionExtents(&region)->x1, RegionExtents(&region)->y1,
237237
RegionExtents(&region)->x2, RegionExtents(&region)->y2);
238238

glamor/glamor_debug.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
do { \
4040
LogMessageVerb(X_NONE, 0, "Glamor Fatal Error" \
4141
" at %32s line %d: " _format_ "\n", \
42-
__FUNCTION__, __LINE__, \
42+
__func__, __LINE__, \
4343
##__VA_ARGS__ ); \
4444
exit(1); \
4545
} while(0)
@@ -48,7 +48,7 @@
4848
LogMessageVerb(X_NONE, 0, \
4949
"%32s:\t" _format_ , \
5050
/*_prefix_,*/ \
51-
__FUNCTION__, \
51+
__func__, \
5252
##__VA_ARGS__)
5353

5454
#define glamor_debug_output(_level_, _format_,...) \

hw/kdrive/ephyr/ephyr_draw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define EPHYR_TRACE_DRAW 0
3535

3636
#if EPHYR_TRACE_DRAW
37-
#define TRACE_DRAW() ErrorF("%s\n", __FUNCTION__);
37+
#define TRACE_DRAW() ErrorF("%s\n", __func__);
3838
#else
3939
#define TRACE_DRAW() do { } while (0)
4040
#endif

hw/xfree86/common/compiler.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@
7272
#define __inline /**/
7373
#endif
7474
#endif /* __inline */
75-
/* Support gcc's __FUNCTION__ for people using other compilers */
76-
#if !defined(__GNUC__) && !defined(__FUNCTION__)
77-
#define __FUNCTION__ __func__ /* C99 */
78-
#endif
7975

8076
#ifdef __GNUC__
8177
#ifdef __i386__

hw/xfree86/common/xf86Xinput.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
#define XI_VERIFY_VALUATORS(num_valuators) \
115115
if (num_valuators > MAX_VALUATORS) { \
116116
LogMessageVerb(X_ERROR, 1, "%s: num_valuator %d is greater than MAX_VALUATORS\n", \
117-
__FUNCTION__, num_valuators); \
117+
__func__, num_valuators); \
118118
return; \
119119
}
120120

hw/xfree86/drivers/video/modesetting/dri2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ ms_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
753753
if (limit) {
754754
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
755755
"%s:%d get vblank counter failed: %s\n",
756-
__FUNCTION__, __LINE__,
756+
__func__, __LINE__,
757757
strerror(errno));
758758
limit--;
759759
}
@@ -791,7 +791,7 @@ ms_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
791791
if (limit) {
792792
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
793793
"%s:%d get vblank counter failed: %s\n",
794-
__FUNCTION__, __LINE__,
794+
__func__, __LINE__,
795795
strerror(errno));
796796
limit--;
797797
}

hw/xquartz/darwin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ xq_asl_log(int level, const char *subsystem, const char *file,
8989

9090
#define ASL_LOG(level, subsystem, msg, args ...) xq_asl_log(level, subsystem, \
9191
__FILE__, \
92-
__FUNCTION__, \
92+
__func__, \
9393
__LINE__, msg, \
9494
## args)
9595
#define DEBUG_LOG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, \

hw/xquartz/darwinEvents.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ DarwinSendTabletEvents(DeviceIntPtr pDev, int ev_type, int ev_button,
454454
screen = miPointerGetScreen(pDev);
455455
if (!screen) {
456456
DEBUG_LOG("%s called before screen was initialized\n",
457-
__FUNCTION__);
457+
__func__);
458458
return;
459459
}
460460

@@ -497,7 +497,7 @@ DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button,
497497
screen = miPointerGetScreen(pDev);
498498
if (!screen) {
499499
DEBUG_LOG("%s called before screen was initialized\n",
500-
__FUNCTION__);
500+
__func__);
501501
return;
502502
}
503503

hw/xquartz/pbproxy/pbproxy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ xq_asl_log(int level, const char *subsystem, const char *file,
8989

9090
#define ASL_LOG(level, subsystem, msg, args ...) xq_asl_log(level, subsystem, \
9191
__FILE__, \
92-
__FUNCTION__, \
92+
__func__, \
9393
__LINE__, msg, \
9494
## args)
9595
#define DebugF(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, \

0 commit comments

Comments
 (0)