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	EDEADLK

inttypes.h






typedef long intmax_t;
typedef unsigned long uintmax_t;
typedef unsigned long uintptr_t;

limits.h


#define LONG_MAX	0x7FFFFFFFFFFFFFFFL
#define ULONG_MAX	0xFFFFFFFFFFFFFFFFUL






#define CHAR_MAX	SCHAR_MAX
#define CHAR_MIN	SCHAR_MIN

setjmp.h






typedef long __jmp_buf[70] __attribute__ ((aligned (16)));

signal.h
























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





struct ia64_fpreg
{
  union
  {
    unsigned long bits[2];
  }
  u;
}
__attribute__ ((aligned (16)));





struct sigcontext
{
  unsigned long sc_flags;
  unsigned long sc_nat;
  stack_t sc_stack;
  unsigned long sc_ip;
  unsigned long sc_cfm;
  unsigned long sc_um;
  unsigned long sc_ar_rsc;
  unsigned long sc_ar_bsp;
  unsigned long sc_ar_rnat;
  unsigned long sc_ar_ccv;
  unsigned long sc_ar_unat;
  unsigned long sc_ar_fpsr;
  unsigned long sc_ar_pfs;
  unsigned long sc_ar_lc;
  unsigned long sc_pr;
  unsigned long sc_br[8];
  unsigned long sc_gr[32];
  struct ia64_fpreg sc_fr[128];
  unsigned long sc_rbs_base;
  unsigned long sc_loadrs;
  unsigned long sc_rsvd[14];
  unsigned long sc_mask;
}
 ;

stddef.h



typedef long ptrdiff_t;
typedef unsigned long size_t;

sys/ioctl.h


#define FIONREAD	0x541B
#define TIOCNOTTY	0x5422

sys/ipc.h



struct ipc_perm
{
  key_t __key;
  uid_t uid;
  gid_t gid;
  uid_t cuid;
  uid_t cgid;
  mode_t mode;
  unsigned short __seq;
  unsigned short __pad1;
  unsigned long __unused1;
  unsigned long __unused2;
}
 ;

sys/mman.h


#define MCL_CURRENT	1
#define MCL_FUTURE	2

sys/msg.h









struct msqid_ds
{
  struct ipc_perm msg_perm;
  time_t msg_stime;
  time_t msg_rtime;
  time_t msg_ctime;
  unsigned long __msg_cbytes;
  unsigned long msg_qnum;
  unsigned long msg_qbytes;
  pid_t msg_lspid;
  pid_t msg_lrpid;
  unsigned long __unused1;
  unsigned long __unused2;
}
 ;

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 __unused1;
  unsigned long __unused2;
}
 ;

sys/shm.h


#define SHMLBA	(1024*1024)








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;
  unsigned long shm_nattch;
  unsigned long __unused1;
  unsigned long __unused2;
}
 ;

sys/stat.h


#define _STAT_VER	1


struct stat
{
  unsigned long st_dev;
  unsigned long st_ino;
  unsigned long st_nlink;
  unsigned int st_mode;
  unsigned int st_uid;
  unsigned int st_gid;
  unsigned int pad0;
  unsigned long st_rdev;
  unsigned long st_size;
  unsigned long st_atime;
  unsigned long __reserved0;
  unsigned long st_mtime;
  unsigned long __reserved1;
  unsigned long st_ctime;
  unsigned long __reserved2;
  unsigned long st_blksize;
  long st_blocks;
  unsigned long __unused[3];
}
 ;
struct stat64
{
  unsigned long st_dev;
  unsigned long st_ino;
  unsigned long st_nlink;
  unsigned int st_mode;
  unsigned int st_uid;
  unsigned int st_gid;
  unsigned int pad0;
  unsigned long st_rdev;
  unsigned long st_size;
  unsigned long st_atime;
  unsigned long __reserved0;
  unsigned long st_mtime;
  unsigned long __reserved1;
  unsigned long st_ctime;
  unsigned long __reserved2;
  unsigned long st_blksize;
  long st_blocks;
  unsigned long __unused[3];
}
 ;

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;
  unsigned long f_flag;
  unsigned long f_namemax;
  unsigned int __f_spare[6];
}
 ;
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;
  unsigned long f_flag;
  unsigned long f_namemax;
  unsigned int __f_spare[6];
}
 ;

sys/types.h



typedef int64_t ssize_t;

termios.h


#define OLCUC	0000002
#define ONLCR	0000004
#define XCASE	0000004
#define NLDLY	0000400
#define CR1	0001000
#define IUCLC	0001000
#define CR2	0002000
#define CR3	0003000
#define CRDLY	0003000
#define TAB1	0004000
#define TAB2	0010000
#define TAB3	0014000
#define TABDLY	0014000
#define BS1	0020000
#define BSDLY	0020000
#define VT1	0040000
#define VTDLY	0040000
#define FF1	0100000
#define FFDLY	0100000









#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	0002000
#define IXOFF	0010000






#define CS6	0000020
#define CS7	0000040
#define CS8	0000060
#define CSIZE	0000060
#define CSTOPB	0000100
#define CREAD	0000200
#define PARENB	0000400
#define PARODD	0001000
#define HUPCL	0002000
#define CLOCAL	0004000
#define VTIME	5



#define ISIG	0000001
#define ICANON	0000002
#define ECHOE	0000020
#define ECHOK	0000040
#define ECHONL	0000100
#define NOFLSH	0000200
#define TOSTOP	0000400
#define ECHOCTL	0001000
#define ECHOPRT	0002000
#define ECHOKE	0004000
#define FLUSHO	0010000
#define PENDIN	0040000
#define IEXTEN	0100000

ucontext.h


#define _SC_GR0_OFFSET	(((char *) & ((struct sigcontext *) 0)->sc_gr[0]) - (char *) 0)


























typedef struct sigcontext mcontext_t;


typedef struct ucontext
{
  union
  {
    mcontext_t _mc;
    struct
    {
      unsigned long _pad[_SC_GR0_OFFSET / 8];
      struct ucontext *_link;
    }
    _uc;
  }
  _u;
}
ucontext_t;

unistd.h



typedef long intptr_t;