]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
replaced __func__ with simpler __FUNCTION__ macro
authorBVK Chaitanya <bvk.groups@gmail.com>
Fri, 8 Jan 2010 16:36:46 +0000 (22:06 +0530)
committerBVK Chaitanya <bvk.groups@gmail.com>
Fri, 8 Jan 2010 16:36:46 +0000 (22:06 +0530)
include/grub/test.h

index 4b028371b5547c3abde1df172acd7e31af561c60..b4851bbf60ad5fe0dd17f91b4ff686e6cd60c73e 100644 (file)
@@ -35,22 +35,10 @@ void grub_test_nonzero (int cond, const char *file,
                        const char *fmt, ...)
   __attribute__ ((format (printf, 5, 6)));
 
-#ifdef __STDC_VERSION__
-#if __STDC_VERSION__ < 199901L
-# if __GNUC__ >= 2
-#  define __func__ __FUNCTION__
-# else
-#  define __func__ "<unknown>"
-# endif
-#endif
-#else
-#define __func__ "<unknown>"
-#endif
-
 /* Macro to fill in location details and an optional error message.  */
-#define grub_test_assert(cond, ...)                    \
-  grub_test_nonzero(cond, __FILE__, __func__, __LINE__, \
-                   ## __VA_ARGS__,                     \
+#define grub_test_assert(cond, ...)                            \
+  grub_test_nonzero(cond, __FILE__, __FUNCTION__, __LINE__,    \
+                   ## __VA_ARGS__,                             \
                    "assert failed: %s", #cond)
 
 /* Macro to define a unit test.  */