瀏覽代碼

core: no function name in logs for gcc 2.95

For old gccs check if __FUNCTION__ is defined before enabling
logging of the function name. This fixes compilation with gcc
2.95.
Andrei Pelinescu-Onciul 15 年之前
父節點
當前提交
61c88f85d3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dprint.h

+ 1 - 1
dprint.h

@@ -48,7 +48,7 @@
 
 /* C >= 99 has __func__, older gcc versions have __FUNCTION__ */
 #if __STDC_VERSION__ < 199901L
-#	if __GNUC__ >= 2
+#	if __GNUC__ >= 2 && defined __FUNCTION__
 #		define _FUNC_NAME_ __FUNCTION__
 #	else
 #		define _FUNC_NAME_ ""