deal-with-linux-large-uids-20020115
[openafs.git] / src / afs / LINUX / osi_machdep.h
index c192e96..91c3229 100644 (file)
 #define afs_hz HZ
 #include "../h/sched.h"
 #define osi_Time() (xtime.tv_sec)
+#if  (CPU == sparc64)
+#define osi_GetTime(V) do { (*(V)).tv_sec = xtime.tv_sec; (*(V)).tv_usec = xtime.tv_usec; } while (0)
+#else
 #define osi_GetTime(V) (*(V)=xtime)
+#endif
 
 #undef gop_lookupname
 #define gop_lookupname osi_lookupname
@@ -55,9 +59,11 @@ extern struct vnodeops afs_dir_iops, afs_symlink_iops;
                        ((vc)->v_op == &afs_dir_iops) ? 1 : \
                        ((vc)->v_op == &afs_symlink_iops))
 
-/* bcopy is in stds.h, just so fcrpyt.c can pick it up. */
+#if 0
+/* bcopy is in stds.h, just so fcrypt.c can pick it up. */
 #define bzero(D,C)   memset((D), 0, (C))
 #define bcmp(A,B,C)  memcmp((A), (B), (C))
+#endif
 
 /* We often need to pretend we're in user space to get memory transfers
  * right for the kernel calls we use.
@@ -89,11 +95,15 @@ extern struct vnodeops afs_dir_iops, afs_symlink_iops;
 
 /* cred struct */
 typedef struct cred {          /* maps to task field: */
+#if (CPU == sparc64)
+    long cr_ref;
+#else
     int cr_ref;
-    unsigned short cr_uid;     /* euid */
-    unsigned short cr_ruid;    /* uid */
-    unsigned short cr_gid;     /* egid */
-    unsigned short cr_rgid;    /* gid */
+#endif
+    uid_t cr_uid;      /* euid */
+    uid_t cr_ruid;     /* uid */
+    gid_t cr_gid;      /* egid */
+    gid_t cr_rgid;     /* gid */
     gid_t cr_groups[NGROUPS];  /* 32 groups - empty set to NOGROUP */
     int cr_ngroups;
 } cred_t;
@@ -106,7 +116,7 @@ typedef enum { UIO_READ, UIO_WRITE } uio_flag_t;
 typedef struct uio {
     struct     iovec *uio_iov;
     int        uio_iovcnt;
-    int        uio_offset;
+    afs_offs_t         uio_offset;
     uio_seg_t   uio_seg;
     int        uio_resid;
     uio_flag_t         uio_flag;