Linux Standard Base Core Specification for PPC32 5.0rc2 | ||
---|---|---|
<<< Previous | Chapter 10. Libraries | Next >>> |
This section defines global identifiers and their values that are associated with interfaces contained in libc. 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. Where an interface is defined as requiring a particular system header file all of the data definitions for that system header file presented here shall be in effect.
This section gives data definitions to promote binary application portability, not to repeat source interface definitions available elsewhere. System providers and application developers should use this ABI to supplement - not to replace - source interface definition specifications.
This specification uses the ISO C (1999) C Language as the 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.
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
enum { _ISupper = 1, _ISlower = 2, _ISalpha = 4, _ISdigit = 8, _ISxdigit = 16, _ISspace = 32, _ISprint = 64, _ISgraph = 128, _ISblank = 256, _IScntrl = 512, _ISpunct = 1024, _ISalnum = 2048 }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define __BYTE_ORDER __BIG_ENDIAN |
#define EDEADLOCK 58 |
#define O_NOFOLLOW 0100000 #define O_LARGEFILE 0200000 #define O_DIRECTORY 040000 #define POSIX_FADV_DONTNEED 4 #define POSIX_FADV_NOREUSE 5 #define F_GETLK64 12 #define F_SETLK64 13 #define F_SETLKW64 14 |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define __PRIPTR_PREFIX #define __PRI64_PREFIX "ll" typedef lldiv_t imaxdiv_t; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define ULONG_MAX 0xFFFFFFFFUL #define LONG_MAX 2147483647L #define LONG_BIT 32 #define CHAR_MIN 0 #define CHAR_MAX 255 #define PTHREAD_STACK_MIN 131072 |
struct dl_phdr_info { Elf32_Addr dlpi_addr; const char *dlpi_name; const Elf32_Phdr *dlpi_phdr; Elf32_Half dlpi_phnum; unsigned long long int dlpi_adds; unsigned long long int dlpi_subs; size_t dlpi_tls_modid; void *dlpi_tls_data; }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
typedef int32_t ssize_t; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x1000 #define ICMP6_RR_RESULT_FLAGS_OOB 0x2000 #define ND_NA_FLAG_OVERRIDE 0x20000000 #define ND_NA_FLAG_SOLICITED 0x40000000 #define ND_NA_FLAG_ROUTER 0x80000000 |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
struct timestamp { u_int8_t len; u_int8_t ptr; unsigned int overflow:4; unsigned int flags:4; u_int32_t data[9]; }; struct iphdr { unsigned int version:4; unsigned int ihl:4; u_int8_t tos; u_int16_t tot_len; u_int16_t id; u_int16_t frag_off; u_int8_t ttl; u_int8_t protocol; u_int16_t check; u_int32_t saddr; u_int32_t daddr; }; struct ip { unsigned int ip_v:4; unsigned int ip_hl:4; u_int8_t ip_tos; u_short ip_len; u_short ip_id; u_short ip_off; u_int8_t ip_ttl; u_int8_t ip_p; u_short ip_sum; struct in_addr ip_src; struct in_addr ip_dst; }; struct ip_timestamp { u_int8_t ipt_len; u_int8_t ipt_code; u_int8_t ipt_ptr; unsigned int ipt_flg:4; unsigned int ipt_oflw:4; u_int32_t data[9]; }; |
#define IP6_ALERT_MLD 0x0000 #define IP6F_MORE_FRAG 0x0001 #define IP6_ALERT_RSVP 0x0001 #define IP6_ALERT_AN 0x0002 #define IP6F_RESERVED_MASK 0x0006 #define IP6F_OFF_MASK 0xfff8 |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
struct tcphdr { uint16_t source; uint16_t dest; uint32_t seq; uint32_t ack_seq; uint16_t doff:4; uint16_t res1:4; uint16_t res2:2; uint16_t urg:1; uint16_t ack:1; uint16_t psh:1; uint16_t rst:1; uint16_t syn:1; uint16_t fin:1; uint16_t window; uint16_t check; uint16_t urg_ptr; }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
typedef long int __jmp_buf[112] __attribute__ ((aligned(16))); |
struct pt_regs { unsigned long int gpr[32]; unsigned long int nip; unsigned long int msr; unsigned long int orig_gpr3; /* Used for restarting system calls */ unsigned long int ctr; unsigned long int link; unsigned long int xer; unsigned long int ccr; unsigned long int mq; /* 601 only (not used at present). Used on APUS to hold IPL val */ unsigned long int trap; /* Reason for being here */ unsigned long int dar; /* Fault registers */ unsigned long int dsisr; unsigned long int result; /* Result of a system call */ }; #define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE/sizeof(int))-3) #define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int))-3) struct sigaction { union { sighandler_t _sa_handler; void (*_sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; sigset_t sa_mask; unsigned long int sa_flags; void (*sa_restorer) (void); }; #define MINSIGSTKSZ 2048 /* Minimum stack size for a signal handler. */ #define SIGSTKSZ 8192 /* System default stack size. */ struct sigcontext { long int _unused[4]; int signal; unsigned long int handler; unsigned long int oldmask; struct pt_regs *regs; }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
typedef long int wchar_t; typedef unsigned int size_t; typedef int ptrdiff_t; |
#define INT64_C(c) c ## LL #define INTMAX_C(c) c ## LL #define __INT64_C(c) c ## LL #define UINT64_C(c) c ## ULL #define UINTMAX_C(c) c ## ULL #define __UINT64_C(c) c ## ULL #define INTPTR_MIN (-2147483647-1) #define INT_FAST16_MIN (-2147483647-1) #define INT_FAST32_MIN (-2147483647-1) #define PTRDIFF_MIN (-2147483647-1) #define INTPTR_MAX (2147483647) #define INT_FAST16_MAX (2147483647) #define INT_FAST32_MAX (2147483647) #define PTRDIFF_MAX (2147483647) #define SIZE_MAX (4294967295U) #define UINTPTR_MAX (4294967295U) #define UINT_FAST16_MAX (4294967295U) #define UINT_FAST32_MAX (4294967295U) typedef long long int int64_t; typedef long long int intmax_t; typedef unsigned long long int uintmax_t; typedef int intptr_t; typedef unsigned int uintptr_t; typedef unsigned long long int uint64_t; typedef long long int int_least64_t; typedef unsigned long long int uint_least64_t; typedef int int_fast16_t; typedef int int_fast32_t; typedef long long int int_fast64_t; typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; typedef unsigned long long int uint_fast64_t; |
#define __IO_FILE_SIZE 152 |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define TIOCGWINSZ 0x40087468 #define TIOCNOTTY 0x5422 #define TIOCSWINSZ 0x80087467 #define FIONREAD 1074030207 |
struct ipc_perm { key_t __key; uid_t uid; gid_t gid; uid_t cuid; uid_t cgid; mode_t mode; long int __seq; int __pad1; unsigned long long int __unused1; unsigned long long int __unused2; }; |
#define MCL_FUTURE 16384 #define MCL_CURRENT 8192 |
typedef unsigned long int msgqnum_t; typedef unsigned long int msglen_t; struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ unsigned int __unused1; time_t msg_stime; /* time of last msgsnd command */ unsigned int __unused2; time_t msg_rtime; /* time of last msgrcv command */ unsigned int __unused3; time_t msg_ctime; /* time of last change */ unsigned long int __msg_cbytes; /* current number of bytes on queue */ msgqnum_t msg_qnum; /* number of messages currently on queue */ msglen_t msg_qbytes; /* max number of bytes allowed on queue */ pid_t msg_lspid; /* pid of last msgsnd() */ pid_t msg_lrpid; /* pid of last msgrcv() */ unsigned long int __unused4; unsigned long int __unused5; }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
enum __ptrace_request { PTRACE_TRACEME = 0, PTRACE_PEEKTEXT = 1, PTRACE_PEEKDATA = 2, PTRACE_PEEKUSER = 3, PTRACE_POKETEXT = 4, PTRACE_POKEDATA = 5, PTRACE_POKEUSER = 6, PTRACE_CONT = 7, PTRACE_KILL = 8, PTRACE_SINGLESTEP = 9, PTRACE_ATTACH = 16, PTRACE_DETACH = 17, PTRACE_SYSCALL = 24, PTRACE_SETOPTIONS = 0x4200, PTRACE_GETEVENTMSG = 0x4201, PTRACE_GETSIGINFO = 0x4202, PTRACE_SETSIGINFO = 0x4203 }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ unsigned int __unused1; time_t sem_otime; /* last semop() time */ unsigned int __unused2; time_t sem_ctime; /* last time changed by semctl() */ unsigned long int sem_nsems; /* number of semaphores in set */ unsigned long int __unused3; unsigned long int __unused4; }; |
#define SHMLBA (__getpagesize()) typedef unsigned long int shmatt_t; struct shmid_ds { struct ipc_perm shm_perm; unsigned int __unused1; time_t shm_atime; unsigned int __unused2; time_t shm_dtime; unsigned int __unused3; time_t shm_ctime; unsigned int __unused4; size_t shm_segsz; pid_t shm_cpid; pid_t shm_lpid; shmatt_t shm_nattch; unsigned long int __unused5; unsigned long int __unused6; }; |
typedef uint32_t __ss_aligntype; #define SO_RCVLOWAT 16 #define SO_SNDLOWAT 17 #define SO_RCVTIMEO 18 #define SO_SNDTIMEO 19 |
#define _MKNOD_VER 1 #define _STAT_VER 3 struct stat { dev_t st_dev; /* Device. */ unsigned short __pad1; ino_t st_ino; /* File serial number. */ mode_t st_mode; /* File mode. */ nlink_t st_nlink; /* Link count. */ uid_t st_uid; /* User ID of the file's owner. */ gid_t st_gid; /* Group ID of the file's group. */ dev_t st_rdev; /* Device number, if device. */ unsigned short __pad2; off_t st_size; /* Size of file, in bytes. */ blksize_t st_blksize; /* Optimal block size for I/O. */ blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ unsigned long int __unused4; unsigned long int __unused5; }; struct stat64 { dev_t st_dev; /* Device. */ ino64_t st_ino; /* File serial number. */ mode_t st_mode; /* File mode. */ nlink_t st_nlink; /* Link count. */ uid_t st_uid; /* User ID of the file's owner. */ gid_t st_gid; /* Group ID of the file's group. */ dev_t st_rdev; /* Device number, if device. */ unsigned short __pad2; off64_t st_size; /* Size of file, in bytes. */ blksize_t st_blksize; /* Optimal block size for I/O. */ blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ unsigned long int __unused4; unsigned long int __unused5; }; |
struct statfs { int f_type; /* type of filesystem */ int f_bsize; /* optimal transfer block size */ fsblkcnt_t f_blocks; /* total data blocks in file system */ fsblkcnt_t f_bfree; /* free blocks in fs */ fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */ fsfilcnt_t f_files; /* total file nodes in file system */ fsfilcnt_t f_ffree; /* free file nodes in file system */ fsid_t f_fsid; /* file system id */ int f_namelen; /* maximum length of filenames */ int f_frsize; /* fragment size */ int f_spare[5]; /* spare for later */ }; struct statfs64 { int f_type; /* type of filesystem */ int f_bsize; /* optimal transfer block size */ fsblkcnt64_t f_blocks; /* total data blocks in file system */ fsblkcnt64_t f_bfree; /* free blocks in fs */ fsblkcnt64_t f_bavail; /* free blocks avail to non-superuser */ fsfilcnt64_t f_files; /* total file nodes in file system */ fsfilcnt64_t f_ffree; /* free file nodes in file system */ fsid_t f_fsid; /* file system id */ int f_namelen; /* maximum length of filenames */ int f_frsize; /* fragment size */ int f_spare[5]; /* spare for later */ }; |
struct statvfs { unsigned long int f_bsize; unsigned long int f_frsize; fsblkcnt_t f_blocks; fsblkcnt_t f_bfree; fsblkcnt_t f_bavail; fsfilcnt_t f_files; fsfilcnt_t f_ffree; fsfilcnt_t f_favail; unsigned long int f_fsid; int __f_unused; unsigned long int f_flag; unsigned long int f_namemax; int __f_spare[6]; }; struct statvfs64 { unsigned long int f_bsize; unsigned long int 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 int f_fsid; int __f_unused; unsigned long int f_flag; unsigned long int f_namemax; int __f_spare[6]; }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define TAB1 1024 #define CR3 12288 #define CRDLY 12288 #define FF1 16384 #define FFDLY 16384 #define XCASE 16384 #define ONLCR 2 #define TAB2 2048 #define TAB3 3072 #define TABDLY 3072 #define BS1 32768 #define BSDLY 32768 #define OLCUC 4 #define CR1 4096 #define IUCLC 4096 #define VT1 65536 #define VTDLY 65536 #define NLDLY 768 #define CR2 8192 #define VWERASE 10 #define VREPRINT 11 #define VSUSP 12 #define VSTART 13 #define VSTOP 14 #define VDISCARD 16 #define VMIN 5 #define VEOL 6 #define VEOL2 8 #define VSWTC 9 #define IXOFF 1024 #define IXON 512 #define CSTOPB 1024 #define HUPCL 16384 #define CREAD 2048 #define CS6 256 #define CLOCAL 32768 #define PARENB 4096 #define CS7 512 #define VTIME 7 #define CS8 768 #define CSIZE 768 #define PARODD 8192 #define NOFLSH 0x80000000 #define ECHOKE 1 #define IEXTEN 1024 #define ISIG 128 #define ECHONL 16 #define ECHOE 2 #define ICANON 256 #define ECHOPRT 32 #define ECHOK 4 #define TOSTOP 4194304 #define PENDIN 536870912 #define ECHOCTL 64 #define FLUSHO 8388608 |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
#define ELF_NGREG 48 typedef struct _libc_vrstate { unsigned int vrregs[128]; unsigned int vrsave; unsigned int _pad[2]; unsigned int vscr; } vrregset_t __attribute__ ((__aligned__(16))); #define NGREG 48 typedef unsigned long int gregset_t[48]; typedef struct _libc_fpstate { double fpregs[32]; double fpscr; int _pad[2]; } fpregset_t; typedef struct { gregset_t gregs; fpregset_t fpregs; vrregset_t vrregs; } mcontext_t; union uc_regs_ptr { struct pt_regs *regs; mcontext_t *uc_regs; }; typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; int uc_pad[7]; union uc_regs_ptr uc_mcontext; sigset_t uc_sigmask; char uc_reg_space[sizeof(mcontext_t) + 12]; } ucontext_t; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
struct lastlog { time_t ll_time; char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; struct utmp { short ut_type; /* Type of login. */ pid_t ut_pid; /* Process ID of login process. */ char ut_line[UT_LINESIZE]; /* Devicename. */ char ut_id[4]; /* Inittab ID. */ char ut_user[UT_NAMESIZE]; /* Username. */ char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ struct exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ long int ut_session; /* Session ID, used for windowing. */ struct timeval ut_tv; /* Time entry was made. */ int32_t ut_addr_v6[4]; /* Internet address of remote host. */ char __unused[20]; /* Reserved for future use. */ }; |
struct utmpx { short ut_type; /* Type of login. */ pid_t ut_pid; /* Process ID of login process. */ char ut_line[UT_LINESIZE]; /* Devicename. */ char ut_id[4]; /* Inittab ID. */ char ut_user[UT_NAMESIZE]; /* Username. */ char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ struct exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ long int ut_session; /* Session ID, used for windowing. */ struct timeval ut_tv; /* Time entry was made. */ int32_t ut_addr_v6[4]; /* Internet address of remote host. */ char __unused[20]; /* Reserved for future use. */ }; |
/* * This header is architecture neutral * Please refer to the generic specification for details */ |
<<< Previous | Home | Next >>> |
Interfaces for libc | Up | Interfaces for libm |