home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / linux / backup / star-1.3.1.tar.gz / star-1.3.1.tar / star-1.3.1 / include / statdefs.h < prev    next >
C/C++ Source or Header  |  2001-01-18  |  4KB  |  149 lines

  1. /* @(#)statdefs.h    1.2 01/01/18 Copyright 1998 J. Schilling */
  2. /*
  3.  *    Definitions for stat() file mode
  4.  *
  5.  *    Copyright (c) 1998 J. Schilling
  6.  */
  7. /*
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 2, or (at your option)
  11.  * any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU General Public License
  19.  * along with this program; see the file COPYING.  If not, write to
  20.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23. #ifndef    _STATDEFS_H
  24. #define    _STATDEFS_H
  25.  
  26. #ifndef _MCONFIG_H
  27. #include <mconfig.h>
  28. #endif
  29.  
  30. /*
  31.  * Apollo Domain/OS has a broken sys/stat.h that defines
  32.  * S_IFIFO == S_IFSOCK and creates trouble if the constants
  33.  * are used as case labels.
  34.  */
  35. #if S_IFIFO == S_IFSOCK
  36. #    undef    S_IFSOCK
  37. #endif
  38.  
  39. #ifdef    STAT_MACROS_BROKEN
  40. #undef    S_ISFIFO            /* Named pipe        */
  41. #undef    S_ISCHR                /* Character special    */
  42. #undef    S_ISMPC                /* UNUSED multiplexed c    */
  43. #undef    S_ISDIR                /* Directory        */
  44. #undef    S_ISNAM                /* Named file (XENIX)    */
  45. #undef    S_ISBLK                /* Block special    */
  46. #undef    S_ISMPB                /* UNUSED multiplexed b    */
  47. #undef    S_ISREG                /* Regular file        */
  48. #undef    S_ISCNT                /* Contiguous file    */
  49. #undef    S_ISLNK                /* Symbolic link    */
  50. #undef    S_ISSHAD            /* Solaris shadow inode    */
  51. #undef    S_ISSOCK            /* UNIX domain socket    */
  52. #undef    S_ISDOOR            /* Solaris DOOR        */
  53. #endif
  54.  
  55. #ifndef    S_ISFIFO            /* Named pipe        */
  56. #    ifdef    S_IFIFO
  57. #        define    S_ISFIFO(m)    (((m) & S_IFMT) == S_IFIFO)
  58. #    else
  59. #        define    S_ISFIFO(m)    (0)
  60. #    endif
  61. #endif
  62. #ifndef    S_ISCHR                /* Character special    */
  63. #    ifdef    S_IFCHR
  64. #        define    S_ISCHR(m)    (((m) & S_IFMT) == S_IFCHR)
  65. #    else
  66. #        define    S_ISCHR(m)    (0)
  67. #    endif
  68. #endif
  69. #ifndef    S_ISMPC                /* UNUSED multiplexed c    */
  70. #    ifdef    S_IFMPC
  71. #        define    S_ISMPC(m)    (((m) & S_IFMT) == S_IFMPC)
  72. #    else
  73. #        define    S_ISMPC(m)    (0)
  74. #    endif
  75. #endif
  76. #ifndef    S_ISDIR                /* Directory        */
  77. #    ifdef    S_IFDIR
  78. #        define    S_ISDIR(m)    (((m) & S_IFMT) == S_IFDIR)
  79. #    else
  80. #        define    S_ISDIR(m)    (0)
  81. #    endif
  82. #endif
  83. #ifndef    S_ISNAM                /* Named file (XENIX)    */
  84. #    ifdef    S_IFNAM
  85. #        define    S_ISNAM(m)    (((m) & S_IFMT) == S_IFNAM)
  86. #    else
  87. #        define    S_ISNAM(m)    (0)
  88. #    endif
  89. #endif
  90. #ifndef    S_ISBLK                /* Block special    */
  91. #    ifdef    S_IFBLK
  92. #        define    S_ISBLK(m)    (((m) & S_IFMT) == S_IFBLK)
  93. #    else
  94. #        define    S_ISBLK(m)    (0)
  95. #    endif
  96. #endif
  97. #ifndef    S_ISMPB                /* UNUSED multiplexed b    */
  98. #    ifdef    S_IFMPB
  99. #        define    S_ISMPB(m)    (((m) & S_IFMT) == S_IFMPB)
  100. #    else
  101. #        define    S_ISMPB(m)    (0)
  102. #    endif
  103. #endif
  104. #ifndef    S_ISREG                /* Regular file        */
  105. #    ifdef    S_IFREG
  106. #        define    S_ISREG(m)    (((m) & S_IFMT) == S_IFREG)
  107. #    else
  108. #        define    S_ISREG(m)    (0)
  109. #    endif
  110. #endif
  111. #ifndef    S_ISCNT                /* Contiguous file    */
  112. #    ifdef    S_IFCNT
  113. #        define    S_ISCNT(m)    (((m) & S_IFMT) == S_IFCNT)
  114. #    else
  115. #        define    S_ISCNT(m)    (0)
  116. #    endif
  117. #endif
  118. #ifndef    S_ISLNK                /* Symbolic link    */
  119. #    ifdef    S_IFLNK
  120. #        define    S_ISLNK(m)    (((m) & S_IFMT) == S_IFLNK)
  121. #    else
  122. #        define    S_ISLNK(m)    (0)
  123. #    endif
  124. #endif
  125. #ifndef    S_ISSHAD            /* Solaris shadow inode    */
  126. #    ifdef    S_IFSHAD
  127. #        define    S_ISSHAD(m)    (((m) & S_IFMT) == S_IFSHAD)
  128. #    else
  129. #        define    S_ISSHAD(m)    (0)
  130. #    endif
  131. #endif
  132. #ifndef    S_ISSOCK            /* UNIX domain socket    */
  133. #    ifdef    S_IFSOCK
  134. #        define    S_ISSOCK(m)    (((m) & S_IFMT) == S_IFSOCK)
  135. #    else
  136. #        define    S_ISSOCK(m)    (0)
  137. #    endif
  138. #endif
  139. #ifndef    S_ISDOOR            /* Solaris DOOR        */
  140. #    ifdef    S_IFDOOR
  141. #        define    S_ISDOOR(m)    (((m) & S_IFMT) == S_IFDOOR)
  142. #    else
  143. #        define    S_ISDOOR(m)    (0)
  144. #    endif
  145. #endif
  146.  
  147. #endif    /* _STATDEFS_H */
  148.  
  149.