summaryrefslogtreecommitdiffstats
path: root/contrib/top/os.h
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-03-23 18:51:21 +0000
committerjoerg <joerg@FreeBSD.org>1997-03-23 18:51:21 +0000
commit1b9d0472b72177a604d3c5dd26d25eec00049bd2 (patch)
tree1409de2219944c7c90248988b70ac693cf71206d /contrib/top/os.h
downloadFreeBSD-src-1b9d0472b72177a604d3c5dd26d25eec00049bd2.zip
FreeBSD-src-1b9d0472b72177a604d3c5dd26d25eec00049bd2.tar.gz
This is the long-awaited import of top into the base system (actually,
the src/contrib/top part right now). This tools is simply too system- dependant to maintain it in the ports collection.
Diffstat (limited to 'contrib/top/os.h')
-rw-r--r--contrib/top/os.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/top/os.h b/contrib/top/os.h
new file mode 100644
index 0000000..d25e93e
--- /dev/null
+++ b/contrib/top/os.h
@@ -0,0 +1,29 @@
+#include <sys/types.h>
+#include <sys/param.h> /* This defines BSD */
+#if defined(BSD) && !defined(BSD4_4) && !defined(__osf__)
+# include <stdio.h>
+# include <strings.h>
+# define strchr(a, b) index((a), (b))
+# define strrchr(a, b) rindex((a), (b))
+# define memcpy(a, b, c) bcopy((b), (a), (c))
+# define memzero(a, b) bzero((a), (b))
+# define memcmp(a, b, c) bcmp((a), (b), (c))
+#if defined(NeXT)
+ typedef void sigret_t;
+#else
+ typedef int sigret_t;
+#endif
+
+/* system routines that don't return int */
+char *getenv();
+caddr_t malloc();
+
+#else
+# include <stdio.h>
+# define setbuffer(f, b, s) setvbuf((f), (b), (b) ? _IOFBF : _IONBF, (s))
+# include <string.h>
+# include <memory.h>
+# include <stdlib.h>
+# define memzero(a, b) memset((a), 0, (b))
+ typedef void sigret_t;
+#endif
OpenPOWER on IntegriCloud