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