summaryrefslogtreecommitdiff
path: root/devel/libgnome/patches/patch-ac
diff options
context:
space:
mode:
Diffstat (limited to 'devel/libgnome/patches/patch-ac')
-rw-r--r--devel/libgnome/patches/patch-ac76
1 files changed, 63 insertions, 13 deletions
diff --git a/devel/libgnome/patches/patch-ac b/devel/libgnome/patches/patch-ac
index 6972b55521a..1f36fb1438d 100644
--- a/devel/libgnome/patches/patch-ac
+++ b/devel/libgnome/patches/patch-ac
@@ -1,15 +1,65 @@
-$NetBSD: patch-ac,v 1.2 2003/02/14 20:11:51 jmmv Exp $
+$NetBSD: patch-ac,v 1.3 2003/02/15 13:30:50 jmmv Exp $
---- libgnome/gnome-init.h.orig Fri Nov 22 14:47:27 2002
-+++ libgnome/gnome-init.h
-@@ -36,8 +36,8 @@ G_BEGIN_DECLS
- * to override .gnome2 via environment variable and this is
- * an important feature for environments that mix GNOME versions)
- */
--#define GNOME_DOT_GNOME ".gnome2/"
--#define GNOME_DOT_GNOME_PRIVATE ".gnome2_private/"
-+#define GNOME_DOT_GNOME ".gnome2"
-+#define GNOME_DOT_GNOME_PRIVATE ".gnome2_private"
+--- libgnome/gnome-init.c.orig 2002-11-22 14:47:27.000000000 +0100
++++ libgnome/gnome-init.c
+@@ -53,6 +53,8 @@
- #define LIBGNOME_MODULE libgnome_module_info_get()
- const GnomeModuleInfo *libgnome_module_info_get (void) G_GNUC_CONST;
+ #include <libgnomevfs/gnome-vfs-init.h>
+
++int libgnome_mkdir(const char *path, mode_t mode);
++
+ /*****************************************************************************
+ * bonobo
+ *****************************************************************************/
+@@ -299,7 +301,7 @@ libgnome_userdir_setup (gboolean create_
+ if (!create_dirs)
+ return;
+
+- if (mkdir (gnome_user_dir, 0700) < 0) { /* private permissions, but we
++ if (libgnome_mkdir (gnome_user_dir, 0700) < 0) { /* private permissions, but we
+ don't check that we got them */
+ if (errno != EEXIST) {
+ fprintf(stderr, _("Could not create per-user gnome configuration directory `%s': %s\n"),
+@@ -308,7 +310,7 @@ libgnome_userdir_setup (gboolean create_
+ }
+ }
+
+- if (mkdir (gnome_user_private_dir, 0700) < 0) { /* This is private
++ if (libgnome_mkdir (gnome_user_private_dir, 0700) < 0) { /* This is private
+ per-user info mode
+ 700 will be
+ enforced! maybe
+@@ -330,7 +332,7 @@ libgnome_userdir_setup (gboolean create_
+ exit(1);
+ }
+
+- if (mkdir (gnome_user_accels_dir, 0700) < 0) {
++ if (libgnome_mkdir (gnome_user_accels_dir, 0700) < 0) {
+ if (errno != EEXIST) {
+ fprintf(stderr, _("Could not create gnome accelerators directory `%s': %s\n"),
+ gnome_user_accels_dir, strerror(errno));
+@@ -462,3 +464,24 @@ libgnome_module_info_get (void)
+
+ return &module_info;
+ }
++
++int
++libgnome_mkdir(const char *path, mode_t mode)
++{
++ char *tmp;
++ size_t length;
++ int ret;
++
++ length = strlen(path);
++ tmp = (char *) malloc(length + 1);
++ strcpy(tmp, path);
++ length--;
++ while (tmp[length] == '/' && length > 0) {
++ tmp[length] = '\0';
++ length--;
++ }
++ ret = mkdir(tmp, mode);
++
++ free(tmp);
++ return ret;
++}