libgsf r1021 - in trunk: . gsf gsf-gnome
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: libgsf r1021 - in trunk: . gsf gsf-gnome
- Date: Wed, 5 Nov 2008 20:42:42 +0000 (UTC)
Author: mortenw
Date: Wed Nov 5 20:42:42 2008
New Revision: 1021
URL: http://svn.gnome.org/viewvc/libgsf?rev=1021&view=rev
Log:
2008-11-05 Morten Welinder <terra gnome org>
* */*.c: Fix problem with formats. Based on patch from Hib Eris,
#559291.
2008-10-30 Morten Welinder <terra gnome org>
* gsf/gsf-output-stdio.c (rename_wrapper): Only use statfs if it
is the expected two-argument kind. Fixes #558253.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/configure.in
trunk/gsf-gnome/gsf-input-bonobo.c
trunk/gsf-gnome/gsf-output-bonobo.c
trunk/gsf/gsf-infile-msvba.c
trunk/gsf/gsf-infile-zip.c
trunk/gsf/gsf-output-stdio.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Nov 5 20:42:42 2008
@@ -1,3 +1,9 @@
+libgsf 1.14.11
+
+Morten:
+ * Solaris compilation issue. [#558253]
+
+--------------------------------------------------------------------------
libgsf 1.14.10
Jody:
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed Nov 5 20:42:42 2008
@@ -162,6 +162,16 @@
AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h io.h sys/statfs.h)
AC_FUNC_MMAP
+AC_MSG_CHECKING([form of statfs])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif]],
+[[struct statfs buf; (void)(2*statfs("xyz",&buf));]])],
+ [AC_MSG_RESULT([2-arg, linux-style])
+AC_DEFINE(HAVE_2ARG_STATFS, 1, [Define is you have two-argument statfs like linux])],
+ [AC_MSG_RESULT([none, or unknown])])
+
AC_CHECK_FUNCS(chown setrlimit)
AC_CHECK_FUNCS(gmtime_r, [],
Modified: trunk/gsf-gnome/gsf-input-bonobo.c
==============================================================================
--- trunk/gsf-gnome/gsf-input-bonobo.c (original)
+++ trunk/gsf-gnome/gsf-input-bonobo.c Wed Nov 5 20:42:42 2008
@@ -57,7 +57,7 @@
Bonobo_Stream_seek (binput->shared->stream, new_pos,
Bonobo_Stream_SeekSet, &ev);
if (BONOBO_EX (&ev)) {
- g_warning (bonobo_exception_get_text (&ev));
+ g_warning ("%s", bonobo_exception_get_text (&ev));
CORBA_exception_free (&ev);
return -1;
} else {
@@ -203,7 +203,7 @@
Bonobo_Stream_read (binput->shared->stream, (CORBA_long) num_bytes,
&bsibuf, &ev);
if (BONOBO_EX (&ev)) {
- g_warning (bonobo_exception_get_text (&ev));
+ g_warning ("%s", bonobo_exception_get_text (&ev));
return NULL;
} else {
memcpy (buffer, bsibuf->_buffer, bsibuf->_length);
@@ -260,7 +260,7 @@
pos = Bonobo_Stream_seek
(binput->shared->stream, coffset, bwhence, &ev);
if (BONOBO_EX (&ev)) {
- g_warning (bonobo_exception_get_text (&ev));
+ g_warning ("%s", bonobo_exception_get_text (&ev));
return TRUE;
} else {
binput->shared->pos = pos;
Modified: trunk/gsf-gnome/gsf-output-bonobo.c
==============================================================================
--- trunk/gsf-gnome/gsf-output-bonobo.c (original)
+++ trunk/gsf-gnome/gsf-output-bonobo.c Wed Nov 5 20:42:42 2008
@@ -120,7 +120,7 @@
CORBA_exception_init (&ev);
Bonobo_Stream_write (bonobo->stream, bsobuf, &ev);
if (BONOBO_EX (&ev)) {
- g_warning (bonobo_exception_get_text (&ev));
+ g_warning ("%s", bonobo_exception_get_text (&ev));
CORBA_exception_free (&ev);
return FALSE;
}
Modified: trunk/gsf/gsf-infile-msvba.c
==============================================================================
--- trunk/gsf/gsf-infile-msvba.c (original)
+++ trunk/gsf/gsf-infile-msvba.c Wed Nov 5 20:42:42 2008
@@ -269,7 +269,7 @@
if (failed) {
if (err != NULL)
- *err = g_error_new (gsf_input_error_id (), 0, msg);
+ *err = g_error_new_literal (gsf_input_error_id (), 0, msg);
return FALSE;
}
return TRUE;
Modified: trunk/gsf/gsf-infile-zip.c
==============================================================================
--- trunk/gsf/gsf-infile-zip.c (original)
+++ trunk/gsf/gsf-infile-zip.c Wed Nov 5 20:42:42 2008
@@ -411,9 +411,8 @@
}
if (NULL != err) {
- g_print (err);
if (errmsg != NULL)
- *errmsg = g_error_new (gsf_input_error_id (), 0, err);
+ *errmsg = g_error_new_literal (gsf_input_error_id (), 0, err);
g_free (err);
return TRUE;
}
Modified: trunk/gsf/gsf-output-stdio.c
==============================================================================
--- trunk/gsf/gsf-output-stdio.c (original)
+++ trunk/gsf/gsf-output-stdio.c Wed Nov 5 20:42:42 2008
@@ -74,6 +74,7 @@
goto done;
#ifdef HAVE_SYS_STATFS_H
+#ifdef HAVE_2ARG_STATFS
/* The FUSE file system does not unlink the target. */
if (errno == EPERM) {
int save_errno = errno;
@@ -84,6 +85,7 @@
errno = save_errno;
}
#endif
+#endif
#ifdef G_OS_WIN32
/* Win32's rename does not unlink the target. */
@@ -260,7 +262,7 @@
saved_errno = errno;
res = gsf_output_set_error (output,
saved_errno,
- g_strerror (saved_errno));
+ "%s", g_strerror (saved_errno));
} else {
/* Restore permissions. There is not much error checking we
* can do here, I'm afraid. The final data is saved anyways.
@@ -341,7 +343,7 @@
if (0 == fseek (stdio->file, loffset, stdio_whence))
return TRUE;
#endif
- return gsf_output_set_error (output, errno, g_strerror (errno));
+ return gsf_output_set_error (output, errno, "%s", g_strerror (errno));
}
static gboolean
@@ -361,7 +363,7 @@
written = fwrite (buffer + (num_bytes - remaining), 1,
remaining, stdio->file);
if ((written < remaining) && ferror (stdio->file) != 0)
- return gsf_output_set_error (output, errno, g_strerror (errno));
+ return gsf_output_set_error (output, errno, "%s", g_strerror (errno));
remaining -= written;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]