����14-34 linux/include/sys/types.h


  1 #ifndef _SYS_TYPES_H

  2 #define _SYS_TYPES_H

  3

  4 #ifndef _SIZE_T

  5 #define _SIZE_T

  6 typedef unsigned int size_t;        // ���ڶ���Ĵ�С�����ȣ���

  7 #endif

  8

  9 #ifndef _TIME_T

 10 #define _TIME_T

 11 typedef long time_t;               // ����ʱ�䣨����ƣ���

 12 #endif

 13

 14 #ifndef _PTRDIFF_T

 15 #define _PTRDIFF_T

 16 typedef long ptrdiff_t;

 17 #endif

 18

 19 #ifndef NULL

 20 #define NULL ((void *) 0)

 21 #endif

 22

 23 typedef int pid_t;                // ���ڽ��̺źͽ�����š�

 24 typedef unsigned short uid_t;     // �����û��ţ��û���ʶ�ţ���

 25 typedef unsigned char gid_t;      // ������š�

 26 typedef unsigned short dev_t;     // �����豸�š�

 27 typedef unsigned short ino_t;     // �����ļ����кš�

 28 typedef unsigned short mode_t;    // ����ijЩ�ļ����ԡ�

 29 typedef unsigned short umode_t;   //

 30 typedef unsigned char nlink_t;    // �������Ӽ�����

 31 typedef int daddr_t;

 32 typedef long off_t;               // �����ļ����ȣ���С����

 33 typedef unsigned char u_char;     // �޷����ַ����͡�

 34 typedef unsigned short ushort;    // �޷��Ŷ��������͡�

 35

 36 typedef unsigned char cc_t;

 37 typedef unsigned int speed_t;

 38 typedef unsigned long tcflag_t;

 39

 40 typedef unsigned long fd_set;     // �ļ�����������ÿ���ش���1����������

 41

 42 typedef struct { int quot,rem; } div_t;    // ����DIV������

 43 typedef struct { long quot,rem; } ldiv_t;  // ���ڳ�DIV������

 44

    // �ļ�ϵͳ�����ṹ������ustat()��������������ֶ�δʹ�ã����Ƿ���NULLָ�롣

 45 struct ustat {

 46         daddr_t f_tfree;              // ϵͳ�ܿ��п�����

 47         ino_t f_tinode;               // �ܿ���i�ڵ�����

 48         char f_fname[6];              // �ļ�ϵͳ���ơ�

 49         char f_fpack[6];              // �ļ�ϵͳѹ�����ơ�

 50 };

 51

 52 #endif

 53