198937Sdes/*
2124208Sdes * Copyright (c) 2000,2001 Ben Lindstrom.  All rights reserved.
3124208Sdes *
498937Sdes * Redistribution and use in source and binary forms, with or without
598937Sdes * modification, are permitted provided that the following conditions
698937Sdes * are met:
798937Sdes * 1. Redistributions of source code must retain the above copyright
898937Sdes *    notice, this list of conditions and the following disclaimer.
998937Sdes * 2. Redistributions in binary form must reproduce the above copyright
1098937Sdes *    notice, this list of conditions and the following disclaimer in the
1198937Sdes *    documentation and/or other materials provided with the distribution.
1298937Sdes *
1398937Sdes * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1498937Sdes * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1598937Sdes * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1698937Sdes * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1798937Sdes * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
1898937Sdes * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1998937Sdes * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2098937Sdes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2198937Sdes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2298937Sdes * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2398937Sdes *
2498937Sdes */
2598937Sdes
2698937Sdes#ifndef _NEXT_POSIX_H
2798937Sdes#define _NEXT_POSIX_H
2898937Sdes
2998937Sdes#ifdef HAVE_NEXT
3098937Sdes#include <sys/dir.h>
3198937Sdes
3298937Sdes/* NGROUPS_MAX is behind -lposix.  Use the BSD version which is NGROUPS */
3398937Sdes#undef NGROUPS_MAX
3498937Sdes#define NGROUPS_MAX NGROUPS
3598937Sdes
3698937Sdes/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
3798937Sdes#define dirent direct
3898937Sdes
3998937Sdes/* Swap out NeXT's BSD wait() for a more POSIX complient one */
40124208Sdespid_t posix_wait(int *);
4198937Sdes#define wait(a) posix_wait(a)
4298937Sdes
4398937Sdes/* #ifdef wrapped functions that need defining for clean compiling */
4498937Sdespid_t getppid(void);
4598937Sdesvoid vhangup(void);
46124208Sdesint innetgr(const char *, const char *, const char *, const char *);
4798937Sdes
4898937Sdes/* TERMCAP */
49124208Sdesint tcgetattr(int, struct termios *);
50124208Sdesint tcsetattr(int, int, const struct termios *);
51124208Sdesint tcsetpgrp(int, pid_t);
52124208Sdesspeed_t cfgetospeed(const struct termios *);
53124208Sdesspeed_t cfgetispeed(const struct termios *);
54124208Sdesint cfsetospeed(struct termios *, int);
55124208Sdesint cfsetispeed(struct termios *, int);
5698937Sdes#endif /* HAVE_NEXT */
5798937Sdes#endif /* _NEXT_POSIX_H */
58