/*
* Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
+ * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include "defs.h"
-#if defined(HAVE_SYS_STREAM_H) || defined(linux)
+#if defined(HAVE_SYS_STREAM_H) || defined(linux) || defined(FREEBSD)
#if defined(linux)
+#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
+#endif
#define RS_HIPRI 1
struct strbuf {
#else /* linux */
+#ifndef FREEBSD
#include <stropts.h>
#include <poll.h>
#include <sys/conf.h>
#include <sys/stream.h>
#include <sys/tihdr.h>
+#else /* FREEBSD */
+#include <poll.h>
+#endif /* FREEBSD */
#endif /* linux */
#include <sys/timod.h>
#endif /* HAVE_SYS_TIUSER_H */
+#ifndef FREEBSD
static struct xlat msgflags[] = {
{ RS_HIPRI, "RS_HIPRI" },
{ 0, NULL },
if (getting)
tprintf("maxlen=%d, ", sbp->maxlen);
tprintf("len=%d, buf=", sbp->len);
- printstr(tcp, (int) sbp->buf, sbp->len);
+ printstr(tcp, (unsigned long) sbp->buf, sbp->len);
tprintf("}");
}
}
#ifdef HAVE_PUTPMSG
static struct xlat pmsgflags[] = {
+#ifdef MSG_HIPRI
{ MSG_HIPRI, "MSG_HIPRI" },
+#endif
+#ifdef MSG_AND
{ MSG_ANY, "MSG_ANY" },
+#endif
+#ifdef MSG_BAND
{ MSG_BAND, "MSG_BAND" },
+#endif
{ 0, NULL },
};
printstrbufarg(tcp, tcp->u_arg[i], 1);
/* pointer to band */
printnum(tcp, tcp->u_arg[3], "%d");
+ tprintf(", ");
/* pointer to flags */
if (tcp->u_arg[4] == 0)
tprintf("NULL");
}
#endif /* HAVE_PUTPMSG */
+#endif /* !FREEBSD */
+#ifdef HAVE_SYS_POLL_H
+
static struct xlat pollflags[] = {
+#ifdef POLLIN
{ POLLIN, "POLLIN" },
{ POLLPRI, "POLLPRI" },
{ POLLOUT, "POLLOUT" },
{ POLLERR, "POLLERR" },
{ POLLHUP, "POLLHUP" },
{ POLLNVAL, "POLLNVAL" },
+#endif
{ 0, NULL },
};
return 0;
}
-#ifndef linux
+#else /* !HAVE_SYS_POLL_H */
+int
+sys_poll(tcp)
+struct tcb *tcp;
+{
+ return 0;
+}
+#endif
+
+#if !defined(linux) && !defined(FREEBSD)
static struct xlat stream_flush_options[] = {
{ FLUSHR, "FLUSHR" },
}
}
-#endif /* linux */
+#endif /* !linux && !FREEBSD */
-#endif /* LINUXSPARC && linux */
+#endif /* HAVE_SYS_STREAM_H || linux || FREEBSD */