← Back to team overview

kicad-developers team mailing list archive

[PATCH 11/11] Replace GCC-specific __func__ with portable __FUNCTION__

 

This macro is GCC-specific and should be avoided in portable code.
---
 include/common.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/common.h b/include/common.h
index b881444..5eeea09 100644
--- a/include/common.h
+++ b/include/common.h
@@ -98,6 +98,12 @@ enum pseudokeys {
 #endif
 
 
+// MSVC doesn't have __func__
+#ifdef _MSC_VER
+#define __func__ __FUNCTION__
+#endif
+
+
 // Graphic Texts Orientation in 0.1 degree
 #define TEXT_ORIENT_HORIZ 0
 #define TEXT_ORIENT_VERT  900

Follow ups

References