pan2 r342 - in trunk: . pan/data-impl pan/general pan/gui pan/tasks pan/usenet-utils
- From: csk svn gnome org
- To: svn-commits-list gnome org
- Subject: pan2 r342 - in trunk: . pan/data-impl pan/general pan/gui pan/tasks pan/usenet-utils
- Date: Fri, 4 Jul 2008 16:05:27 +0000 (UTC)
Author: csk
Date: Fri Jul 4 16:05:27 2008
New Revision: 342
URL: http://svn.gnome.org/viewvc/pan2?rev=342&view=rev
Log:
#524620 â glib 2.16 g_assert moved to gtestutils, patch for pan
Added:
trunk/pan/general/gassert.h
Modified:
trunk/ChangeLog
trunk/pan/data-impl/data-impl.cc
trunk/pan/data-impl/headers.cc
trunk/pan/data-impl/my-tree.cc
trunk/pan/general/Makefile.am
trunk/pan/general/file-util.h
trunk/pan/general/line-reader.cc
trunk/pan/general/quark.h
trunk/pan/general/string-view.h
trunk/pan/general/utf8-utils.cc
trunk/pan/gui/prefs.cc
trunk/pan/gui/save-ui.h
trunk/pan/gui/score-add-ui.cc
trunk/pan/gui/server-ui.cc
trunk/pan/tasks/socket-impl-gio.cc
trunk/pan/tasks/socket-impl-gio.h
trunk/pan/tasks/socket-impl-scripted.cc
trunk/pan/usenet-utils/gnksa-test.cc
Modified: trunk/pan/data-impl/data-impl.cc
==============================================================================
--- trunk/pan/data-impl/data-impl.cc (original)
+++ trunk/pan/data-impl/data-impl.cc Fri Jul 4 16:05:27 2008
@@ -24,6 +24,7 @@
#include <config.h>
extern "C" {
#include <glib/gi18n.h>
+ #include <glib/gfileutils.h> // for g_build_filename
}
#include <pan/general/debug.h>
#include <pan/general/file-util.h>
Modified: trunk/pan/data-impl/headers.cc
==============================================================================
--- trunk/pan/data-impl/headers.cc (original)
+++ trunk/pan/data-impl/headers.cc Fri Jul 4 16:05:27 2008
@@ -27,7 +27,6 @@
extern "C" {
#include <sys/types.h> // for chmod
#include <sys/stat.h> // for chmod
- #include <glib.h> // for g_assert
#include <glib/gi18n.h>
}
#include <pan/general/debug.h>
Modified: trunk/pan/data-impl/my-tree.cc
==============================================================================
--- trunk/pan/data-impl/my-tree.cc (original)
+++ trunk/pan/data-impl/my-tree.cc Fri Jul 4 16:05:27 2008
@@ -19,9 +19,9 @@
#include <config.h>
#include <cassert>
-#include <glib.h> // for g_assert
#include <pan/general/debug.h>
#include <pan/general/foreach.h>
+#include <pan/general/gassert.h>
#include <pan/general/quark.h>
#include <pan/usenet-utils/filter-info.h>
#include <pan/data/article.h>
Modified: trunk/pan/general/Makefile.am
==============================================================================
--- trunk/pan/general/Makefile.am (original)
+++ trunk/pan/general/Makefile.am Fri Jul 4 16:05:27 2008
@@ -21,6 +21,7 @@
e-util.h \
file-util.h \
foreach.h \
+ gassert.h \
line-reader.h \
locking.h \
log.h \
Modified: trunk/pan/general/file-util.h
==============================================================================
--- trunk/pan/general/file-util.h (original)
+++ trunk/pan/general/file-util.h Fri Jul 4 16:05:27 2008
@@ -26,10 +26,11 @@
#include <stddef.h>
#include <stdio.h>
#include <glib/gtypes.h>
- #include <glib.h>
}
#include <pan/general/string-view.h>
+#include <glibconfig.h> // get the version number
+#include <glib/gutils.h> // get GLIB_CHECK_VERSION
#if GLIB_CHECK_VERSION(2,6,0)
extern "C" {
#include <glib/gstdio.h>
Added: trunk/pan/general/gassert.h
==============================================================================
--- (empty file)
+++ trunk/pan/general/gassert.h Fri Jul 4 16:05:27 2008
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * Pan - A Newsreader for Gtk+
+ * Copyright (C) 2002-2006 Charles Kerr <charles rebelbase com>
+ *
+ * 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; version 2 of the License.
+ *
+ * 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 __Pan_Assert_h__
+#define __Pan_Assert_h__
+
+extern "C"
+{
+ #include <glibconfig.h> // get the version
+ #include <glib/gutils.h> // get GLIB_CHECK_VERSION
+
+ // pick up g_assert()
+ #if GLIB_CHECK_VERSION(2,16,0)
+ #include <glib/gtestutils.h>
+ #else
+ #include <glib/gmessages.h>
+ #endif
+}
+
+#endif
Modified: trunk/pan/general/line-reader.cc
==============================================================================
--- trunk/pan/general/line-reader.cc (original)
+++ trunk/pan/general/line-reader.cc Fri Jul 4 16:05:27 2008
@@ -1,7 +1,7 @@
#include <config.h>
#include <cstdio>
+#include <cstdlib>
extern "C"{
- #include <stdlib.h>
#include <glib/gi18n.h>
}
#include <cerrno>
Modified: trunk/pan/general/quark.h
==============================================================================
--- trunk/pan/general/quark.h (original)
+++ trunk/pan/general/quark.h Fri Jul 4 16:05:27 2008
@@ -26,6 +26,7 @@
#include <set>
#include <string>
#include <climits>
+#include <string>
#include <vector>
#if defined(HAVE_EXT_HASH_SET)
@@ -40,9 +41,6 @@
#endif
#define get16bits(d) (*((const uint16_t *) (d)))
-extern "C"{
- #include <string.h>
-}
namespace pan
{
Modified: trunk/pan/general/string-view.h
==============================================================================
--- trunk/pan/general/string-view.h (original)
+++ trunk/pan/general/string-view.h Fri Jul 4 16:05:27 2008
@@ -22,11 +22,7 @@
#include <iosfwd>
#include <string>
-
-extern "C"
-{
- #include <string.h>
-}
+#include <cstring>
namespace pan
{
Modified: trunk/pan/general/utf8-utils.cc
==============================================================================
--- trunk/pan/general/utf8-utils.cc (original)
+++ trunk/pan/general/utf8-utils.cc Fri Jul 4 16:05:27 2008
@@ -21,12 +21,12 @@
#include <string>
#include <vector>
#include <string.h>
-#include <glib.h>
extern "C" {
#include <glib/gi18n.h>
}
#include <locale.h>
#include <gmime/gmime.h>
+#include <pan/general/gassert.h>
#include <pan/general/debug.h>
#include <pan/general/foreach.h>
#include <pan/general/log.h>
@@ -91,7 +91,7 @@
return 0;
for (i = 0; i < G_N_ELEMENTS(locales); i++) {
- for (j=0; locale[j] && locales[i].locale[j] == locale[j]; j++);
+ for (j=0; locale[j] && locales[i].locale[j] == locale[j]; j++) ;
if (j > maxfit) {
maxfit = j;
maxpos = i;
Modified: trunk/pan/gui/prefs.cc
==============================================================================
--- trunk/pan/gui/prefs.cc (original)
+++ trunk/pan/gui/prefs.cc Fri Jul 4 16:05:27 2008
@@ -18,14 +18,14 @@
*/
#include <config.h>
-#include <iostream>
+#include <cstdlib>
#include <fstream>
+#include <iostream>
#include <sstream>
#include <string>
extern "C" {
#include <glib.h>
#include <glib/gi18n.h>
- #include <stdlib.h>
}
#include <pan/general/debug.h>
#include <pan/general/foreach.h>
Modified: trunk/pan/gui/save-ui.h
==============================================================================
--- trunk/pan/gui/save-ui.h (original)
+++ trunk/pan/gui/save-ui.h Fri Jul 4 16:05:27 2008
@@ -26,7 +26,6 @@
#include <pan/data/article.h>
#include <pan/data/article-cache.h>
#include <pan/data/data.h>
-#include <glib.h>
#include <gtk/gtkwindow.h>
#include "group-prefs.h"
#include "prefs.h"
Modified: trunk/pan/gui/score-add-ui.cc
==============================================================================
--- trunk/pan/gui/score-add-ui.cc (original)
+++ trunk/pan/gui/score-add-ui.cc Fri Jul 4 16:05:27 2008
@@ -19,9 +19,9 @@
#include <config.h>
#include <cassert>
+#include <climits>
extern "C" {
#include <glib/gi18n.h>
- #include "limits.h"
}
#include <pan/general/debug.h>
#include <pan/general/text-match.h>
Modified: trunk/pan/gui/server-ui.cc
==============================================================================
--- trunk/pan/gui/server-ui.cc (original)
+++ trunk/pan/gui/server-ui.cc Fri Jul 4 16:05:27 2008
@@ -20,11 +20,11 @@
#include <config.h>
#include <cstdlib>
#include <cstring>
+#include <climits>
extern "C" {
#include <glib.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
- #include "limits.h"
}
#include <pan/general/foreach.h>
#include <pan/general/quark.h>
Modified: trunk/pan/tasks/socket-impl-gio.cc
==============================================================================
--- trunk/pan/tasks/socket-impl-gio.cc (original)
+++ trunk/pan/tasks/socket-impl-gio.cc Fri Jul 4 16:05:27 2008
@@ -31,11 +31,11 @@
extern "C" {
#include <unistd.h>
- #include <glib.h>
#include <glib/gi18n.h>
}
#include <pan/general/file-util.h>
+#include <pan/general/gassert.h>
#include <pan/general/log.h>
#include <pan/general/worker-pool.h>
Modified: trunk/pan/tasks/socket-impl-gio.h
==============================================================================
--- trunk/pan/tasks/socket-impl-gio.h (original)
+++ trunk/pan/tasks/socket-impl-gio.h Fri Jul 4 16:05:27 2008
@@ -21,7 +21,8 @@
#define __SocketGIO_h__
#include <string>
-#include <glib.h>
+#include <glib/giochannel.h>
+#include <glib/gstring.h>
#include <pan/tasks/socket.h>
namespace pan
Modified: trunk/pan/tasks/socket-impl-scripted.cc
==============================================================================
--- trunk/pan/tasks/socket-impl-scripted.cc (original)
+++ trunk/pan/tasks/socket-impl-scripted.cc Fri Jul 4 16:05:27 2008
@@ -19,16 +19,12 @@
#include <config.h>
#include <cassert>
+#include <cstdlib>
#include <pan/general/debug.h>
#include <pan/general/messages.h>
#include <pan/general/string-view.h>
#include "socket-impl-scripted.h"
-extern "C"
-{
- #include "stdlib.h"
-}
-
using namespace pan;
const std::string ScriptedSocket::ABORT ("[[[ABORT]]]");
Modified: trunk/pan/usenet-utils/gnksa-test.cc
==============================================================================
--- trunk/pan/usenet-utils/gnksa-test.cc (original)
+++ trunk/pan/usenet-utils/gnksa-test.cc Fri Jul 4 16:05:27 2008
@@ -1,13 +1,10 @@
#include <config.h>
+#include <climits>
#include <iostream>
#include <string>
#include <pan/general/string-view.h>
#include <pan/general/test.h>
#include "gnksa.h"
-extern "C"
-{
- #include "limits.h"
-}
using namespace pan;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]