]> granicus.if.org Git - sudo/commitdiff
Fix gcc 2.x variant macro support.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Jun 2012 18:03:11 +0000 (14:03 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Jun 2012 18:03:11 +0000 (14:03 -0400)
include/error.h
include/sudo_debug.h

index f587b89a5b1a6fc41836912ef3e735344d747430..6b5836ba57fe429858585d8ba47530420943c7a5 100644 (file)
  */
 #if defined(SUDO_ERROR_WRAP) && SUDO_ERROR_WRAP == 0
 # if defined(__GNUC__) && __GNUC__ == 2
-#  define error(rval, fmt...) error2((rval), (fmt))
-#  define errorx(rval, fmt...) errorx2((rval), (fmt))
-#  define warning(fmt...) warning2((fmt))
-#  define warningx(fmt...) warningx2((fmt))
+#  define error(rval, fmt...) error2((rval), fmt)
+#  define errorx(rval, fmt...) errorx2((rval), fmt)
+#  define warning(fmt...) warning2(fmt)
+#  define warningx(fmt...) warningx2(fmt)
 # else
 #  define error(rval, ...) error2((rval), __VA_ARGS__)
 #  define errorx(rval, ...) errorx2((rval), __VA_ARGS__)
 #  define error(rval, fmt...) do {                                            \
     sudo_debug_printf2(__func__, __FILE__, __LINE__,                          \
        SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO|SUDO_DEBUG_ERRNO|sudo_debug_subsys, \
-       (fmt));                                                                \
-    error2((rval), (fmt));                                                    \
+       fmt);                                                                  \
+    error2((rval), fmt);                                                      \
 } while (0)
 #  define errorx(rval, fmt...) do {                                           \
     sudo_debug_printf2(__func__, __FILE__, __LINE__,                          \
-       SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO|sudo_debug_subsys, (fmt));          \
-    errorx2((rval), (fmt));                                                   \
+       SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO|sudo_debug_subsys, fmt);            \
+    errorx2((rval), fmt);                                                     \
 } while (0)
 #  define warning(fmt...) do {                                                \
     sudo_debug_printf2(__func__, __FILE__, __LINE__,                          \
        SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO|SUDO_DEBUG_ERRNO|sudo_debug_subsys, \
-       (fmt));                                                                \
-    warning2((fmt));                                                          \
+       fmt);                                                                  \
+    warning2(fmt);                                                            \
 } while (0)
 #  define warningx(fmt...) do {                                                       \
     sudo_debug_printf2(__func__, __FILE__, __LINE__,                          \
-       SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO|sudo_debug_subsys, (fmt));          \
-    warningx2((fmt));                                                         \
+       SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO|sudo_debug_subsys, fmt);            \
+    warningx2(fmt);                                                           \
 } while (0)
 # else
 #  define error(rval, ...) do {                                                       \
index b7b458d12238de4baaeb5028a84ffc57570b012c..0031c151126751c2be2956e76f5e9064020d5ca3 100644 (file)
 #if defined(__GNUC__) && __GNUC__ == 2
 # define sudo_debug_printf(pri, fmt...) \
     sudo_debug_printf2(__func__, __FILE__, __LINE__, (pri)|sudo_debug_subsys, \
-    (fmt))
+    fmt)
 #else
 # define sudo_debug_printf(pri, ...) \
     sudo_debug_printf2(__func__, __FILE__, __LINE__, (pri)|sudo_debug_subsys, \