/project/jni/sndfile/src/sf_unistd.h

https://github.com/aichunyu/FFPlayer · C Header · 63 lines · 26 code · 11 blank · 26 comment · 2 complexity · 2e49a989c5c4538940960c7353a14bbf MD5 · raw file

  1. /*
  2. ** Copyright (C) 2002-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
  3. **
  4. ** This program is free software; you can redistribute it and/or modify
  5. ** it under the terms of the GNU Lesser General Public License as published by
  6. ** the Free Software Foundation; either version 2.1 of the License, or
  7. ** (at your option) 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 Lesser General Public License for more details.
  13. **
  14. ** You should have received a copy of the GNU Lesser 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. /* Some defines that microsoft 'forgot' to implement. */
  19. #ifndef S_IRWXU
  20. #define S_IRWXU 0000700 /* rwx, owner */
  21. #endif
  22. #ifndef S_IRUSR
  23. #define S_IRUSR 0000400 /* read permission, owner */
  24. #endif
  25. #ifndef S_IWUSR
  26. #define S_IWUSR 0000200 /* write permission, owner */
  27. #endif
  28. #ifndef S_IXUSR
  29. #define S_IXUSR 0000100 /* execute/search permission, owner */
  30. #endif
  31. /* Windows doesn't have group permissions so set all these to zero. */
  32. #define S_IRWXG 0 /* rwx, group */
  33. #define S_IRGRP 0 /* read permission, group */
  34. #define S_IWGRP 0 /* write permission, grougroup */
  35. #define S_IXGRP 0 /* execute/search permission, group */
  36. /* Windows doesn't have others permissions so set all these to zero. */
  37. #define S_IRWXO 0 /* rwx, other */
  38. #define S_IROTH 0 /* read permission, other */
  39. #define S_IWOTH 0 /* write permission, other */
  40. #define S_IXOTH 0 /* execute/search permission, other */
  41. #ifndef S_ISFIFO
  42. #define S_ISFIFO(mode) (((mode) & _S_IFMT) == _S_IFIFO)
  43. #endif
  44. #ifndef S_ISREG
  45. #define S_ISREG(mode) (((mode) & _S_IFREG) == _S_IFREG)
  46. #endif
  47. /*
  48. ** Don't know if these are still needed.
  49. **
  50. ** #define _IFMT _S_IFMT
  51. ** #define _IFREG _S_IFREG
  52. */