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