home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fs.zip / octave / kpathsea / c-stat.h < prev    next >
C/C++ Source or Header  |  2000-01-15  |  2KB  |  61 lines

  1. /* c-stat.h: declarations for using stat(2).
  2.  
  3. Copyright (C) 1993, 96 Free Software Foundation, Inc.
  4.  
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Library General Public
  7. License as published by the Free Software Foundation; either
  8. version 2 of the License, or (at your option) any later version.
  9.  
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. Library General Public License for more details.
  14.  
  15. You should have received a copy of the GNU Library General Public
  16. License along with this library; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
  18.  
  19. #ifndef KPATHSEA_STAT_H
  20. #define KPATHSEA_STAT_H
  21.  
  22. #include <kpathsea/systypes.h>
  23. #include <sys/stat.h>
  24.  
  25. #ifdef WIN32
  26. #include <kpathsea/win32lib.h>
  27. #endif /* WIN32 */
  28.  
  29. /* POSIX predicates for testing file attributes.  */
  30.  
  31. #if !defined (S_ISBLK) && defined (S_IFBLK)
  32. #define    S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
  33. #endif
  34. #if !defined (S_ISCHR) && defined (S_IFCHR)
  35. #define    S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
  36. #endif
  37. #if !defined (S_ISDIR) && defined (S_IFDIR)
  38. #define    S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  39. #endif
  40. #if !defined (S_ISREG) && defined (S_IFREG)
  41. #define    S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  42. #endif
  43. #if !defined (S_ISFIFO) && defined (S_IFIFO)
  44. #define    S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
  45. #endif
  46. #if !defined (S_ISLNK) && defined (S_IFLNK)
  47. #define    S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
  48. #endif
  49. #if !defined (S_ISSOCK) && defined (S_IFSOCK)
  50. #define    S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
  51. #endif
  52. #if !defined (S_ISMPB) && defined (S_IFMPB) /* V7 */
  53. #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
  54. #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
  55. #endif
  56. #if !defined (S_ISNWK) && defined (S_IFNWK) /* HP/UX */
  57. #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
  58. #endif
  59.  
  60. #endif /* not KPATHSEA_STAT_H */
  61.