fileserver-largefile-support-20020109
authorR. Lindsay Todd <toddr@rpi.edu>
Thu, 9 Jan 2003 19:16:50 +0000 (19:16 +0000)
committerJim Rees <rees@umich.edu>
Thu, 9 Jan 2003 19:16:50 +0000 (19:16 +0000)
Fix compile problems for 64BIT_ENV with large files turned off

src/config/stds.h
src/viced/afsfileprocs.c
src/viced/viced.c
src/vol/vnode.h

index 822d291..40b7947 100644 (file)
@@ -88,9 +88,11 @@ typedef struct u_Int64 afs_uint64;
 #ifdef AFS_64BIT_CLIENT
 typedef afs_int64 afs_size_t;
 typedef afs_uint64 afs_offs_t;
+#define SplitOffsetOrSize(t,h,l) SplitInt64(t,h,l)
 #else /* AFS_64BIT_CLIENT */
 typedef afs_int32 afs_size_t;
 typedef afs_uint32 afs_offs_t;
+#define SplitOffsetOrSize(t,h,l) (h) = 0; (l) = (t);
 #endif /* AFS_64BIT_CLIENT */
 
 /* you still have to include <netinet/in.h> to make these work */
index 4f4c644..4ab945b 100644 (file)
@@ -6636,7 +6636,7 @@ FetchData_RXStyle(Volume *volptr,
     FDH_SEEK(fdP, Pos, 0);
     {
        afs_int32       high, low;
-       SplitInt64(Len, high, low);
+       SplitOffsetOrSize(Len, high, low);
        assert(Int64Mode || high==0);
        if (Int64Mode) {
            high = htonl(high);
index b0b93ce..52b0290 100644 (file)
@@ -973,7 +973,7 @@ static int ParseArgs(int argc, char *argv[])
 static void NewParms(int initializing)
 {
     static struct stat sbuf;
-    register afs_int64 i;
+    register afs_offs_t i;
     register int fd;
     char *parms;
     char *argv[MAXPARMS];
index 3d22354..5477444 100644 (file)
@@ -206,8 +206,8 @@ typedef struct Vnode {
 
 #define VN_GET_LEN(N, V)  (N) = (V)->disk.length;
 #define VNDISK_GET_LEN(N, V)  (N) = (V)->length;
-#define VN_SET_LEN(V, N)  (V)->disk.length = Int64ToInt32(N);
-#define VNDISK_SET_LEN(V, N) (V)->length = Int64ToInt32(N);
+#define VN_SET_LEN(V, N)  (V)->disk.length = (N);
+#define VNDISK_SET_LEN(V, N) (V)->length = (N);
 
 #define SET_STATUS_LEN(S, V) (((S)->Length_hi = 0), \
                               ((S)->Length = (afs_uint32)(V)->disk.length))