]>
Commit | Line | Data |
---|---|---|
bba09d23 | 1 | /* Copyright (C) 1998, 1999, 2000 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> | |
24 | ||
bba09d23 UD |
25 | #ifndef __gid_t_defined |
26 | typedef __gid_t gid_t; | |
27 | # define __gid_t_defined | |
28 | #endif | |
29 | ||
30 | #ifndef __uid_t_defined | |
31 | typedef __uid_t uid_t; | |
32 | # define __uid_t_defined | |
33 | #endif | |
34 | ||
35 | typedef __t_uscalar_t t_uscalar_t; | |
36 | ||
af69217f UD |
37 | /* Get system specific contants. */ |
38 | #include <bits/stropts.h> | |
39 | ||
40 | ||
41 | __BEGIN_DECLS | |
42 | ||
43 | /* Test whether FILDES is associated with a STREAM-based file. */ | |
c1422e5b | 44 | extern int isastream (int __fildes) __THROW; |
af69217f UD |
45 | |
46 | /* Receive next message from a STREAMS file. */ | |
98cbe360 UD |
47 | extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr, |
48 | struct strbuf *__restrict __dataptr, | |
49 | int *__restrict __flagsp) __THROW; | |
af69217f UD |
50 | |
51 | /* Receive next message from a STREAMS file, with *FLAGSP allowing to | |
52 | control which message. */ | |
98cbe360 UD |
53 | extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr, |
54 | struct strbuf *__restrict __dataptr, | |
55 | int *__restrict __bandp, int *__restrict __flagsp) | |
c1422e5b | 56 | __THROW; |
af69217f UD |
57 | |
58 | /* Perform the I/O control operation specified by REQUEST on FD. | |
59 | One argument may follow; its presence and type depend on REQUEST. | |
60 | Return value depends on REQUEST. Usually -1 indicates error. */ | |
c1422e5b | 61 | extern int ioctl (int __fd, unsigned long int __request, ...) __THROW; |
af69217f UD |
62 | |
63 | /* Send a message on a STREAM. */ | |
c1422e5b UD |
64 | extern int putmsg (int __fildes, __const struct strbuf *__ctlptr, |
65 | __const struct strbuf *__dataptr, int __flags) __THROW; | |
af69217f UD |
66 | |
67 | /* Send a message on a STREAM to the BAND. */ | |
c1422e5b UD |
68 | extern int putpmsg (int __fildes, __const struct strbuf *__ctlptr, |
69 | __const struct strbuf *__dataptr, int __band, int __flags) | |
70 | __THROW; | |
af69217f UD |
71 | |
72 | /* Attach a STREAMS-based file descriptor FILDES to a file PATH in the | |
73 | file system name space. */ | |
c1422e5b | 74 | extern int fattach (int __fildes, __const char *__path) __THROW; |
af69217f UD |
75 | |
76 | /* Detach a name PATH from a STREAMS-based file descriptor. */ | |
c1422e5b | 77 | extern int fdetach (__const char *__path) __THROW; |
af69217f UD |
78 | |
79 | __END_DECLS | |
80 | ||
81 | #endif /* stropts.h */ |