# define off_t off_t
# define loff_t loff_t
# endif
+# ifdef HPPA /* asm-parisc/stat.h defines stat64 */
+# undef stat64
+# endif
# define stat libc_stat
# define stat64 libc_stat64
# include <sys/stat.h>
# undef stat
# undef stat64
+# ifdef HPPA
+# define stat64 hpux_stat64
+# endif
#else
# include <sys/stat.h>
#endif
if (tcp->u_arg[4] == SEEK_SET)
tprintf("%ld, %llu, ", tcp->u_arg[0],
(((long long int) tcp->u_arg[1]) << 32
- | (unsigned long long) tcp->u_arg[2]));
+ | (unsigned long long) (unsigned) tcp->u_arg[2]));
else
tprintf("%ld, %lld, ", tcp->u_arg[0],
(((long long int) tcp->u_arg[1]) << 32
- | (unsigned long long) tcp->u_arg[2]));
+ | (unsigned long long) (unsigned) tcp->u_arg[2]));
}
else {
long long int off;
if (entering(tcp)) {
long long offset;
ALIGN64 (tcp, 1); /* FreeBSD aligns off_t args */
- offset = get64(tcp->u_arg [1], tcp->u_arg[2]);
+ offset = LONG_LONG(tcp->u_arg [1], tcp->u_arg[2]);
if (tcp->u_arg[3] == SEEK_SET)
tprintf("%ld, %llu, ", tcp->u_arg[0], offset);
else
if (entering(tcp)) {
ALIGN64 (tcp, 1);
printpath(tcp, tcp->u_arg[0]);
- tprintf(", %llu", get64(tcp->u_arg[1],tcp->u_arg[2]));
+ tprintf(", %llu", LONG_LONG(tcp->u_arg[1],tcp->u_arg[2]));
}
return 0;
}
if (entering(tcp)) {
ALIGN64 (tcp, 1);
tprintf("%ld, %llu", tcp->u_arg[0],
- get64(tcp->u_arg[1] ,tcp->u_arg[2]));
+ LONG_LONG(tcp->u_arg[1] ,tcp->u_arg[2]));
}
return 0;
}
}
#endif /* LINUXSPARC */
-#ifdef FREEBSD
static struct xlat fileflags[] = {
+#ifdef FREEBSD
{ UF_NODUMP, "UF_NODUMP" },
{ UF_IMMUTABLE, "UF_IMMUTABLE" },
{ UF_APPEND, "UF_APPEND" },
{ SF_IMMUTABLE, "SF_IMMUTABLE" },
{ SF_APPEND, "SF_APPEND" },
{ SF_NOUNLINK, "SF_NOUNLINK" },
+#elif UNIXWARE >= 2
+#ifdef _S_ISMLD
+ { _S_ISMLD, "_S_ISMLD" },
+#endif
+#ifdef _S_ISMOUNTED
+ { _S_ISMOUNTED, "_S_ISMOUNTED" },
+#endif
+#endif
{ 0, NULL },
};
+#ifdef FREEBSD
int
sys_chflags(tcp)
struct tcb *tcp;
if (!abbrev(tcp)) {
tprintf("st_atime=%s, ", sprinttime(statbuf->st_atime));
tprintf("st_mtime=%s, ", sprinttime(statbuf->st_mtime));
- tprintf("st_ctime=%s}", sprinttime(statbuf->st_ctime));
+ tprintf("st_ctime=%s", sprinttime(statbuf->st_ctime));
+#if HAVE_ST_FLAGS
+ tprintf(", st_flags=");
+ if (statbuf->st_flags) {
+ printflags(fileflags, statbuf->st_flags);
+ } else
+ tprintf("0");
+#endif
+#if HAVE_ST_ACLCNT
+ tprintf(", st_aclcnt=%d", statbuf->st_aclcnt);
+#endif
+#if HAVE_ST_LEVEL
+ tprintf(", st_level=%ld", statbuf->st_level);
+#endif
+#if HAVE_ST_FSTYPE
+ tprintf(", st_fstype=%.*s",
+ (int) sizeof statbuf->st_fstype, statbuf->st_fstype);
+#endif
+#if HAVE_ST_GEN
+ tprintf(", st_gen=%u", statbuf->st_gen);
+#endif
+ tprintf("}");
}
else
tprintf("...}");
if (!abbrev(tcp)) {
tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
-#ifndef FREEBSD
- tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
-#else /* FREEBSD */
- tprintf("st_ctime=%s, ", sprinttime(statbuf.st_ctime));
- tprintf("st_flags=");
+ tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
+#if HAVE_ST_FLAGS
+ tprintf(", st_flags=");
if (statbuf.st_flags) {
printflags(fileflags, statbuf.st_flags);
} else
tprintf("0");
- tprintf(", st_gen=%u}", statbuf.st_gen);
-#endif /* FREEBSD */
+#endif
+#if HAVE_ST_ACLCNT
+ tprintf(", st_aclcnt=%d", statbuf.st_aclcnt);
+#endif
+#if HAVE_ST_LEVEL
+ tprintf(", st_level=%ld", statbuf.st_level);
+#endif
+#if HAVE_ST_FSTYPE
+ tprintf(", st_fstype=%.*s",
+ (int) sizeof statbuf.st_fstype, statbuf.st_fstype);
+#endif
+#if HAVE_ST_GEN
+ tprintf(", st_gen=%u", statbuf.st_gen);
+#endif
+ tprintf("}");
}
else
tprintf("...}");
}
#endif /* HAVE_STAT64 */
-#if defined(linux) && !defined(IA64)
+#if defined(linux) && !defined(IA64) && !defined(HPPA)
static void
convertoldstat(oldbuf, newbuf)
const struct __old_kernel_stat *oldbuf;
}
#ifdef linux
-# if !defined(IA64)
+# if !defined(IA64) && !defined(HPPA)
int
sys_oldstat(tcp)
struct tcb *tcp;
}
return 0;
}
-# endif /* !IA64 */
+# endif /* !IA64 && !HPPA*/
#endif /* linux */
#ifndef HAVE_LONG_LONG_OFF_T
}
#ifdef linux
-# if !defined(IA64)
+# if !defined(IA64) && !defined(HPPA)
int
sys_oldfstat(tcp)
struct tcb *tcp;
}
return 0;
}
-# endif /* !IA64 */
+# endif /* !IA64 && !HPPA*/
#endif
#ifndef HAVE_LONG_LONG_OFF_T
}
#ifdef linux
-# if !defined(IA64)
+# if !defined(IA64) && !defined(HPPA)
int
sys_oldlstat(tcp)
struct tcb *tcp;
}
return 0;
}
-# endif /* !IA64 */
+# endif /* !IA64 && !HPPA */
#endif