[evolution-kolab/gnome-2-30] libekolabconv: moved anonymous variadic macros to separate include file
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab/gnome-2-30] libekolabconv: moved anonymous variadic macros to separate include file
- Date: Wed, 16 Nov 2011 19:18:57 +0000 (UTC)
commit 319f5da24dd17f5ee4dfba5b9c195ed43bda14a9
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Wed Nov 16 15:31:54 2011 +0100
libekolabconv: moved anonymous variadic macros to separate include file
* ISO C90 (ANSI) does not specify anonymous variadic macros, so moving
the macros from libekolabconv logging header to separate header
* suppress the warnings about these macros for now (by declaring the
new header a system header)
* needs proper fixup
src/libekolabconv/main/Makefile.am | 3 +-
.../main/src/logging-anon-variadic-macros.h | 50 ++++++++++++++++++++
src/libekolabconv/main/src/logging.h | 7 +--
3 files changed, 53 insertions(+), 7 deletions(-)
---
diff --git a/src/libekolabconv/main/Makefile.am b/src/libekolabconv/main/Makefile.am
index 15a2eb0..61a16c8 100644
--- a/src/libekolabconv/main/Makefile.am
+++ b/src/libekolabconv/main/Makefile.am
@@ -29,7 +29,8 @@ AM_CPPFLAGS = \
noinst_HEADERS = \
src/kolab-conv.h \
src/logging.h \
- src/util.h
+ src/logging-anon-variadic-macros.h \
+ src/util.h
noinstdir = \
$(pkgincludedir)
diff --git a/src/libekolabconv/main/src/logging-anon-variadic-macros.h b/src/libekolabconv/main/src/logging-anon-variadic-macros.h
new file mode 100644
index 0000000..d944a07
--- /dev/null
+++ b/src/libekolabconv/main/src/logging-anon-variadic-macros.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ * logging-anon-variadic-macros.h
+ *
+ * Wed Nov 16 15:07:47 2011
+ * Copyright 2011 Christian Hilberg
+ * <hilberg kernelconcepts de>
+ ****************************************************************************/
+
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor Boston, MA 02110-1301, USA
+ */
+
+/* ISO C90 (ANSI) does not specify anonymous variadic macros.
+ * Until we find a better solution, we keep them as a system header
+ * to get rid of the warning messages we can't do anything about
+ * presently (other than switching to C99, which we do not want (yet)).
+ */
+
+/*----------------------------------------------------------------------------*/
+
+#ifndef LOGGING_ANON_VARIADIC_MACROS_H_
+#define LOGGING_ANON_VARIADIC_MACROS_H_
+
+/*----------------------------------------------------------------------------*/
+
+#pragma GCC system_header
+
+#define log_debug(...) do {} while(0)
+#define log_warn(...) do {} while(0)
+#define log_evolution_ical(...) do {} while(0)
+#define log_evolution_vcard(...) do {} while(0)
+#define log_kolab_mail(...) do {} while(0)
+
+/*----------------------------------------------------------------------------*/
+
+#endif
+
+/*----------------------------------------------------------------------------*/
diff --git a/src/libekolabconv/main/src/logging.h b/src/libekolabconv/main/src/logging.h
index f437b19..ca6dbe8 100644
--- a/src/libekolabconv/main/src/logging.h
+++ b/src/libekolabconv/main/src/logging.h
@@ -48,12 +48,7 @@ void log_kolab_mail (const gchar *message, const Kolab_conv_mail *kmail);
/* discard all logging messages in the main library */
-#define log_debug(...) do {} while(0)
-#define log_warn(...) do {} while(0)
-#define log_evolution_ical(...) do {} while(0)
-#define log_evolution_vcard(...) do {} while(0)
-#define log_kolab_mail(...) do {} while(0)
-
+#include "logging-anon-variadic-macros.h"
#endif /* KOLABCONV_DEBUG */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]