summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2004-12-22 18:12:52 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2004-12-22 18:12:52 +0000
commiteff32adaa44d1206c0da3637e6533b1da6a90c25 (patch)
tree2fbf993e448f0a816fa051f0e556af31da6a0fe1
parent3aabc5fb13cbdd14a839c6cdd838e9f0834ee5be (diff)
downloadlibgtop-gnome-2-8.tar.gz
Fixed C99 macros. Closes #161994. Patch by Vincent Bergergnome-2-8
* include/glibtop/error.h: * sysdeps/common/error.c: Fixed C99 macros. Closes #161994. Patch by Vincent Berger <vincent.berger@ext.bull.net>.
-rw-r--r--ChangeLog6
-rw-r--r--include/glibtop/error.h8
-rw-r--r--sysdeps/common/error.c4
3 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index f9309085..7a4d05fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-22 Benoît Dejean <tazforever@dlfp.org>
+
+ * include/glibtop/error.h:
+ * sysdeps/common/error.c: Fixed C99 macros. Closes #161994.
+ Patch by Vincent Berger <vincent.berger@ext.bull.net>.
+
2004-12-04 Benoît Dejean <tazforever@dlfp.org>
* NEWS:
diff --git a/include/glibtop/error.h b/include/glibtop/error.h
index b4a57a36..f15d96c3 100644
--- a/include/glibtop/error.h
+++ b/include/glibtop/error.h
@@ -50,11 +50,11 @@ void G_GNUC_UNUSED glibtop_warn_io_r (glibtop *server, char *format, ...);
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
-#define glibtop_error(p1, ...) glibtop_error_r(glibtop_global_server , p1 , __VA_ARGS__)
-#define glibtop_warn(p1, ...) glibtop_warn_r(glibtop_global_server , p1 , __VA_ARGS__)
+#define glibtop_error(...) glibtop_error_r(glibtop_global_server , __VA_ARGS__)
+#define glibtop_warn(...) glibtop_warn_r(glibtop_global_server , __VA_ARGS__)
-#define glibtop_error_io(p1, ...) glibtop_error_io_r(glibtop_global_server , p1 , __VA_ARGS__)
-#define glibtop_warn_io(p1, ...) glibtop_warn_io_r(glibtop_global_server , p1 , __VA_ARGS__)
+#define glibtop_error_io(...) glibtop_error_io_r(glibtop_global_server , __VA_ARGS__)
+#define glibtop_warn_io(...) glibtop_warn_io_r(glibtop_global_server , __VA_ARGS__)
#else /* no __GNUC__, no C99*/
diff --git a/sysdeps/common/error.c b/sysdeps/common/error.c
index 65640ce7..527c6ab4 100644
--- a/sysdeps/common/error.c
+++ b/sysdeps/common/error.c
@@ -129,7 +129,7 @@ glibtop_warn_io_r (glibtop *server, char *format, ...)
va_end (args);
}
-#ifndef __GNUC__
+#if !defined(__GNUC__) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L)
void
glibtop_error (char *format, ...)
@@ -167,4 +167,4 @@ glibtop_warn_io (char *format, ...)
va_end (args);
}
-#endif /* __GNUC__ */
+#endif /* !defined(__GNUC__) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) */