home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / id-utils-3.2-src.tgz / tar.out / fsf / id-utils / lib / xsysstat.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  2KB  |  71 lines

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