home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / glibc-1.06 / sysdeps / unix / ioctls-tmpl.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-06  |  2.0 KB  |  92 lines

  1. #include <sys/types.h>
  2. #include <sys/param.h>
  3.  
  4. /* On SunOS 4.1, <sys/ioctl.h> and <sys/termios.h> define some symbols
  5.    with different values, but <sys/termios.h> defines some ioctl symbols
  6.    not in <sys/ioctl.h>, so we need it.  Our <sys/ioctl.h> should define
  7.    them with the values from Sun's <sys/ioctl.h>, not <sys/termios.h>.
  8.    So we include <sys/termios.h> and let <sys/ioctl.h> redefine things.
  9.    This produces some spurious warnings.  */
  10.  
  11. #ifdef HAVE_SYS_TERMIOS_H
  12. #include <sys/termios.h>
  13. #endif
  14.  
  15. #include <sys/ioctl.h>
  16.  
  17. #ifdef    SIOCGIFCONF
  18. #include <sys/socket.h>
  19. #include <sys/time.h>
  20. #include <net/if.h>
  21. #include <net/route.h>
  22. #if    defined(SIOCGARP) && !defined(ARPOP_REQUEST)
  23. #include <net/if_arp.h>
  24. #endif
  25. #ifdef    SIOCGNIT
  26. #include <net/nit.h>
  27. #endif
  28. #endif
  29.  
  30. /* These exist on Sequents.  */
  31. #ifdef SMIOSTATS
  32. #include <sec/sec.h>
  33. #include <sec/sm.h>
  34. #endif
  35. #ifdef SMIOGETREBOOT0
  36. #include <i386/cfg.h>
  37. #endif
  38. #ifdef ZIOCBCMD
  39. #include <zdc/zdc.h>
  40. #endif
  41.  
  42. /* These exist under Ultrix, but I figured there may be others.  */
  43. #ifdef DIOCGETPT
  44. #include <ufs/fs.h>           /* for DIOC* */
  45. #endif
  46. #ifdef DEVGETGEOM
  47. #include <sys/devio.h>
  48. #endif
  49.  
  50. #ifdef ultrix
  51. /* Ultrix has a conditional include that brings these in; we have to force
  52.    their inclusion when we actually compile them.  */
  53. #undef TCGETA
  54. #undef TCSETA
  55. #undef TCSETAW
  56. #undef TCSETAF
  57. #undef TCGETP
  58. #undef TCSANOW
  59. #undef TCSADRAIN
  60. #undef TCSAFLUSH
  61. #ifdef ELSETPID
  62. #include <sys/un.h> /* get sockaddr_un for elcsd.h */
  63. #include <elcsd.h>
  64. #endif
  65. #ifdef DKIOCDOP
  66. #include <sys/dkio.h>
  67. #endif
  68. /* Couldn't find the header where the structures used by these are
  69.    defined; it looks like an unbundled LAT package or something.  */
  70. #undef LIOCSOL
  71. #undef LIOCRES
  72. #undef LIOCCMD
  73. #undef LIOCINI
  74. #undef LIOCTTYI
  75. #undef LIOCCONN
  76. /* struct mtop hasn't been in sys/mtio.h since 4.1 */
  77. #undef MTIOCTOP
  78. #undef MTIOCGET
  79. #endif
  80.  
  81. #define    DEFINE(name, value) \
  82.   printf("#define %s 0x%.8x\n", (name), (value))
  83.  
  84. int
  85. main()
  86. {
  87.   REQUESTS
  88.  
  89.   exit(0);
  90.   return 0;
  91. }
  92.