home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-base.tgz / octave-1.1.1p1-base.tar / fsf / octave / src / statdefs.h < prev    next >
C/C++ Source or Header  |  1995-01-03  |  2KB  |  74 lines

  1. // statdefs.h                                               -*- C++ -*-
  2. /*
  3.  
  4. Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton
  5.  
  6. This file is part of Octave.
  7.  
  8. Octave is free software; you can redistribute it and/or modify it
  9. under the terms of the GNU General Public License as published by the
  10. Free Software Foundation; either version 2, or (at your option) any
  11. later version.
  12.  
  13. Octave is distributed in the hope that it will be useful, but WITHOUT
  14. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16. for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with Octave; see the file COPYING.  If not, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22. */
  23.  
  24. #if !defined (octave_statdefs_h)
  25. #define octave_statdefs_h 1
  26.  
  27. #include <sys/types.h>
  28. #include <sys/stat.h>
  29.  
  30. #ifndef S_ISREG            /* Doesn't have POSIX.1 stat stuff. */
  31. #define mode_t unsigned short
  32. #endif
  33. #if !defined(S_ISBLK) && defined(S_IFBLK)
  34. #define    S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
  35. #endif
  36. #if !defined(S_ISCHR) && defined(S_IFCHR)
  37. #define    S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
  38. #endif
  39. #if !defined(S_ISDIR) && defined(S_IFDIR)
  40. #define    S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
  41. #endif
  42. #if !defined(S_ISREG) && defined(S_IFREG)
  43. #define    S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  44. #endif
  45. #if !defined(S_ISFIFO) && defined(S_IFIFO)
  46. #define    S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
  47. #endif
  48. #if !defined(S_ISLNK) && defined(S_IFLNK)
  49. #define    S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
  50. #endif
  51. #if !defined(S_ISSOCK) && defined(S_IFSOCK)
  52. #define    S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
  53. #endif
  54. #if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
  55. #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
  56. #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
  57. #endif
  58. #if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
  59. #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
  60. #endif
  61.  
  62. #ifndef S_ISLNK
  63. #define lstat stat
  64. #endif
  65.  
  66. #endif
  67.  
  68. /*
  69. ;;; Local Variables: ***
  70. ;;; mode: C++ ***
  71. ;;; page-delimiter: "^/\\*" ***
  72. ;;; End: ***
  73. */
  74.