]> andersk Git - openssh.git/blob - next-posix.h
- (djm) Shadow expiry check fix from Pavel Troller <patrol@omni.sinus.cz>
[openssh.git] / next-posix.h
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 /* readdir() returns struct direct (BSD) not struct dirent (POSIX) */
14 #define dirent direct                                                
15
16 /* POSIX utime() struct */
17 struct utimbuf {
18         time_t  actime;
19         time_t  modtime;
20 };
21
22 /* FILE */
23 #define O_NONBLOCK      00004   /* non-blocking open */
24
25 /* WAITPID */
26 #undef WIFEXITED
27 #undef WIFSTOPPED
28 #undef WIFSIGNALED
29
30 #define WIFEXITED(w)    (!((w) & 0377))
31 #define WIFSTOPPED(w)   ((w) & 0100)
32 #define WIFSIGNALED(w)  (!WIFEXITED(w) && !WIFSTOPPED(w))
33 #define WEXITSTATUS(w)  (int)(WIFEXITED(w) ? ((w >> 8) & 0377) : -1)
34 #define WTERMSIG(w)     (int)(WIFSIGNALED(w) ? (w & 0177) : -1)
35 #define WCOREFLAG       0x80
36 #define WCOREDUMP(w)    ((w) & WCOREFLAG)
37
38 /* POSIX "wrapper" functions to replace to BSD functions */
39 int posix_utime(char *filename, struct utimbuf *buf);   /* new utime() */
40 #define utime posix_utime
41
42 pid_t posix_wait(int *status);                          /* new wait() */
43 #define wait posix_wait 
44
45 /* MISC functions */
46 int waitpid(int pid,int *stat_loc,int options);
47 pid_t setsid(void);
48
49 /* TC */
50 int tcgetattr(int fd,struct termios *t);
51 int tcsetattr(int fd,int opt,const struct termios *t);
52 int tcsetpgrp(int fd, pid_t pgrp);
53 speed_t cfgetospeed(const struct termios *t);
54 speed_t cfgetispeed(const struct termios *t);
55 int cfsetospeed(struct termios *t,int speed);
56
57
58 #endif /* HAVE_NEXT */
59 #endif /* _NEXT_POSIX_H */
This page took 0.068207 seconds and 5 git commands to generate.