glom r1620 - in trunk: . glom glom/libglom/data_structure
- From: arminb svn gnome org
- To: svn-commits-list gnome org
- Subject: glom r1620 - in trunk: . glom glom/libglom/data_structure
- Date: Sat, 7 Jun 2008 13:51:16 +0000 (UTC)
Author: arminb
Date: Sat Jun 7 13:51:15 2008
New Revision: 1620
URL: http://svn.gnome.org/viewvc/glom?rev=1620&view=rev
Log:
2008-06-07 Armin Burgmeier <armin openismus com>
* configure.in:
* config.h.in: Check whether the strptime function is available.
* glom/libglom/data_structure/glomconversions.cc (parse_time): Don't
fall back to strptime if strptime is not available, such as on Windows
(mingw).
* glom/dialog_existing_or_new.h:
* glom/dialog_existing_or_new.cc:
* glom/dialog_import_csv.cc: Windows build fixes, mostly
#ifndef/#endif pairs around libepc stuff. We also need to #undef iconv
which seems to be a define to libiconv on Windows, in order to use
the Glib::Iconv::iconv function.
* glom/main.cc: Don include <fontconfig/fontconfig.h> on Windows since
it is not available. It doesn't seem to be used anyway.
Modified:
trunk/ChangeLog
trunk/config.h.in
trunk/configure.in
trunk/glom/dialog_existing_or_new.cc
trunk/glom/dialog_existing_or_new.h
trunk/glom/dialog_import_csv.cc
trunk/glom/libglom/data_structure/glomconversions.cc
trunk/glom/main.cc
Modified: trunk/config.h.in
==============================================================================
--- trunk/config.h.in (original)
+++ trunk/config.h.in Sat Jun 7 13:51:15 2008
@@ -55,6 +55,9 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
+/* Define to 1 if you have the `strptime' function. */
+#undef HAVE_STRPTIME
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Sat Jun 7 13:51:15 2008
@@ -118,6 +118,8 @@
# Get the CFLAGS and LIBS for python's embedding API:
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+# We don't have this on mingw, for example
+AC_CHECK_FUNCS(strptime)
# Install path for DTD (e.g. /usr/local/share/glom):
Modified: trunk/glom/dialog_existing_or_new.cc
==============================================================================
--- trunk/glom/dialog_existing_or_new.cc (original)
+++ trunk/glom/dialog_existing_or_new.cc Sat Jun 7 13:51:15 2008
@@ -223,13 +223,13 @@
Dialog_ExistingOrNew::~Dialog_ExistingOrNew()
{
+#ifndef G_OS_WIN32
if(m_service_monitor)
{
g_object_unref(m_service_monitor);
m_service_monitor = NULL;
}
-#ifndef G_OS_WIN32
// Release the service infos in the treestore
if(!m_iter_existing_network_dummy.get())
{
@@ -338,6 +338,7 @@
}
}
+#ifndef G_OS_WIN32
EpcServiceInfo* Dialog_ExistingOrNew::get_service_info() const
{
Gtk::TreeModel::iterator iter;
@@ -359,6 +360,7 @@
else
throw std::logic_error("Dialog_ExistingOrNew::get_service_name: action is not OPEN_REMOTE");
}
+#endif
std::auto_ptr<Gtk::TreeModel::iterator> Dialog_ExistingOrNew::create_dummy_item_existing(const Gtk::TreeModel::iterator& parent, const Glib::ustring& text)
{
Modified: trunk/glom/dialog_existing_or_new.h
==============================================================================
--- trunk/glom/dialog_existing_or_new.h (original)
+++ trunk/glom/dialog_existing_or_new.h Sat Jun 7 13:51:15 2008
@@ -21,10 +21,6 @@
#ifndef GLOM_DIALOG_EXISTING_OR_NEW_H
#define GLOM_DIALOG_EXISTING_OR_NEW_H
-#ifndef G_OS_WIN32
-# include <libepc/service-monitor.h>
-#endif
-
#include <memory>
#include <ctime> // for time_t
#include <giomm/asyncresult.h>
@@ -38,6 +34,10 @@
#include <gtkmm/notebook.h>
#include <libglademm/xml.h>
+#ifndef G_OS_WIN32
+# include <libepc/service-monitor.h>
+#endif
+
namespace Glom
{
Modified: trunk/glom/dialog_import_csv.cc
==============================================================================
--- trunk/glom/dialog_import_csv.cc (original)
+++ trunk/glom/dialog_import_csv.cc Sat Jun 7 13:51:15 2008
@@ -28,6 +28,11 @@
#include <glibmm/i18n.h>
#include <cerrno>
+// On Windows, "iconv" seems to be a define for "libiconv", breaking the Glib::IConv::iconv() call.
+#ifdef iconv
+#undef iconv
+#endif
+
namespace
{
@@ -656,6 +661,7 @@
char outbuffer[CONVERT_BUFFER_SIZE];
char* outbuf = outbuffer;
gsize outbytes = CONVERT_BUFFER_SIZE;
+
const std::size_t result = m_parser->conv.iconv(&inbuf, &inbytes, &outbuf, &outbytes);
bool more_to_process = (inbytes != 0);
Modified: trunk/glom/libglom/data_structure/glomconversions.cc
==============================================================================
--- trunk/glom/libglom/data_structure/glomconversions.cc (original)
+++ trunk/glom/libglom/data_structure/glomconversions.cc Sat Jun 7 13:51:15 2008
@@ -18,6 +18,9 @@
* Boston, MA 02111-1307, USA.
*/
+
+#include "config.h" // For HAVE_STRPTIME
+
#include "glomconversions.h"
#include <glom/libglom/connectionpool.h>
#include <glom/libglom/utils.h>
@@ -637,6 +640,7 @@
return the_c_time;
}
+#ifdef HAVE_STRPTIME
//Fall back to strptime():
//It seems to be well known that time_get<> can parse much less than what time_put<> can generate:
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2070.html
@@ -683,6 +687,7 @@
//std::cout << " DEBUG: strptime(%c) failed on text=" << text << std::endl;
+#endif // HAVE_STRPTIME
//Nothing worked:
//tm blank_time = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
tm blank_time ;
Modified: trunk/glom/main.cc
==============================================================================
--- trunk/glom/main.cc (original)
+++ trunk/glom/main.cc Sat Jun 7 13:51:15 2008
@@ -40,7 +40,9 @@
#include "application.h"
#include <glom/libglom/glade_utils.h>
+#ifndef G_OS_WIN32
#include <fontconfig/fontconfig.h> //For cleanup.
+#endif
namespace Glom
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]