]> git.ipfire.org Git - thirdparty/glibc.git/blame - streams/stropts.h
Use <> for include of kernel-features.h.
[thirdparty/glibc.git] / streams / stropts.h
CommitLineData
a784e502 1/* Copyright (C) 1998-2000, 2002, 2003, 2012 Free Software Foundation, Inc.
af69217f
UD
2 This file is part of the GNU C Library.
3
4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
af69217f
UD
8
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
af69217f 13
41bdb6e2
AJ
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, write to the Free
16 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 02111-1307 USA. */
af69217f
UD
18
19#ifndef _STROPTS_H
20#define _STROPTS_H 1
21
22#include <features.h>
23#include <bits/types.h>
b02c687f 24#include <bits/xtitypes.h>
af69217f 25
bba09d23
UD
26#ifndef __gid_t_defined
27typedef __gid_t gid_t;
28# define __gid_t_defined
29#endif
30
31#ifndef __uid_t_defined
32typedef __uid_t uid_t;
33# define __uid_t_defined
34#endif
35
36typedef __t_uscalar_t t_uscalar_t;
37
af69217f
UD
38/* Get system specific contants. */
39#include <bits/stropts.h>
40
41
42__BEGIN_DECLS
43
44/* Test whether FILDES is associated with a STREAM-based file. */
c1422e5b 45extern int isastream (int __fildes) __THROW;
af69217f 46
2c008571
UD
47/* Receive next message from a STREAMS file.
48
49 This function is a cancellation point and therefore not marked with
50 __THROW. */
98cbe360
UD
51extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
52 struct strbuf *__restrict __dataptr,
2c008571 53 int *__restrict __flagsp);
af69217f
UD
54
55/* Receive next message from a STREAMS file, with *FLAGSP allowing to
2c008571
UD
56 control which message.
57
58 This function is a cancellation point and therefore not marked with
59 __THROW. */
98cbe360
UD
60extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
61 struct strbuf *__restrict __dataptr,
2c008571 62 int *__restrict __bandp, int *__restrict __flagsp);
af69217f
UD
63
64/* Perform the I/O control operation specified by REQUEST on FD.
65 One argument may follow; its presence and type depend on REQUEST.
66 Return value depends on REQUEST. Usually -1 indicates error. */
c1422e5b 67extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
af69217f 68
2c008571
UD
69/* Send a message on a STREAM.
70
71 This function is a cancellation point and therefore not marked with
72 __THROW. */
a784e502
UD
73extern int putmsg (int __fildes, const struct strbuf *__ctlptr,
74 const struct strbuf *__dataptr, int __flags);
2c008571
UD
75
76/* Send a message on a STREAM to the BAND.
af69217f 77
2c008571
UD
78 This function is a cancellation point and therefore not marked with
79 __THROW. */
a784e502
UD
80extern int putpmsg (int __fildes, const struct strbuf *__ctlptr,
81 const struct strbuf *__dataptr, int __band, int __flags);
af69217f
UD
82
83/* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
84 file system name space. */
a784e502 85extern int fattach (int __fildes, const char *__path) __THROW;
af69217f
UD
86
87/* Detach a name PATH from a STREAMS-based file descriptor. */
a784e502 88extern int fdetach (const char *__path) __THROW;
af69217f
UD
89
90__END_DECLS
91
92#endif /* stropts.h */