fixes
authorMiklos Szeredi <miklos@szeredi.hu>
Tue, 3 Dec 2002 18:45:21 +0000 (18:45 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Tue, 3 Dec 2002 18:45:21 +0000 (18:45 +0000)
ChangeLog
configure.in
include/fuse.h
util/fusermount.c

index 62a859a1bfc5bade68a3259e17eb945299316370..9b21b5934fe9417328c80263915a9f8524093e30 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-03  Miklos Szeredi <mszeredi@inf.bme.hu>
+
+       * Added _FILE_OFFSET_BITS=64 define to fuse.h.  Note, that this is
+       an incompatible interface change.
+
 2002-10-28  Miklos Szeredi <mszeredi@inf.bme.hu>
 
        * Portablility fix (bug reported by C. Chris Erway)
index 2238b60b758883dc344c545f8ffdf0c0a6b567a7..dff58c6229629bb366d40cd881835a4889191229 100644 (file)
@@ -21,6 +21,8 @@ AC_ARG_ENABLE(util,
 AC_ARG_ENABLE(example,
        [  --enable-example        Compile with examples ])
 
+subdirs="include patch"
+
 if test "$enable_kernel_module" != "no"; then
        AC_MSG_CHECKING([kernel source directory])
        kernelsrc=
@@ -40,16 +42,7 @@ if test "$enable_kernel_module" != "no"; then
                fi
        fi
        AC_MSG_RESULT([$kernelsrc])
-fi
-
-oldcc=$CC
-oldcross_compiling=$cross_compiling
-if test "$cross_compiling" = yes; then
-       CC=gcc
-       cross_compiling=no
-fi
 
-if test "$enable_kernel_module" != "no"; then
        AC_MSG_CHECKING([kernel source version])
        kernsrcver=`sed -ne '/^VERSION = \(.*\)/{s//\1/;p;q;}' $kernelsrc/Makefile`
        kernsrcver="$kernsrcver.`sed -ne '/^PATCHLEVEL = \(.*\)/{s//\1/;p;q;}' $kernelsrc/Makefile`"
@@ -63,13 +56,7 @@ if test "$enable_kernel_module" != "no"; then
 *** configure the kernel before running this script])
        fi
        AC_MSG_RESULT([$kernsrcver])
-fi
 
-CC=$oldcc
-cross_compiling=$oldcross_compiling
-subdirs="include patch"
-
-if test "$enable_kernel_module" != "no"; then
        KERNINCLUDE=$kernelsrc/include
        AC_SUBST(KERNINCLUDE)
        kmoduledir=/lib/modules/$kernsrcver
index c4cfbc4083cfbe877e2c19e37541354cdafa483e..68f8eec2fb34ec219f8f3447e87b84916b0d8836 100644 (file)
@@ -11,6 +11,9 @@
 
 /* This file defines the library interface of FUSE */
 
+/* Now and forever: this interface uses 64 bit off_t */
+#define _FILE_OFFSET_BITS 64
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <utime.h>
index ac464d217843ab047bc99541af03e612e640f68d..b76c819148354aa672c59fefc17ed7e3e60c6430 100644 (file)
@@ -384,10 +384,19 @@ static char *resolve_path(const char *orig, int unmount)
 {
     char buf[PATH_MAX];
 
-    /* Resolving at unmount can only be done very carefully, not touching
-       the mountpoint... So for the moment it's not done.  */
-    if(unmount)
-        return strdup(orig);
+    if(unmount) {
+        /* Resolving at unmount can only be done very carefully, not touching
+           the mountpoint... So for the moment it's not done. 
+           
+           Just remove trailing slashes instead.
+        */
+        char *dst = strdup(orig);
+        char *end;
+        for(end = dst + strlen(dst) - 1; end > dst && *end == '/'; end --)
+            *end = '\0';
+
+        return dst;
+    }
 
     if(realpath(orig, buf) == NULL) {
         fprintf(stderr, "%s: Bad mount point %s: %s\n", progname, orig,