Explorar o código

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 %!s(int64=15) %!d(string=hai) anos
pai
achega
61c88f85d3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      dprint.h

+ 1 - 1
dprint.h

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