> Unfortunately this mailing list appears to be silently dropping
> attachments in some cases. Can you try again with a .txt extension?
>
> Also, would it be possible for you to send a patch that's relative
> to Subversion's trunk code, rather than 1.6.12?
>
> Thanks,
> Stefan
>

Sure.  Here it is vs. subversion-svn-r-1002716. (also attaching as a
.patch and a .txt in case either of those work better)
-scottmc

Scott McCreary
HaikuPorts



Index: subversion/libsvn_subr/config_file.c
===================================================================
--- subversion/libsvn_subr/config_file.c        (revision 1002716)
+++ subversion/libsvn_subr/config_file.c        (working copy)
@@ -38,6 +38,11 @@

 #include "svn_private_config.h"

+#ifdef __HAIKU__
+#      include <FindDirectory.h>
+#      include <StorageDefs.h>
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR

@@ -331,7 +336,19 @@
                                    SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }

-#else  /* ! WIN32 */
+#elif defined(__HAIKU__)
+{
+  char folder[B_PATH_NAME_LENGTH];
+
+  status_t error = find_directory (B_USER_SETTINGS_DIRECTORY, -1, false,
+                                                       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 && !__HAIKU__ */

   *path_p = svn_dirent_join_many(pool, SVN_CONFIG__SYS_DIRECTORY, fname, NULL);

@@ -1116,8 +1133,21 @@
     *path = svn_dirent_join_many(pool, folder,
                                  SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
+
+#elif defined(__HAIKU__)
+{
+  char folder[B_PATH_NAME_LENGTH];
+
+  status_t error = find_directory (B_USER_SETTINGS_DIRECTORY, -1, false,
+                                                       folder, sizeof(folder));
+  if (error)
+       return SVN_NO_ERROR;
+
+  *path = svn_path_join_many (pool, folder,
+                                                       
SVN_CONFIG__USR_DIRECTORY, fname, NULL);
+}
+#else  /* ! WIN32 && !__HAIKU__ */

-#else  /* ! WIN32 */
   {
     const char *homedir = svn_user_get_homedir(pool);
     if (! homedir)
Index: subversion/libsvn_subr/config_impl.h
===================================================================
--- subversion/libsvn_subr/config_impl.h        (revision 1002716)
+++ subversion/libsvn_subr/config_impl.h        (working copy)
@@ -114,8 +114,11 @@
    or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORY    "Subversion"
-#else  /* ! WIN32 */
+#elif defined __HAIKU__ /* HAIKU */
 #  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
+#  define SVN_CONFIG__USR_DIRECTORY   "subversion"
+#else  /* ! WIN32 && ! __HAIKU__ */
+#  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
 #  define SVN_CONFIG__USR_DIRECTORY   ".subversion"
 #endif /* WIN32 */
Index: subversion/libsvn_subr/config_file.c
===================================================================
--- subversion/libsvn_subr/config_file.c        (revision 1002716)
+++ subversion/libsvn_subr/config_file.c        (working copy)
@@ -38,6 +38,11 @@
 
 #include "svn_private_config.h"
 
+#ifdef __HAIKU__
+#      include <FindDirectory.h>
+#      include <StorageDefs.h>
+#endif
+
 /* Used to terminate lines in large multi-line string literals. */
 #define NL APR_EOL_STR
 
@@ -331,7 +336,19 @@
                                    SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
 
-#else  /* ! WIN32 */
+#elif defined(__HAIKU__)
+{
+  char folder[B_PATH_NAME_LENGTH];
+  
+  status_t error = find_directory (B_USER_SETTINGS_DIRECTORY, -1, false,
+                                                       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 && !__HAIKU__ */
 
   *path_p = svn_dirent_join_many(pool, SVN_CONFIG__SYS_DIRECTORY, fname, NULL);
 
@@ -1116,8 +1133,21 @@
     *path = svn_dirent_join_many(pool, folder,
                                  SVN_CONFIG__SUBDIRECTORY, fname, NULL);
   }
+  
+#elif defined(__HAIKU__)
+{
+  char folder[B_PATH_NAME_LENGTH];
+  
+  status_t error = find_directory (B_USER_SETTINGS_DIRECTORY, -1, false,
+                                                       folder, sizeof(folder));
+  if (error)
+       return SVN_NO_ERROR;
+  
+  *path = svn_path_join_many (pool, folder,
+                                                       
SVN_CONFIG__USR_DIRECTORY, fname, NULL);
+}
+#else  /* ! WIN32 && !__HAIKU__ */
 
-#else  /* ! WIN32 */
   {
     const char *homedir = svn_user_get_homedir(pool);
     if (! homedir)
Index: subversion/libsvn_subr/config_impl.h
===================================================================
--- subversion/libsvn_subr/config_impl.h        (revision 1002716)
+++ subversion/libsvn_subr/config_impl.h        (working copy)
@@ -114,8 +114,11 @@
    or svn_config_get_user_config_path() instead. */
 #ifdef WIN32
 #  define SVN_CONFIG__SUBDIRECTORY    "Subversion"
-#else  /* ! WIN32 */
+#elif defined __HAIKU__ /* HAIKU */
 #  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
+#  define SVN_CONFIG__USR_DIRECTORY   "subversion"
+#else  /* ! WIN32 && ! __HAIKU__ */
+#  define SVN_CONFIG__SYS_DIRECTORY   "/etc/subversion"
 #  define SVN_CONFIG__USR_DIRECTORY   ".subversion"
 #endif /* WIN32 */
 

Reply via email to