stropts.h 2.7 KB

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