[haiku-development] Re: subversion default config directories on Haiku

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 03 Sep 2009 15:58:40 +0200

On 2009-09-03 at 11:10:08 [+0200], scott mc <scottmc2@xxxxxxxxx> wrote:
> On Thu, Sep 3, 2009 at 1:29 AM, Stephan Assmus<superstippi@xxxxxx> wrote:
> >
> > On 2009-09-03 at 03:59:23 [+0200], Rene Gollent <anevilyak@xxxxxxxxx> 
> > wrote:
> >> On Wed, Sep 2, 2009 at 8:51 PM, Ingo Weinhold<ingo_weinhold@xxxxxx> 
> >> wrote:
> >> >
> >> > Attached is a patch against subversion 1.2.1 from the days when I built
> >> > subversion for BeOS. No idea whether the current versions of the
> >> > affected files still have any resemblence to the ones patched (or if
> >> > they still exist at all), but maybe the patch is of any help.
> >>
> >> I may be wrong, but it looks like you forgot the actual attachment :)
> >
> > Somehow it's inconvenient, isn't it? I'd rather get the occasional 2 MB
> > image attached than not having attachements work at all. I almost never 
> > use
> > the archives myself, so that may be the reason why I don't care so much
> > about the argument, that the attachements would be lost in the archives
> > anyway. :-)
> 
> Well I still look forward to see that patch, just to compare it with
> what I've already done.

Here it comes.

CU, Ingo


diff -ur subversion-1.2.1.orig/subversion/libsvn_subr/config_file.c 
subversion-1.2.1/subversion/libsvn_subr/config_file.c
--- subversion-1.2.1.orig/subversion/libsvn_subr/config_file.c  2005-03-28 
19:36:02.000000000 +0200
+++ subversion-1.2.1/subversion/libsvn_subr/config_file.c       2005-08-04 
19:51:17.000000000 +0200
@@ -31,6 +31,11 @@
 
 #include "svn_private_config.h"
 
+#ifdef __BEOS__
+#      include <FindDirectory.h>
+#      include <StorageDefs.h>
+#endif
+
 
 /* File parsing context */
 typedef struct parse_context_t
@@ -313,7 +318,20 @@
                                   SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
 
-#else  /* ! WIN32 */
+#elif defined(__BEOS__)
+  {
+    char folder[B_PATH_NAME_LENGTH];
+
+    status_t error = find_directory (B_USER_SETTINGS_DIRECTORY, -1, true, 
+                                     folder, sizeof(folder));
+    if (error)
+      return SVN_NO_ERROR;
+
+    *path_p = svn_path_join_many (pool, folder,
+                                  SVN_CONFIG__USR_DIRECTORY, fname, NULL);
+  }
+
+#else  /* ! WIN32 && ! __BEOS__ */
   {
     apr_status_t apr_err;
     char *homedir;
diff -ur subversion-1.2.1.orig/subversion/libsvn_subr/config_impl.h 
subversion-1.2.1/subversion/libsvn_subr/config_impl.h
--- subversion-1.2.1.orig/subversion/libsvn_subr/config_impl.h  2004-12-01 
05:25:28.000000000 +0100
+++ subversion-1.2.1/subversion/libsvn_subr/config_impl.h       2005-08-04 
19:51:54.000000000 +0200
@@ -107,7 +107,10 @@
    or svn_config__user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORY    "Subversion"
-#else  /* ! WIN32 */
+#elif defined(__BEOS__)
+#  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
+#  define SVN_CONFIG__USR_DIRECTORY   "subversion"
+#else  /* ! WIN32 && ! __BEOS__ */
 #  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
 #  define SVN_CONFIG__USR_DIRECTORY   ".subversion"
 #endif /* WIN32 */


Other related posts: