x86-64: Optimize strlen/strnlen/wcslen/wcsnlen with AVX2
[glibc.git] / streams / stropts.h
blobb66ba0246757f15896394449c3b2bb515b9e43e9
1 /* Copyright (C) 1998-2017 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
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.
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
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
18 #ifndef _STROPTS_H
19 #define _STROPTS_H 1
21 #include <features.h>
22 #include <bits/types.h>
23 #include <bits/xtitypes.h>
25 #ifndef __gid_t_defined
26 typedef __gid_t gid_t;
27 # define __gid_t_defined
28 #endif
30 #ifndef __uid_t_defined
31 typedef __uid_t uid_t;
32 # define __uid_t_defined
33 #endif
35 typedef __t_scalar_t t_scalar_t;
36 typedef __t_uscalar_t t_uscalar_t;
38 /* Get system specific constants. */
39 #include <bits/stropts.h>
42 __BEGIN_DECLS
44 /* Test whether FILDES is associated with a STREAM-based file. */
45 extern int isastream (int __fildes) __THROW;
47 /* Receive next message from a STREAMS file.
49 This function is a cancellation point and therefore not marked with
50 __THROW. */
51 extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
52 struct strbuf *__restrict __dataptr,
53 int *__restrict __flagsp);
55 /* Receive next message from a STREAMS file, with *FLAGSP allowing to
56 control which message.
58 This function is a cancellation point and therefore not marked with
59 __THROW. */
60 extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
61 struct strbuf *__restrict __dataptr,
62 int *__restrict __bandp, int *__restrict __flagsp);
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. */
67 extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
69 /* Send a message on a STREAM.
71 This function is a cancellation point and therefore not marked with
72 __THROW. */
73 extern int putmsg (int __fildes, const struct strbuf *__ctlptr,
74 const struct strbuf *__dataptr, int __flags);
76 /* Send a message on a STREAM to the BAND.
78 This function is a cancellation point and therefore not marked with
79 __THROW. */
80 extern int putpmsg (int __fildes, const struct strbuf *__ctlptr,
81 const struct strbuf *__dataptr, int __band, int __flags);
83 /* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
84 file system name space. */
85 extern int fattach (int __fildes, const char *__path) __THROW;
87 /* Detach a name PATH from a STREAMS-based file descriptor. */
88 extern int fdetach (const char *__path) __THROW;
90 __END_DECLS
92 #endif /* stropts.h */