Supply __func__ for G_STRLOC when ran on new GCC
authorshort <>
Fri, 31 Jan 2003 19:34:31 +0000 (19:34 +0000)
committershort <>
Fri, 31 Jan 2003 19:34:31 +0000 (19:34 +0000)
 - drawback: No filename/line-number is displayed now on new GCC

configure.in
src/libcaptive/include/captive/Makefile.am
src/libcaptive/include/captive/config2.h [new file with mode: 0644]

index 147181d..fa32a1b 100644 (file)
@@ -62,6 +62,11 @@ AH_TOP([
 
 #include <glib/gtypes.h>       /* for 'gchar' */
 #define G_LOG_DOMAIN ((const gchar *)"Captive")
+
+/* Supplemental definitions not possible in this file. */
+#ifdef LIBCAPTIVE
+#include "captive/config2.h"
+#endif
 ])
 AH_BOTTOM([
 #endif /* !_CAPTIVE_CONFIG_H */
index 87ecf8d..20cfd12 100644 (file)
@@ -1,6 +1,6 @@
 # $Id$
 # automake source for include/captive directory Makefile
-# Copyright (C) 2002 Jan Kratochvil <project-captive@jankratochvil.net>
+# Copyright (C) 2002-2003 Jan Kratochvil <project-captive@jankratochvil.net>
 # 
 # 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
@@ -25,6 +25,7 @@ pkginclude_HEADERS+= \
                client-directory.h \
                client-file.h \
                client-file_info.h \
+               config2.h \
                ldr.h \
                ldr_exports.h \
                macros.h \
diff --git a/src/libcaptive/include/captive/config2.h b/src/libcaptive/include/captive/config2.h
new file mode 100644 (file)
index 0000000..c2d7fed
--- /dev/null
@@ -0,0 +1,35 @@
+/* $Id$
+ * Supplemental include file for config.h of libcaptive
+ * Copyright (C) 2003 Jan Kratochvil <project-captive@jankratochvil.net>
+ * 
+ * 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; exactly version 2 of June 1991 is required
+ * 
+ * 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 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+
+#ifndef _CAPTIVE_CONFIG2_H
+#define _CAPTIVE_CONFIG2_H 1
+
+
+/* We need to redefine it here as any '#undef' in config.h gets commented
+ * out during 'config.h.in' -> 'config.h' pass.
+ */
+#if defined(__GNUC__) && (__GNUC__ >= 3)
+#include <glib/gmacros.h>      /* for 'G_STRLOC' */
+#  undef  G_STRLOC
+/* '__func__' does not string-concatenate! */
+#  define G_STRLOC     __func__
+#endif
+
+
+#endif /* _CAPTIVE_CONFIG2_H */