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