1*ce099b40Smartin /* $NetBSD: posix_openpt.c,v 1.2 2008/04/28 20:23:00 martin Exp $ */
2892ad9caSchristos
3892ad9caSchristos /*-
4892ad9caSchristos * Copyright (c) 2004 The NetBSD Foundation, Inc.
5892ad9caSchristos * All rights reserved.
6892ad9caSchristos *
7892ad9caSchristos * This code is derived from software contributed to The NetBSD Foundation
8892ad9caSchristos * by Christos Zoulas.
9892ad9caSchristos *
10892ad9caSchristos * Redistribution and use in source and binary forms, with or without
11892ad9caSchristos * modification, are permitted provided that the following conditions
12892ad9caSchristos * are met:
13892ad9caSchristos * 1. Redistributions of source code must retain the above copyright
14892ad9caSchristos * notice, this list of conditions and the following disclaimer.
15892ad9caSchristos * 2. Redistributions in binary form must reproduce the above copyright
16892ad9caSchristos * notice, this list of conditions and the following disclaimer in the
17892ad9caSchristos * documentation and/or other materials provided with the distribution.
18892ad9caSchristos *
19892ad9caSchristos * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20892ad9caSchristos * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21892ad9caSchristos * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22892ad9caSchristos * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23892ad9caSchristos * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24892ad9caSchristos * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25892ad9caSchristos * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26892ad9caSchristos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27892ad9caSchristos * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28892ad9caSchristos * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29892ad9caSchristos * POSSIBILITY OF SUCH DAMAGE.
30892ad9caSchristos */
31892ad9caSchristos
32892ad9caSchristos #include <sys/cdefs.h>
33892ad9caSchristos #if defined(LIBC_SCCS) && !defined(lint)
34*ce099b40Smartin __RCSID("$NetBSD: posix_openpt.c,v 1.2 2008/04/28 20:23:00 martin Exp $");
35892ad9caSchristos #endif /* LIBC_SCCS and not lint */
36892ad9caSchristos
37892ad9caSchristos #include "namespace.h"
38892ad9caSchristos #include <fcntl.h>
39892ad9caSchristos #include <stdlib.h>
40892ad9caSchristos
41892ad9caSchristos int
posix_openpt(int oflag)42892ad9caSchristos posix_openpt(int oflag)
43892ad9caSchristos {
44892ad9caSchristos
45892ad9caSchristos return open("/dev/ptmx", oflag);
46892ad9caSchristos }
47