mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 15:02:56 +02:00
zapit/debug: remove filename hack with a more elegant one
This commit is contained in:
committed by
svenhoefer
parent
79d800f955
commit
54e1d3eecb
@@ -225,6 +225,12 @@ HWLIB_CFLAGS='-I$(top_srcdir)/lib/libcoolstream2 -I$(top_srcdir)/src/zapit/inclu
|
||||
fi
|
||||
fi
|
||||
|
||||
# hack to define a short filename also for out-of-tree build
|
||||
if test `dirname $0` = `pwd`; then
|
||||
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__=__FILE__'
|
||||
else
|
||||
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__="\"$(subst $(srcdir)/,,$(abspath $<))\""'
|
||||
fi
|
||||
#
|
||||
# Check for libtdservicedb - the new one - for testing only
|
||||
#
|
||||
|
@@ -2,6 +2,7 @@
|
||||
* $Id: debug.h,v 1.7 2003/04/30 04:39:03 obi Exp $
|
||||
*
|
||||
* (C) 2002-2003 Andreas Oberritter <obi@tuxbox.org>
|
||||
* (C) 2011,2013,2016 Stefan Seyfried
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -48,14 +49,14 @@ extern int zapit_debug;
|
||||
do { \
|
||||
if (zapit_debug) \
|
||||
fprintf(stdout, "[%s:%s:%d] " fmt, \
|
||||
__FILE__, __FUNCTION__, \
|
||||
__file__, __func__, \
|
||||
__LINE__ , ## args); \
|
||||
} while (0)
|
||||
|
||||
#define ERROR(str) \
|
||||
do { \
|
||||
fprintf(stderr, "[%s:%s:%d] %s: %s\n", \
|
||||
__FILE__, __FUNCTION__, \
|
||||
__file__, __func__, \
|
||||
__LINE__, str, strerror(errno)); \
|
||||
} while (0)
|
||||
|
||||
@@ -64,14 +65,14 @@ extern int zapit_debug;
|
||||
#define INFO(fmt, args...) \
|
||||
do { \
|
||||
fprintf(stdout, "[%s:%s:%d] " fmt "\n", \
|
||||
__FILE__, __FUNCTION__, \
|
||||
__file__, __func__, \
|
||||
__LINE__ , ## args); \
|
||||
} while (0)
|
||||
|
||||
#define WARN(fmt, args...) \
|
||||
do { \
|
||||
fprintf(stderr, "[%s:%s:%d] " fmt "\n", \
|
||||
__FILE__, __FUNCTION__, \
|
||||
__file__, __func__, \
|
||||
__LINE__ , ## args); \
|
||||
} while (0)
|
||||
|
||||
|
Reference in New Issue
Block a user