Data Definitions for libc

This section contains standard data definitions that describe system data. These definitions are organized into groups that correspond to system headers. This convention is used as a convenience for the reader, and does not imply the existence of these headers, or their content.

ISO C serves as the LSB reference programming language, and data definitions are specified in ISO C format. The C language is used here as a convenient notation. Using a C language description of these data objects does not preclude their use by other programming languages.

errno.h




#define EDEADLOCK	35

limits.h


#define ULONG_MAX	0xFFFFFFFFFFFFFFFFUL
#define LONG_MAX	9223372036854775807L






#define CHAR_MIN	0
#define CHAR_MAX	255

signal.h
























struct sigaction
{
  union
  {
    __sighandler_t _sa_handler;
    void (*_sa_sigaction) (int, siginfo_t *, void *);
  }
  __sigaction_handler;
  unsigned long sa_flags;
  void (*sa_restorer) (void);
  __sigset_t sa_mask;
}
 ;

stddef.h



typedef unsigned long size_t;

sys/ioctl.h


#define FIONREAD	21531
#define TIOCNOTTY	21538

sys/ipc.h



struct ipc_perm
{
  __key_t __key;
  __uid_t uid;
  __gid_t gid;
  __uid_t cuid;
  __gid_t cgid;
  __mode_t mode;
  unsigned short __seq;
  unsigned short __pad2;
  unsigned long __unused1;
  unsigned long __unused2;
}
 ;

sys/mman.h


#define MCL_CURRENT	1
#define MCL_FUTURE	2

sys/msg.h






typedef unsigned long msgqnum_t;
typedef unsigned long msglen_t;


struct msqid_ds
{
  struct ipc_perm msg_perm;
  __time_t msg_stime;
  __time_t msg_rtime;
  __time_t msg_ctime;
  unsigned long __msg_cbytes;
  msgqnum_t msg_qnum;
  msglen_t msg_qbytes;
  __pid_t msg_lspid;
  __pid_t msg_lrpid;
  unsigned long __unused4;
  unsigned long __unused5;
}
 ;

sys/sem.h



struct semid_ds
{
  struct ipc_perm sem_perm;
  __time_t sem_otime;
  __time_t sem_ctime;
  unsigned long sem_nsems;
  unsigned long __unused3;
  unsigned long __unused4;
}
 ;

sys/shm.h


#define SHMLBA	4096





typedef unsigned long shmatt_t;


struct shmid_ds
{
  struct ipc_perm shm_perm;
  size_t shm_segsz;
  __time_t shm_atime;
  __time_t shm_dtime;
  __time_t shm_ctime;
  __pid_t shm_cpid;
  __pid_t shm_lpid;
  shmatt_t shm_nattch;
  unsigned long __unused4;
  unsigned long __unused5;
}
 ;

sys/stat.h


#define _STAT_VER	1


struct stat
{
  __dev_t st_dev;
  __ino_t st_ino;
  __nlink_t st_nlink;
  __mode_t st_mode;
  __uid_t st_uid;
  __gid_t st_gid;
  int pad0;
  __dev_t st_rdev;
  __off_t st_size;
  __time_t st_atime;
  long __reserved0;
  __time_t st_mtime;
  long __reserved1;
  __time_t st_ctime;
  long __reserved2;
  blksize_t st_blksize;
  __blkcnt_t st_blocks;
}
 ;
struct stat64
{
  __dev_t st_dev;
  __ino64_t st_ino;
  __nlink_t st_nlink;
  __mode_t st_mode;
  __uid_t st_uid;
  __gid_t st_gid;
  int pad0;
  __dev_t st_rdev;
  __off_t st_size;
  __time_t st_atime;
  int __reserved0;
  __time_t st_mtime;
  int __reserved1;
  __time_t st_ctime;
  int __reserved2;
  blksize_t st_blksize;
  __blkcnt64_t st_blocks;
}
 ;

sys/statvfs.h



struct statvfs
{
  unsigned long f_bsize;
  unsigned long f_frsize;
  __fsblkcnt64_t f_blocks;
  __fsblkcnt64_t f_bfree;
  __fsblkcnt64_t f_bavail;
  __fsfilcnt64_t f_files;
  __fsfilcnt64_t f_ffree;
  __fsfilcnt64_t f_favail;
  unsigned long f_fsid;
  int __f_unused;
  unsigned long f_flag;
  unsigned long f_namemax;
}
 ;
struct statvfs64
{
  unsigned long f_bsize;
  unsigned long f_frsize;
  __fsblkcnt64_t f_blocks;
  __fsblkcnt64_t f_bfree;
  __fsblkcnt64_t f_bavail;
  __fsfilcnt64_t f_files;
  __fsfilcnt64_t f_ffree;
  __fsfilcnt64_t f_favail;
  unsigned long f_fsid;
  int __f_unused;
  unsigned long f_flag;
  unsigned long f_namemax;
}
 ;

termios.h


#define CR2	1024
#define CR3	1536
#define CRDLY	1536
#define VT1	16384
#define VTDLY	16384
#define OLCUC	2
#define TAB1	2048
#define NLDLY	256
#define FF1	32768
#define FFDLY	32768
#define ONLCR	4
#define XCASE	4
#define TAB2	4096
#define CR1	512
#define IUCLC	512
#define TAB3	6144
#define TABDLY	6144
#define BS1	8192
#define BSDLY	8192









#define VSUSP	10
#define VEOL	11
#define VREPRINT	12
#define VDISCARD	13
#define VWERASE	14
#define VEOL2	16
#define VMIN	6
#define VSWTC	7
#define VSTART	8
#define VSTOP	9



#define IXON	1024
#define IXOFF	4096






#define HUPCL	1024
#define CREAD	128
#define CS6	16
#define CLOCAL	2048
#define PARENB	256
#define CS7	32
#define CS8	48
#define CSIZE	48
#define VTIME	5
#define PARODD	512
#define CSTOPB	64



#define ISIG	1
#define ECHOPRT	1024
#define NOFLSH	128
#define ECHOE	16
#define PENDIN	16384
#define ICANON	2
#define ECHOKE	2048
#define TOSTOP	256
#define ECHOK	32
#define IEXTEN	32768
#define FLUSHO	4096
#define ECHOCTL	512
#define ECHONL	64

ucontext.h







#define NGREG	27











typedef union
{
  double d;
  float f;
}
fpreg_t;





typedef struct
{
  unsigned int fpc;
  fpreg_t fprs[16];
}
fpregset_t;


typedef struct
{
  unsigned long mask;
  unsigned long addr;
}
__psw_t;


typedef struct
{
  __psw_t psw;
  unsigned long gregs[16];
  unsigned int aregs[16];
  fpregset_t fpregs;
}
mcontext_t;


struct ucontext
{
  unsigned long uc_flags;
  struct ucontext *uc_link;
  stack_t uc_stack;
  mcontext_t uc_mcontext;
  __sigset_t uc_sigmask;
}
 ;
typedef struct ucontext
{
  unsigned long uc_flags;
  struct ucontext *uc_link;
  stack_t uc_stack;
  mcontext_t uc_mcontext;
  __sigset_t uc_sigmask;
}
ucontext_t;