blob: ca5b4b54a439508b786f32ba84a63f3d6a91039f [file] [log] [blame]
Ben Lindstrom515d0f92003-08-29 16:59:52 +00001/* $Id: bsd-nextstep.h,v 1.9 2003/08/29 16:59:52 mouring Exp $ */
2
Damien Miller0f91b4e2000-06-18 15:43:25 +10003/*
Ben Lindstromb4967c32003-06-01 03:23:57 +00004 * Copyright (c) 2000,2001 Ben Lindstrom. All rights reserved.
5 *
Damien Miller3dfb0dd2000-09-30 09:49:08 +11006 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
Damien Miller0f91b4e2000-06-18 15:43:25 +100026 */
27
28#ifndef _NEXT_POSIX_H
29#define _NEXT_POSIX_H
30
31#ifdef HAVE_NEXT
Damien Miller0f91b4e2000-06-18 15:43:25 +100032#include <sys/dir.h>
33
Ben Lindstrom6cabb6f2001-03-19 03:01:56 +000034/* NGROUPS_MAX is behind -lposix. Use the BSD version which is NGROUPS */
Ben Lindstromaad56ce2001-03-19 13:42:21 +000035#undef NGROUPS_MAX
Ben Lindstrom6cabb6f2001-03-19 03:01:56 +000036#define NGROUPS_MAX NGROUPS
37
Ben Lindstrom2791cd52000-10-30 05:33:55 +000038/* NeXT's readdir() is BSD (struct direct) not POSIX (struct dirent) */
Damien Miller72c9a7e2000-09-24 11:10:13 +110039#define dirent direct
Damien Miller99bca602000-07-11 12:02:36 +100040
Ben Lindstrom2791cd52000-10-30 05:33:55 +000041/* Swap out NeXT's BSD wait() for a more POSIX complient one */
Damien Miller31741252003-05-19 00:13:38 +100042pid_t posix_wait(int *);
Damien Miller3dfb0dd2000-09-30 09:49:08 +110043#define wait(a) posix_wait(a)
Damien Miller77aba9d2000-08-30 10:11:30 +110044
Ben Lindstromd121f612000-12-03 17:00:47 +000045/* #ifdef wrapped functions that need defining for clean compiling */
Ben Lindstrom2ed98182000-11-06 07:15:43 +000046pid_t getppid(void);
Ben Lindstrom305fb002000-11-10 02:41:30 +000047void vhangup(void);
Damien Miller31741252003-05-19 00:13:38 +100048int innetgr(const char *, const char *, const char *, const char *);
Ben Lindstrom2ed98182000-11-06 07:15:43 +000049
Damien Miller72c9a7e2000-09-24 11:10:13 +110050/* TERMCAP */
Damien Miller31741252003-05-19 00:13:38 +100051int tcgetattr(int, struct termios *);
52int tcsetattr(int, int, const struct termios *);
53int tcsetpgrp(int, pid_t);
54speed_t cfgetospeed(const struct termios *);
55speed_t cfgetispeed(const struct termios *);
56int cfsetospeed(struct termios *, int);
57int cfsetispeed(struct termios *, int);
Damien Miller0f91b4e2000-06-18 15:43:25 +100058#endif /* HAVE_NEXT */
Damien Miller0f91b4e2000-06-18 15:43:25 +100059#endif /* _NEXT_POSIX_H */