solars-sparc32-largefile-20051011
[openafs.git] / src / afs / VNOPS / afs_vnop_readdir.c
index 8bbd74b..2b385af 100644 (file)
@@ -148,23 +148,20 @@ struct min_direct {               /* miniature direct structure */
     u_short d_reclen;
     u_char d_type;
     u_char d_namlen;
-#else
-#ifdef AFS_SUN5_ENV
+#elif defined(AFS_SUN5_ENV)
     afs_uint32 d_fileno;
     afs_int32 d_off;
     u_short d_reclen;
 #else
-#if defined(AFS_SUN_ENV) || defined(AFS_AIX32_ENV)
+#if defined(AFS_AIX32_ENV)
     afs_int32 d_off;
-#endif
-#if     defined(AFS_HPUX100_ENV)
+#elif defined(AFS_HPUX100_ENV)
     unsigned long long d_off;
 #endif
     afs_uint32 d_fileno;
     u_short d_reclen;
     u_short d_namlen;
 #endif
-#endif
 };
 #endif /* AFS_SGI_ENV */
 
@@ -478,7 +475,7 @@ afs_readdir_move(de, vc, auio, slen, rlen, off)
 #if !defined(AFS_SGI_ENV)
     sdirEntry.d_namlen = slen;
 #endif
-#if defined(AFS_SUN_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_SGI_ENV)
+#if defined(AFS_AIX32_ENV) || defined(AFS_SGI_ENV)
     sdirEntry.d_off = off;
 #endif
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
@@ -583,8 +580,9 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
 #if defined(AFS_SGI53_ENV)
     afs_int32 use64BitDirent, dirsiz;
 #endif /* defined(AFS_SGI53_ENV) */
+#ifndef        AFS_HPUX_ENV
     OSI_VC_CONVERT(avc);
-#ifdef AFS_HPUX_ENV
+#else
     /*
      * XXX All the hacks for alloced sdirEntry and inlining of afs_readdir_move instead of calling
      * it is necessary for hpux due to stack problems that seem to occur when coming thru the nfs
@@ -627,9 +625,11 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
     if (eofp)
        *eofp = 0;
 #endif
+#ifndef AFS_64BIT_CLIENT
     if (AfsLargeFileUio(auio)  /* file is large than 2 GB */
        ||AfsLargeFileSize(auio->uio_offset, auio->uio_resid))
        return EFBIG;
+#endif
 
     if ((code = afs_InitReq(&treq, acred))) {
 #ifdef AFS_HPUX_ENV
@@ -726,7 +726,7 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
                FIXUPSTUPIDINODE(sdirEntry->d_fileno);
                sdirEntry->d_reclen = rlen = auio->afsio_resid;
                sdirEntry->d_namlen = o_slen;
-#if defined(AFS_SUN_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
                sdirEntry->d_off = origOffset;
 #endif
                AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ,
@@ -795,7 +795,7 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
                FIXUPSTUPIDINODE(sdirEntry->d_fileno);
                sdirEntry->d_reclen = rlen = auio->afsio_resid;
                sdirEntry->d_namlen = o_slen;
-#if defined(AFS_SUN_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
                sdirEntry->d_off = origOffset;
 #endif
                AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ,
@@ -850,7 +850,7 @@ afs_readdir(OSI_VC_ARG(avc), auio, acred)
            FIXUPSTUPIDINODE(sdirEntry->d_fileno);
            sdirEntry->d_reclen = rlen = len;
            sdirEntry->d_namlen = o_slen;
-#if defined(AFS_SUN_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
+#if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
            sdirEntry->d_off = origOffset;
 #endif
            AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ, auio,