glibcstat.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public License as
  5. published by the Free Software Foundation; either version 2 of the
  6. License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public
  12. License along with the GNU C Library; see the file COPYING.LIB. If not,
  13. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. Boston, MA 02111-1307, USA. */
  15. #ifndef _GLIBCSTAT_H
  16. #define _GLIBCSTAT_H 1
  17. /* Versions of the `struct stat' data structure. */
  18. #define _STAT_VER_LINUX_OLD 1
  19. #define _STAT_VER_SVR4 2
  20. #define _STAT_VER_LINUX 3
  21. #define _STAT_VER _STAT_VER_LINUX /* The one defined below. */
  22. /* Versions of the `xmknod' interface. */
  23. #define _MKNOD_VER_LINUX 1
  24. #define _MKNOD_VER_SVR4 2
  25. #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */
  26. typedef unsigned long long int __glibc_dev_t;
  27. typedef unsigned long int __glibc_ino_t;
  28. typedef unsigned int __glibc_mode_t;
  29. typedef unsigned int __glibc_nlink_t;
  30. typedef unsigned int __glibc_uid_t;
  31. typedef unsigned int __glibc_gid_t;
  32. typedef long int __glibc_off_t;
  33. typedef long int __glibc_time_t;
  34. struct glibcstat
  35. {
  36. __glibc_dev_t st_dev; /* Device. */
  37. unsigned short int __pad1;
  38. __glibc_ino_t st_ino; /* File serial number. */
  39. __glibc_mode_t st_mode; /* File mode. */
  40. __glibc_nlink_t st_nlink; /* Link count. */
  41. __glibc_uid_t st_uid; /* User ID of the file's owner. */
  42. __glibc_gid_t st_gid; /* Group ID of the file's group.*/
  43. __glibc_dev_t st_rdev; /* Device number, if device. */
  44. unsigned short int __pad2;
  45. __glibc_off_t st_size; /* Size of file, in bytes. */
  46. unsigned long int st_blksize; /* Optimal block size for I/O. */
  47. #define _STATBUF_ST_BLKSIZE /* Tell code we have this member. */
  48. unsigned long int st_blocks; /* Number of 512-byte blocks allocated. */
  49. __glibc_time_t st_atime; /* Time of last access. */
  50. unsigned long int __unused1;
  51. __glibc_time_t st_mtime; /* Time of last modification. */
  52. unsigned long int __unused2;
  53. __glibc_time_t st_ctime; /* Time of last status change. */
  54. unsigned long int __unused3;
  55. unsigned long int __unused4;
  56. unsigned long int __unused5;
  57. };
  58. #endif /* glibcstat.h */