sys_privsys sys_putmsg sys_putpmsg sys_meminfo sys_pset_getloadavg \
sys_zone_create sys_allocids sys_settaskid sys_zone_lookup sys_port \
sys_door
-sysdep_headers += sys/feature_tests.h sys/dirent.h sys/utime.h \
+sysdep_headers += sys/feature_tests.h sys/dirent.h sys/utime.h sys/machelf.h \
sys/systeminfo.h sys/link.h sys/procfs_isa.h sys/ttold.h \
sys/priocntl.h sys/procset.h sys/ptyvar.h sys/synch.h sys/fork.h \
sys/sockio.h sys/ioccom.h sys/tty.h sys/trap.h sys/sysconfig.h \
sys/ptms.h sys/stack.h sys/regset.h sys/fault.h sys/processor.h \
- sys/pset.h sys/reg.h sys/siginfo.h sys/types32.h sys/isa_defs.h sys/elf.h \
- sys/int_types.h sys/machelf.h sys/inttypes.h sys/atomic.h sys/machtypes.h
-sysdep_headers += \
- rtld_db.h pcsample.h atomic.h bits/machtypes.h
+ sys/pset.h sys/reg.h sys/siginfo.h sys/types32.h sys/isa_defs.h \
+ sys/int_types.h sys/inttypes.h sys/atomic.h sys/machtypes.h sys/elf.h \
+sysdep_headers += rtld_db.h pcsample.h atomic.h bits/machtypes.h
headers := $(filter-out sys/sysinfo.h, $(headers))
endif
ifeq ($(subdir),socket)
sysdep_routines += sa_len
sysdep_routines += netmask
+headers := $(filter-out sys/socketvar.h, $(headers))
endif
ifeq ($(subdir),string)
((v4)->s_addr = (v6)->in6_u.u6_addr32[3])
#define IN6_V4MAPPED_TO_IPADDR(v6, v4) \
((v4) = (v6)->in6_u.u6_addr32[3])
+
+#ifdef _SUN_SOURCE
+# define _S6_un in6_u
+# define _S6_u32 u6_addr32
+#endif
#define IPSEC_PROTO_AH 2
#define IPSEC_PROTO_ESP 3
+#define MAXHOSTNAMELEN 256
+
#endif /* __USE_MISC */
#define _POSIX_TRACE_LOG -1
#define _POSIX_TYPED_MEMORY_OBJECTS -1
+#define _POSIX_VDISABLE '\0'
+
#endif /* _BITS_POSIX_OPT_H */
#endif
typedef __t_scalar_t t_scalar_t;
-#ifdef __USE_MISC
+#ifdef _SUN_SOURCE
typedef enum
{
B_FALSE,
B_TRUE
} boolean_t;
-#else
-typedef enum
- {
- _B_FALSE,
- _B_TRUE
- } boolean_t;
#endif
typedef union
ssize_t uio_resid;
} uio_t;
+typedef struct uioa_page_s
+ {
+ int uioa_pfncnt;
+ void **uioa_ppp;
+ caddr_t uioa_base;
+ size_t uioa_len;
+ } uioa_page_t;
+
+#define UIOA_IOV_MAX 16
+
+typedef struct uioa_s
+ {
+ iovec_t *uio_iov;
+ int uio_iovcnt;
+ lloff_t _uio_offset;
+ uio_seg_t uio_segflg;
+ uint16_t uio_fmode;
+ uint16_t uio_extflg;
+ lloff_t _uio_limit;
+ ssize_t uio_resid;
+ uint32_t uioa_state;
+ uioa_page_t *uioa_lcur;
+ void **uioa_lppp;
+ void *uioa_hwst[4];
+ uioa_page_t uioa_locked[UIOA_IOV_MAX];
+ } uioa_t;
+
#endif
#endif /* _SYS_UIO_H */
#include <sys/time.h>
#include <sys/types.h>
#include <bits/wordsize.h>
-#include <sys/types32.h>
-#define UT_LINESIZE 12
-#define UT_NAMESIZE 8
-#define UT_HOSTSIZE 257
+#define UT_LINESIZE 32
+#define UT_NAMESIZE 32
+#define UT_HOSTSIZE 256
/* The structure describing an entry in the database of
/* The structure describing an entry in the user accounting database. */
struct utmp
{
- char ut_user[UT_NAMESIZE]; /* Username. */
- char ut_id[4]; /* Inittab ID. */
- char ut_line[UT_LINESIZE]; /* Devicename. */
- short int ut_pid; /* Process ID of login process. */
short int 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. */
- time_t ut_time; /* Time entry was made. */
+/* The ut_session and ut_tv fields must be the same size when compiled
+ 32- and 64-bit. This allows data files and shared memory to be
+ shared between 32- and 64-bit applications. */
+#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
+ int32_t ut_session; /* Session ID, used for windowing. */
+ struct
+ {
+ int32_t tv_sec; /* Seconds. */
+ int32_t tv_usec; /* Microseconds. */
+ } ut_tv; /* Time entry was made. */
+#else
+ long int ut_session; /* Session ID, used for windowing. */
+ struct timeval ut_tv; /* Time entry was made. */
+#endif
+
+ int32_t ut_addr_v6[4]; /* Internet address of remote host. */
+ char __unused[20]; /* Reserved for future use. */
};
/* Backwards compatibility hacks. */
#define ut_name ut_user
-
-#define NONROOT_USR 2
-#define nonuser(ut) ((ut).ut_exit.e_exit == NONROOT_USR ? 1 : 0)
-#define setuser(ut) ((ut).ut_exit.e_exit = NONROOT_USR)
+#ifndef _NO_UT_TIME
+/* We have a problem here: `ut_time' is also used otherwise. Define
+ _NO_UT_TIME if the compiler complains. */
+# define ut_time ut_tv.tv_sec
+#endif
+#define ut_xtime ut_tv.tv_sec
+#define ut_addr ut_addr_v6[0]
/* Values for the `ut_type' field of a `struct utmp'. */
#define EMPTY 0 /* No valid user accounting information. */
+
#define RUN_LVL 1 /* The system's runlevel. */
#define BOOT_TIME 2 /* Time of system boot. */
#define NEW_TIME 3 /* Time after system clock changed. */
#define OLD_TIME 4 /* Time when system clock changed. */
+
#define INIT_PROCESS 5 /* Process spawned by the init process. */
#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */
#define USER_PROCESS 7 /* Normal process. */
#define DEAD_PROCESS 8 /* Terminated process. */
#define ACCOUNTING 9
-#define DOWN_TIME 10
-#define UTMAXTYPE DOWN_TIME
-
-#define RUNLVL_MSG "run-level %c"
-#define BOOT_MSG "system boot"
-#define OTIME_MSG "old time"
-#define NTIME_MSG "new time"
-#define PSRADM_MSG "%03d %s"
-#define DOWN_MSG "system down"
-struct futmp
- {
- char ut_user[UT_NAMESIZE]; /* Username. */
- char ut_id[4]; /* Inittab ID. */
- char ut_line[UT_LINESIZE]; /* Devicename. */
- int16_t ut_pid; /* Process ID of login process. */
- int16_t ut_type; /* Type of login. */
- struct
- {
- int16_t e_termination;
- int16_t e_exit;
- }; /* Exit status of a process marked
- as DEAD_PROCESS. */
- time32_t ut_time; /* Time entry was made. */
-};
+/* Old Linux name for the EMPTY type. */
+#define UT_UNKNOWN EMPTY
/* Tell the user that we have a modern system with UT_HOST, UT_PID,
#define _HAVE_UT_TYPE 1
#define _HAVE_UT_PID 1
#define _HAVE_UT_ID 1
+#define _HAVE_UT_TV 1
+#define _HAVE_UT_HOST 1
-/* Structures and definitions for the user accounting database.
- OpenSolaris version.
- Copyright (C) 1997, 1998, 2000, 2001, 2002, 2008
- Free Software Foundation, Inc.
+/* Structures and definitions for the user accounting database. GNU version.
+ Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <bits/types.h>
#include <sys/time.h>
#include <bits/wordsize.h>
-#include <sys/types32.h>
#define _UTMPX_FILE "/var/adm/utmpx"
#define _WTMPX_FILE "/var/adm/wtmpx"
-#ifdef __USE_MISC
-# define _PATH_UTMPX _UTMPX_FILE
-# define _PATH_WTMPX _WTMPX_FILE
+#ifdef __USE_GNU
+# include <paths.h>
+# define _PATH_UTMPX _PATH_UTMP
+# define _PATH_WTMPX _PATH_WTMP
#endif
#define __UT_LINESIZE 32
#define __UT_NAMESIZE 32
-#define __UT_HOSTSIZE 257
+#define __UT_HOSTSIZE 256
/* The structure describing the status of a terminated process. This
type is used in `struct utmpx' below. */
struct __exit_status
{
-#ifdef __USE_MISC
+#ifdef __USE_GNU
short int e_termination; /* Process termination status. */
short int e_exit; /* Process exit status. */
#else
/* The structure describing an entry in the user accounting database. */
struct utmpx
{
- char ut_user[__UT_NAMESIZE]; /* Username. */
- char ut_id[4]; /* Inittab ID. */
- char ut_line[__UT_LINESIZE]; /* Devicename. */
- __pid_t ut_pid; /* Process ID of login process. */
short int 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. */
+
+/* The fields ut_session and ut_tv must be the same size when compiled
+ 32- and 64-bit. This allows files and shared memory to be shared
+ between 32- and 64-bit applications. */
+#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
+ __int32_t ut_session; /* Session ID, used for windowing. */
+ struct
+ {
+ __int32_t tv_sec; /* Seconds. */
+ __int32_t tv_usec; /* Microseconds. */
+ } ut_tv; /* Time entry was made. */
+#else
+ long int ut_session; /* Session ID, used for windowing. */
struct timeval ut_tv; /* Time entry was made. */
- int ut_session; /* Session ID, used for windowing. */
- int __pad[5];
- short ut_syslen;
- char ut_host[__UT_HOSTSIZE]; /* Hostname for remote login. */
+#endif
+ __int32_t ut_addr_v6[4]; /* Internet address of remote host. */
+ char __unused[20]; /* Reserved for future use. */
};
-#define ut_name ut_user
-#define ut_xtime ut_tv.tv_sec
-
-#define NONROOT_USRX 2
-#define nonuserx(utx) ((utx).ut_exit.e_exit == NONROOT_USRX ? 1 : 0)
-#define setuserx(utx) ((utx).ut_exit.e_exit = NONROOT_USRX)
/* Values for the `ut_type' field of a `struct utmpx'. */
#define EMPTY 0 /* No valid user accounting information. */
+
+#ifdef __USE_GNU
# define RUN_LVL 1 /* The system's runlevel. */
+#endif
#define BOOT_TIME 2 /* Time of system boot. */
#define NEW_TIME 3 /* Time after system clock changed. */
#define OLD_TIME 4 /* Time when system clock changed. */
+
#define INIT_PROCESS 5 /* Process spawned by the init process. */
#define LOGIN_PROCESS 6 /* Session leader of a logged in user. */
#define USER_PROCESS 7 /* Normal process. */
#define DEAD_PROCESS 8 /* Terminated process. */
-#ifdef __USE_MISC
+#ifdef __USE_GNU
# define ACCOUNTING 9 /* System accounting. */
-# define DOWN_TIME 10
-# define UTMAXTYPE DOWN_TIME
#endif
-
-#define RUNLVL_MSG "run-level %c"
-#define BOOT_MSG "system boot"
-#define OTIME_MSG "old time"
-#define NTIME_MSG "new time"
-#define PSRADM_MSG "%03d %s"
-#define DOWN_MSG "system down"
-
-struct futmpx
- {
- char ut_user[__UT_NAMESIZE];
- char ut_id[4];
- char ut_line[__UT_LINESIZE];
- pid32_t ut_pid;
- int16_t ut_type;
- struct
- {
- int16_t e_termination;
- int16_t e_exit;
- } ut_exit;
- struct timeval32 ut_tv;
- int32_t ut_session;
- int32_t pad[5];
- int16_t ut_syslen;
- char ut_host[__UT_HOSTSIZE];
- };
} c_un;
} Elf64_Cap;
+#define EM_AMD64 62
+#define EM_X86_64 EM_AMD64
+
+#define STV_EXPORTED 4
+#define STV_SINGLETON 5
+#define STV_ELIMINATE 6
+
+#define SHN_LOSUNW 0xff3f
+#define SHN_SUNW_IGNORE 0xff3f
+#define SHN_HISUNW 0xff3f
+
#endif /* _SYS_ELF_H */
/* Maximum hostname length. */
#define MAXHOSTNAMELEN 256
+__BEGIN_DECLS
extern long int sysconf (int __name) __THROW __attribute__ ((__const__));
+__END_DECLS
#define PAGESIZE sysconf(_SC_PAGESIZE)
#define MAXPID (pid_t)sysconf(_SC_MAXPID)
#define MAXEPHUID (uid_t)sysconf(_SC_EPHID_MAX)
#ifdef __USE_MISC
-# ifdef __amd64__
-# define REG_R15 0
-# define REG_R14 1
-# define REG_R13 2
-# define REG_R12 3
-# define REG_R11 4
-# define REG_R10 5
-# define REG_R9 6
-# define REG_R8 7
-# define REG_RDI 8
-# define REG_RSI 9
-# define REG_RBP 10
-# define REG_RBX 11
-# define REG_RDX 12
-# define REG_RCX 13
-# define REG_RAX 14
-# define REG_TRAPNO 15
-# define REG_ERR 16
-# define REG_RIP 17
-# define REG_CS 18
-# define REG_RFL 19
-# define REG_RSP 20
-# define REG_SS 21
-# define REG_FS 22
-# define REG_GS 23
-# define REG_ES 24
-# define REG_DS 25
-# define REG_FSBASE 26
-# define REG_GSBASE 27
-# define REG_PC REG_RIP
-# define REG_FP REG_RBP
-# define REG_SP REG_RSP
-# define REG_PS REG_RFL
-# define REG_R0 REG_RAX
-# define REG_R1 REG_RDX
-# else /* __i386__ */
+# define REG_R15 0
+# define REG_R14 1
+# define REG_R13 2
+# define REG_R12 3
+# define REG_R11 4
+# define REG_R10 5
+# define REG_R9 6
+# define REG_R8 7
+# define REG_RDI 8
+# define REG_RSI 9
+# define REG_RBP 10
+# define REG_RBX 11
+# define REG_RDX 12
+# define REG_RCX 13
+# define REG_RAX 14
+# define REG_TRAPNO 15
+# define REG_ERR 16
+# define REG_RIP 17
+# define REG_CS 18
+# define REG_RFL 19
+# define REG_RSP 20
+# define REG_SS 21
+# define REG_FS 22
+# define REG_GS 23
+# define REG_ES 24
+# define REG_DS 25
+# define REG_FSBASE 26
+# define REG_GSBASE 27
+
+# ifndef __SUN_COMPAT_SOURCE
# define GS 0
# define FS 1
# define ES 2
# define EFL 16
# define UESP 17
# define SS 18
-# define REG_PC EIP
-# define REG_FP EBP
-# define REG_SP UESP
-# define REG_PS EFL
-# define REG_R0 EAX
-# define REG_R1 EDX
+# endif
+
+# ifdef __amd64__
+# define REG_PC REG_RIP
+# define REG_FP REG_RBP
+# define REG_SP REG_RSP
+# define REG_PS REG_RFL
+# define REG_R0 REG_RAX
+# define REG_R1 REG_RDX
+# else /* __i386__ */
+# define REG_PC 14
+# define REG_FP 6
+# define REG_SP 17
+# define REG_PS 16
+# define REG_R0 11
+# define REG_R1 9
# endif /* __amd64__ */
#endif /* __USE_MISC */