1*bc9cc675SDaniel Fojt /* 2*bc9cc675SDaniel Fojt * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved. 3*bc9cc675SDaniel Fojt * 4*bc9cc675SDaniel Fojt * Redistribution and use in source and binary forms, with or without 5*bc9cc675SDaniel Fojt * modification, are permitted provided that the following conditions 6*bc9cc675SDaniel Fojt * are met: 7*bc9cc675SDaniel Fojt * 1. Redistributions of source code must retain the above copyright 8*bc9cc675SDaniel Fojt * notice, this list of conditions and the following disclaimer. 9*bc9cc675SDaniel Fojt * 2. Redistributions in binary form must reproduce the above copyright 10*bc9cc675SDaniel Fojt * notice, this list of conditions and the following disclaimer in the 11*bc9cc675SDaniel Fojt * documentation and/or other materials provided with the distribution. 12*bc9cc675SDaniel Fojt * 13*bc9cc675SDaniel Fojt * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14*bc9cc675SDaniel Fojt * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15*bc9cc675SDaniel Fojt * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16*bc9cc675SDaniel Fojt * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17*bc9cc675SDaniel Fojt * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18*bc9cc675SDaniel Fojt * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19*bc9cc675SDaniel Fojt * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20*bc9cc675SDaniel Fojt * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21*bc9cc675SDaniel Fojt * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22*bc9cc675SDaniel Fojt * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23*bc9cc675SDaniel Fojt * 24*bc9cc675SDaniel Fojt */ 25*bc9cc675SDaniel Fojt 262c0338ffSzrj #ifndef _NEXT_POSIX_H 272c0338ffSzrj #define _NEXT_POSIX_H 282c0338ffSzrj 292c0338ffSzrj #ifdef HAVE_NEXT 30*bc9cc675SDaniel Fojt #include <sys/dir.h> 31*bc9cc675SDaniel Fojt 32*bc9cc675SDaniel Fojt /* NGROUPS_MAX is behind -lposix. Use the BSD version which is NGROUPS */ 33*bc9cc675SDaniel Fojt #undef NGROUPS_MAX 34*bc9cc675SDaniel Fojt #define NGROUPS_MAX NGROUPS 35*bc9cc675SDaniel Fojt 36*bc9cc675SDaniel Fojt /* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */ 37*bc9cc675SDaniel Fojt #define dirent direct 38*bc9cc675SDaniel Fojt 39*bc9cc675SDaniel Fojt /* Swap out NeXT's BSD wait() for a more POSIX compliant one */ 40*bc9cc675SDaniel Fojt pid_t posix_wait(int *); 41*bc9cc675SDaniel Fojt #define wait(a) posix_wait(a) 42*bc9cc675SDaniel Fojt 43*bc9cc675SDaniel Fojt /* #ifdef wrapped functions that need defining for clean compiling */ 44*bc9cc675SDaniel Fojt pid_t getppid(void); 45*bc9cc675SDaniel Fojt void vhangup(void); 46*bc9cc675SDaniel Fojt int innetgr(const char *, const char *, const char *, const char *); 47*bc9cc675SDaniel Fojt 48*bc9cc675SDaniel Fojt /* TERMCAP */ 49*bc9cc675SDaniel Fojt int tcgetattr(int, struct termios *); 50*bc9cc675SDaniel Fojt int tcsetattr(int, int, const struct termios *); 51*bc9cc675SDaniel Fojt int tcsetpgrp(int, pid_t); 52*bc9cc675SDaniel Fojt speed_t cfgetospeed(const struct termios *); 53*bc9cc675SDaniel Fojt speed_t cfgetispeed(const struct termios *); 54*bc9cc675SDaniel Fojt int cfsetospeed(struct termios *, int); 55*bc9cc675SDaniel Fojt int cfsetispeed(struct termios *, int); 562c0338ffSzrj #endif /* HAVE_NEXT */ 572c0338ffSzrj #endif /* _NEXT_POSIX_H */ 58