summaryrefslogtreecommitdiff
path: root/other/openssh-2.1.1p4/next-posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'other/openssh-2.1.1p4/next-posix.h')
-rw-r--r--other/openssh-2.1.1p4/next-posix.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/other/openssh-2.1.1p4/next-posix.h b/other/openssh-2.1.1p4/next-posix.h
new file mode 100644
index 0000000..86683db
--- /dev/null
+++ b/other/openssh-2.1.1p4/next-posix.h
@@ -0,0 +1,58 @@
1/*
2 * Defines and prototypes specific to NeXT system
3 */
4
5#ifndef _NEXT_POSIX_H
6#define _NEXT_POSIX_H
7
8#ifdef HAVE_NEXT
9
10#include <libc.h>
11#include <sys/dir.h>
12
13#define NAME_MAX 255
14struct dirent {
15 off_t d_off;
16 unsigned long d_fileno;
17 unsigned short d_reclen;
18 unsigned short d_namlen;
19 char d_name[NAME_MAX + 1];
20};
21
22struct utimbuf {
23 time_t actime;
24 time_t modtime;
25};
26
27/* FILE */
28#define O_NONBLOCK 00004 /* non-blocking open */
29
30/* WAITPID */
31#undef WIFEXITED
32#undef WIFSTOPPED
33#undef WIFSIGNALED
34
35#define _W_INT(w) (*(int*)&(w)) /* convert union wait to int */
36#define WIFEXITED(w) (!((_W_INT(w)) & 0377))
37#define WIFSTOPPED(w) ((_W_INT(w)) & 0100)
38#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
39#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
40#define WTERMSIG(w) (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
41#define WCOREFLAG 0x80
42#define WCOREDUMP(w) ((_W_INT(w)) & WCOREFLAG)
43
44int waitpid(int pid,int *stat_loc,int options);
45#define getpgrp() getpgrp(0)
46pid_t setsid(void);
47
48/* TC */
49int tcgetattr(int fd,struct termios *t);
50int tcsetattr(int fd,int opt,const struct termios *t);
51int tcsetpgrp(int fd, pid_t pgrp);
52speed_t cfgetospeed(const struct termios *t);
53speed_t cfgetispeed(const struct termios *t);
54int cfsetospeed(struct termios *t,int speed);
55
56
57#endif /* HAVE_NEXT */
58#endif /* _NEXT_POSIX_H */