home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / g++ / sys / stat.h < prev    next >
C/C++ Source or Header  |  1993-06-29  |  1KB  |  48 lines

  1. #ifndef __libgxx_sys_stat_h
  2.  
  3. extern "C"
  4. {
  5. #ifdef __sys_stat_h_recursive
  6. #include_next <sys/stat.h>
  7. #else
  8. #define __sys_stat_h_recursive
  9. #include <_G_config.h>
  10. #define chmod __hide_chmod
  11. #ifdef VMS
  12. #include "GNU_CC_INCLUDE:[sys]stat.h"
  13. #else
  14. #include_next <sys/stat.h>
  15. #endif
  16. #undef chmod
  17.  
  18. #define __libgxx_sys_stat_h 1
  19.  
  20. extern int       chmod  _G_ARGS((const char*, _G_mode_t));
  21. extern int       stat _G_ARGS((const char *path, struct stat *buf));
  22. extern int       lstat _G_ARGS((const char *path, struct stat *buf));
  23. extern int       fstat _G_ARGS((int fd, struct stat *buf));
  24.  
  25. #ifndef S_ISDIR
  26. #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
  27. #endif
  28. #ifndef S_ISBLK
  29. #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
  30. #endif
  31. #ifndef S_ISCHR
  32. #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)
  33. #endif
  34. #ifndef S_ISFIFO
  35. #define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFFIFO)
  36. #endif
  37. #ifndef S_ISREG
  38. #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
  39. #endif
  40. #if !defined(S_ISLNK) && defined(S_IFLNK)
  41. #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
  42. #endif
  43.  
  44. #endif
  45. }
  46.  
  47. #endif
  48.