s390: Update ulps
[glibc.git] / posix / streams-compat.c
blob8a37bb1778f95fc3311694f151e3f1b2f778ab76
1 /* Compatibility symbols for the unimplemented XSI STREAMS extension.
2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <https://www.gnu.org/licenses/>. */
19 #include <shlib-compat.h>
21 #if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_30)
23 # include <errno.h>
24 # include <fcntl.h>
26 struct strbuf;
28 int
29 attribute_compat_text_section
30 fattach (int fildes, const char *path)
32 __set_errno (ENOSYS);
33 return -1;
35 compat_symbol (libc, fattach, fattach, GLIBC_2_1);
37 int
38 attribute_compat_text_section
39 fdetach (const char *path)
41 __set_errno (ENOSYS);
42 return -1;
44 compat_symbol (libc, fdetach, fdetach, GLIBC_2_1);
47 int
48 attribute_compat_text_section
49 getmsg (int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *flagsp)
51 __set_errno (ENOSYS);
52 return -1;
54 compat_symbol (libc, getmsg, getmsg, GLIBC_2_1);
56 int
57 attribute_compat_text_section
58 getpmsg (int fildes, struct strbuf *ctlptr, struct strbuf *dataptr, int *bandp,
59 int *flagsp)
61 __set_errno (ENOSYS);
62 return -1;
64 compat_symbol (libc, getpmsg, getpmsg, GLIBC_2_1);
66 int
67 attribute_compat_text_section
68 isastream (int fildes)
70 /* In general we do not have a STREAMS implementation and therefore
71 return 0. But for invalid file descriptors we have to return an
72 error. */
73 if (__fcntl (fildes, F_GETFD) < 0)
74 return -1;
76 /* No STREAM. */
77 return 0;
79 compat_symbol (libc, isastream, isastream, GLIBC_2_1);
81 int
82 attribute_compat_text_section
83 putmsg (int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr,
84 int flags)
86 __set_errno (ENOSYS);
87 return -1;
89 compat_symbol (libc, putmsg, putmsg, GLIBC_2_1);
91 int
92 attribute_compat_text_section
93 putpmsg (int fildes, const struct strbuf *ctlptr, const struct strbuf *dataptr,
94 int band, int flags)
96 __set_errno (ENOSYS);
97 return -1;
99 compat_symbol (libc, putpmsg, putpmsg, GLIBC_2_1);
101 #endif /* SHLIB_COMPAT */