* early in name.
*/
typedef char lb64_string_t[12];
-char *int64_to_flipbase64(b64_string_t s, u_int64_t a);
+char *int64_to_flipbase64(b64_string_t s, uint64_t a);
int64_t flipbase64_to_int64(char *s);
-#define int32_to_flipbase64(S, A) int64_to_flipbase64(S, (u_int64_t)(A))
+#define int32_to_flipbase64(S, A) int64_to_flipbase64(S, (uint64_t)(A))
#endif
/* This message preserves our ability to license AFS to the U.S. Government
#include <sys/file.h>
#include <sys/param.h>
#include <lock.h>
+#ifdef AFS_AIX_ENV
+#include <sys/lockf.h>
+#endif
+#ifdef AFS_SUN5_ENV
+#include <unistd.h>
+#endif
#include <afs/afsutil.h>
#include <lwp.h>
#include "nfs.h"
namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
if (lockit) {
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ if (lockf(h->fd_fd, F_LOCK, 0) < 0)
+#else
if (flock(h->fd_fd, LOCK_EX)<0)
+#endif
return -1;
}
bad_getLinkByte:
if (lockit)
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ lockf(h->fd_fd, F_ULOCK, 0);
+#else
flock(h->fd_fd, LOCK_UN);
+#endif
return -1;
}
return -1;
/* Only one manipulates at a time. */
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
+#else
if (flock(fdP->fd_fd, LOCK_EX)<0) {
+#endif
FDH_REALLYCLOSE(fdP);
return -1;
}
goto badGetFreeTag;
}
FDH_SYNC(fdP);
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ lockf(fdP->fd_fd, F_ULOCK, 0);
+#else
flock(fdP->fd_fd, LOCK_UN);
+#endif
FDH_REALLYCLOSE(fdP);
return col;;
badGetFreeTag:
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ lockf(fdP->fd_fd, F_ULOCK, 0);
+#else
flock(fdP->fd_fd, LOCK_UN);
+#endif
FDH_REALLYCLOSE(fdP);
return -1;
}
namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
-
if (!locked) {
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
+#else
if (flock(fdP->fd_fd, LOCK_EX)<0) {
+#endif
return -1;
}
}
bad_SetLinkCount:
+#if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
+ lockf(fdP->fd_fd, F_ULOCK, 0);
+#else
flock(fdP->fd_fd, LOCK_UN);
+#endif
return code;
}