stropts.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. /* uClibc does not provide _any_ support for STREAMS. So this header file is
  16. * here for applications that foolishly include stropts.h but do not use it...
  17. * Any application that actually _uses_ stropts.h needs to be fixed.
  18. */
  19. #if 0
  20. #ifndef _STROPTS_H
  21. #define _STROPTS_H 1
  22. #include <features.h>
  23. #include <bits/types.h>
  24. #ifndef __gid_t_defined
  25. typedef __gid_t gid_t;
  26. # define __gid_t_defined
  27. #endif
  28. #ifndef __uid_t_defined
  29. typedef __uid_t uid_t;
  30. # define __uid_t_defined
  31. #endif
  32. typedef __t_uscalar_t t_uscalar_t;
  33. /* Get system specific contants. */
  34. #include <bits/stropts.h>
  35. __BEGIN_DECLS
  36. /* Test whether FILDES is associated with a STREAM-based file. */
  37. extern int isastream (int __fildes) __THROW;
  38. /* Receive next message from a STREAMS file. */
  39. extern int getmsg (int __fildes, struct strbuf *__restrict __ctlptr,
  40. struct strbuf *__restrict __dataptr,
  41. int *__restrict __flagsp) __THROW;
  42. /* Receive next message from a STREAMS file, with *FLAGSP allowing to
  43. control which message. */
  44. extern int getpmsg (int __fildes, struct strbuf *__restrict __ctlptr,
  45. struct strbuf *__restrict __dataptr,
  46. int *__restrict __bandp, int *__restrict __flagsp)
  47. __THROW;
  48. /* Perform the I/O control operation specified by REQUEST on FD.
  49. One argument may follow; its presence and type depend on REQUEST.
  50. Return value depends on REQUEST. Usually -1 indicates error. */
  51. extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;
  52. /* Send a message on a STREAM. */
  53. extern int putmsg (int __fildes, __const struct strbuf *__ctlptr,
  54. __const struct strbuf *__dataptr, int __flags) __THROW;
  55. /* Send a message on a STREAM to the BAND. */
  56. extern int putpmsg (int __fildes, __const struct strbuf *__ctlptr,
  57. __const struct strbuf *__dataptr, int __band, int __flags)
  58. __THROW;
  59. /* Attach a STREAMS-based file descriptor FILDES to a file PATH in the
  60. file system name space. */
  61. extern int fattach (int __fildes, __const char *__path) __THROW;
  62. /* Detach a name PATH from a STREAMS-based file descriptor. */
  63. extern int fdetach (__const char *__path) __THROW;
  64. __END_DECLS
  65. #endif /* stropts.h */
  66. #endif /* if 0 */