aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2014-04-24 23:04:24 +0200
committerTharre <tharre3@gmail.com>2014-04-25 02:31:00 +0200
commit0f42b87326dfcbc0ffb856d6544f4824d4f4e636 (patch)
treebbec724a5126aaba6854ccc2876bf6dfee0453e9
parent331ae2118eff51df1c182dc84a0069965db8a405 (diff)
downloadredo-0f42b87326dfcbc0ffb856d6544f4824d4f4e636.tar.gz
redo-0f42b87326dfcbc0ffb856d6544f4824d4f4e636.tar.xz
redo-0f42b87326dfcbc0ffb856d6544f4824d4f4e636.zip
Convert __FILENAME__ to _FILENAME so it follows standard conventions
-rw-r--r--src/build.c2
-rw-r--r--src/dbg.h8
-rw-r--r--src/util.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/build.c b/src/build.c
index dc67b0f..ce02f1b 100644
--- a/src/build.c
+++ b/src/build.c
@@ -11,7 +11,7 @@
#include "build.h"
#include "util.h"
-#define __FILENAME__ "build.c"
+#define _FILENAME "build.c"
#include "dbg.h"
/* TODO: more useful return codes? */
diff --git a/src/dbg.h b/src/dbg.h
index 41bebb9..5573f8e 100644
--- a/src/dbg.h
+++ b/src/dbg.h
@@ -6,9 +6,9 @@
#include <string.h>
#include <errno.h>
-// #define __BFILE__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
-#ifndef __FILENAME__
-#define __FILENAME__ __FILE__
+
+#ifndef _FILENAME
+#define _FILENAME __FILE__
#endif
/* helper functions which help in replacing the GNU extension ##__VA_ARGS__ */
@@ -24,7 +24,7 @@
#define debug(...) log_err(__VA_ARGS__)
#endif
-#define log_err(...) LOG_HELPER(__FILENAME__, __LINE__, __VA_ARGS__)
+#define log_err(...) LOG_HELPER(_FILENAME, __LINE__, __VA_ARGS__)
#define fatal(...) \
{FATAL_HELPER(__VA_ARGS__, strerror(errno)); exit(EXIT_FAILURE);}
#define fatal_(f,l,...) \
diff --git a/src/util.c b/src/util.c
index a0e05f5..c4897ac 100644
--- a/src/util.c
+++ b/src/util.c
@@ -5,7 +5,7 @@
#include <assert.h>
#include "util.h"
-#define __FILENAME__ "util.c"
+#define _FILENAME "util.c"
#include "dbg.h"
#include "../config.h"