[goffice] glib: assume g_access.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] glib: assume g_access.
- Date: Sat, 30 Jan 2010 23:25:46 +0000 (UTC)
commit fbf96a3e223b98a7be6e2cfa2210d579342d1c4c
Author: Morten Welinder <terra gnome org>
Date: Sat Jan 30 18:25:26 2010 -0500
glib: assume g_access.
ChangeLog | 5 +++++
configure.in | 12 +-----------
goffice/utils/go-file.c | 9 ++-------
3 files changed, 8 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 68bf545..2a53cfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-01-30 Morten Welinder <terra gnome org>
+
+ * goffice/utils/go-file.c (go_file_access): Assume g_access is
+ available.
+
2010-01-26 Jean Brefort <jean brefort normalesup org>
* goffice/utils/go-format.c (cb_attrs_as_string),
diff --git a/configure.in b/configure.in
index ff077f9..494271f 100644
--- a/configure.in
+++ b/configure.in
@@ -433,19 +433,9 @@ SAVE_CFLAGS=$CFLAGS
SAVE_LIBS=$LIBS
CFLAGS="$CFLAGS $GOFFICE_CFLAGS"
LIBS="$GOFFICE_LIBS $LIBS"
-AC_MSG_CHECKING([for g_chmod])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <glib/gstdio.h>]], [[(void)g_chmod("/xxx",0777);]])],
- [AC_DEFINE(HAVE_G_CHMOD, 1, [Define if g_chmod is available as macro or function])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)])
-AC_MSG_CHECKING([for g_access])
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <glib/gstdio.h>]], [[(void)g_access("/xxx",0);]])],
- [AC_DEFINE(HAVE_G_ACCESS, 1, [Define if g_access is available as macro or function])
- AC_MSG_RESULT(yes)],
- [AC_MSG_RESULT(no)])
AC_MSG_CHECKING([for G_REGEX_ERROR_STRAY_BACKSLASH])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <glib/gregex.h>]], [[GRegexError error=G_REGEX_ERROR_STRAY_BACKSLASH;]])],
- [AC_DEFINE(HAVE_G_REGEX_ERROR_STRAY_BACKSLASH, 1, [Define if g_access is available as macro or function])
+ [AC_DEFINE(HAVE_G_REGEX_ERROR_STRAY_BACKSLASH, 1, [Define if G_REGEX_ERROR_STRAY_BACKSLASH is defined])
glib_has_G_REGEX_ERROR_STRAY_BACKSLASH=yes
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
diff --git a/goffice/utils/go-file.c b/goffice/utils/go-file.c
index 19ec78e..db5144a 100644
--- a/goffice/utils/go-file.c
+++ b/goffice/utils/go-file.c
@@ -1202,16 +1202,11 @@ go_file_access (char const *uri, gint mode)
return -1;
#ifdef G_OS_WIN32
-# ifndef HAVE_G_ACCESS
-# error "A glib with g_access is required for Win32"
-# else
/* FIXME FIXME FIXME Use Security API instead of checking file attributes only on NT-based environment */
- ret = g_access (filename, mode);
-# endif
-#else
- ret = access (filename, mode);
#endif
+ ret = g_access (filename, mode);
+
g_free (filename);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]