#include "libdrm_macros.h"
#include "libdrm_lists.h"
-/* Support gcc's __FUNCTION__ for people using other compilers */
-#if !defined(__GNUC__) && !defined(__FUNCTION__)
-# define __FUNCTION__ __func__ /* C99 */
-#endif
-
#define DBG(...) do { \
if (bufmgr_fake->bufmgr.debug) \
drmMsg(__VA_ARGS__); \
ret = drmCommandWriteRead(bufmgr_fake->fd, DRM_I915_IRQ_EMIT,
&ie, sizeof(ie));
if (ret) {
- drmMsg("%s: drm_i915_irq_emit: %d\n", __FUNCTION__, ret);
+ drmMsg("%s: drm_i915_irq_emit: %d\n", __func__, ret);
abort();
}
{
struct block *block, *tmp;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
DRMLISTFOREACHSAFE(block, tmp, &bufmgr_fake->lru) {
drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *) block->bo;
{
struct block *block, *tmp;
- DBG("%s\n", __FUNCTION__);
+ DBG("%s\n", __func__);
DRMLISTFOREACHSAFEREVERSE(block, tmp, &bufmgr_fake->lru) {
drm_intel_bo_fake *bo_fake = (drm_intel_bo_fake *) block->bo;
}
}
- DBG("%s: %d\n", __FUNCTION__, ret);
+ DBG("%s: %d\n", __func__, ret);
return ret;
}
if (alloc_block(bo))
return 1;
- DBG("%s 0x%lx bytes failed\n", __FUNCTION__, bo->size);
+ DBG("%s 0x%lx bytes failed\n", __func__, bo->size);
return 0;
}
bo_fake->name, bo_fake->bo.size / 1024);
if (bo->virtual != NULL) {
- drmMsg("%s: already mapped\n", __FUNCTION__);
+ drmMsg("%s: already mapped\n", __func__);
abort();
} else if (bo_fake->flags & (BM_NO_BACKING_STORE | BM_PINNED)) {
if (!bo_fake->block && !evict_and_alloc_block(bo)) {
- DBG("%s: alloc failed\n", __FUNCTION__);
+ DBG("%s: alloc failed\n", __func__);
bufmgr_fake->fail = 1;
return 1;
} else {
#endif
#include "xf86drm.h"
-/* Support gcc's __FUNCTION__ for people using other compilers */
-#if !defined(__GNUC__) && !defined(__FUNCTION__)
-# define __FUNCTION__ __func__ /* C99 */
-#endif
-
int sigio_fd;
static double usec(struct timeval *end, struct timeval *start)
int fd;
if ((fd = open(device, 0)) < 0) {
- drmError(-errno, __FUNCTION__);
+ drmError(-errno, __func__);
exit(1);
}