upgraded
This commit is contained in:
parent
70ff99e4d0
commit
16e6b51cba
2 changed files with 58 additions and 2 deletions
|
@ -11,6 +11,21 @@
|
||||||
* Basic system types and major/minor device constructing/busting macros.
|
* Basic system types and major/minor device constructing/busting macros.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(_SYS_TYPES_H)
|
||||||
|
#define _SYS_TYPES_H
|
||||||
|
|
||||||
|
#if !defined(_SIZE_T)
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned int size_t; /* type returned by sizeof */
|
||||||
|
#endif /* _SIZE_T */
|
||||||
|
|
||||||
|
#if !defined(_TIME_T)
|
||||||
|
#define _TIME_T
|
||||||
|
typedef unsigned long time_t;
|
||||||
|
#endif /* TIME_T */
|
||||||
|
|
||||||
|
#if !defined(_POSIX_SOURCE)
|
||||||
|
|
||||||
/* major part of a device */
|
/* major part of a device */
|
||||||
#define major(x) ((int)(((unsigned)(x)>>8)&0377))
|
#define major(x) ((int)(((unsigned)(x)>>8)&0377))
|
||||||
|
|
||||||
|
@ -28,7 +43,7 @@ typedef unsigned long u_long;
|
||||||
typedef struct _physadr { int r[1]; } *physadr;
|
typedef struct _physadr { int r[1]; } *physadr;
|
||||||
typedef long daddr_t;
|
typedef long daddr_t;
|
||||||
typedef char * caddr_t;
|
typedef char * caddr_t;
|
||||||
#ifdef __BSD4_2
|
#if defined(__BSD4_2)
|
||||||
typedef u_long ino_t;
|
typedef u_long ino_t;
|
||||||
#else
|
#else
|
||||||
typedef u_short ino_t;
|
typedef u_short ino_t;
|
||||||
|
@ -49,4 +64,17 @@ typedef short cnt_t;
|
||||||
typedef long paddr_t;
|
typedef long paddr_t;
|
||||||
typedef long key_t;
|
typedef long key_t;
|
||||||
|
|
||||||
|
#else /* _POSIX_SOURCE */
|
||||||
|
#if defined(_MINIX)
|
||||||
|
typedef unsigned short dev_t; /* hold (major|minor) device pair */
|
||||||
|
typedef unsigned char gid_t; /* group id */
|
||||||
|
typedef unsigned short ino_t; /* i-node number */
|
||||||
|
typedef unsigned short mode_t; /* mode number within an i-node */
|
||||||
|
typedef unsigned char nlink_t; /* number-of-links field within an i-node */
|
||||||
|
typedef long off_t; /* offsets within a file */
|
||||||
|
typedef int pid_t; /* type for pids (must be signed) */
|
||||||
|
typedef unsigned short uid_t; /* user id */
|
||||||
|
#endif /* _MINIX */
|
||||||
|
#endif /* _POSIX_SOURCE */
|
||||||
|
|
||||||
#endif /* __TYPES_H__ */
|
#endif /* __TYPES_H__ */
|
||||||
|
|
|
@ -11,6 +11,21 @@
|
||||||
* Basic system types and major/minor device constructing/busting macros.
|
* Basic system types and major/minor device constructing/busting macros.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if !defined(_SYS_TYPES_H)
|
||||||
|
#define _SYS_TYPES_H
|
||||||
|
|
||||||
|
#if !defined(_SIZE_T)
|
||||||
|
#define _SIZE_T
|
||||||
|
typedef unsigned int size_t; /* type returned by sizeof */
|
||||||
|
#endif /* _SIZE_T */
|
||||||
|
|
||||||
|
#if !defined(_TIME_T)
|
||||||
|
#define _TIME_T
|
||||||
|
typedef unsigned long time_t;
|
||||||
|
#endif /* TIME_T */
|
||||||
|
|
||||||
|
#if !defined(_POSIX_SOURCE)
|
||||||
|
|
||||||
/* major part of a device */
|
/* major part of a device */
|
||||||
#define major(x) ((int)(((unsigned)(x)>>8)&0377))
|
#define major(x) ((int)(((unsigned)(x)>>8)&0377))
|
||||||
|
|
||||||
|
@ -28,7 +43,7 @@ typedef unsigned long u_long;
|
||||||
typedef struct _physadr { int r[1]; } *physadr;
|
typedef struct _physadr { int r[1]; } *physadr;
|
||||||
typedef long daddr_t;
|
typedef long daddr_t;
|
||||||
typedef char * caddr_t;
|
typedef char * caddr_t;
|
||||||
#ifdef __BSD4_2
|
#if defined(__BSD4_2)
|
||||||
typedef u_long ino_t;
|
typedef u_long ino_t;
|
||||||
#else
|
#else
|
||||||
typedef u_short ino_t;
|
typedef u_short ino_t;
|
||||||
|
@ -49,4 +64,17 @@ typedef short cnt_t;
|
||||||
typedef long paddr_t;
|
typedef long paddr_t;
|
||||||
typedef long key_t;
|
typedef long key_t;
|
||||||
|
|
||||||
|
#else /* _POSIX_SOURCE */
|
||||||
|
#if defined(_MINIX)
|
||||||
|
typedef unsigned short dev_t; /* hold (major|minor) device pair */
|
||||||
|
typedef unsigned char gid_t; /* group id */
|
||||||
|
typedef unsigned short ino_t; /* i-node number */
|
||||||
|
typedef unsigned short mode_t; /* mode number within an i-node */
|
||||||
|
typedef unsigned char nlink_t; /* number-of-links field within an i-node */
|
||||||
|
typedef long off_t; /* offsets within a file */
|
||||||
|
typedef int pid_t; /* type for pids (must be signed) */
|
||||||
|
typedef unsigned short uid_t; /* user id */
|
||||||
|
#endif /* _MINIX */
|
||||||
|
#endif /* _POSIX_SOURCE */
|
||||||
|
|
||||||
#endif /* __TYPES_H__ */
|
#endif /* __TYPES_H__ */
|
||||||
|
|
Loading…
Reference in a new issue