diff options
Diffstat (limited to 'libc/sysdeps/linux/common/bits')
| -rw-r--r-- | libc/sysdeps/linux/common/bits/mman.h | 12 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/bits/utmp.h | 21 | ||||
| -rw-r--r-- | libc/sysdeps/linux/common/bits/utmpx.h | 16 |
3 files changed, 46 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/bits/mman.h b/libc/sysdeps/linux/common/bits/mman.h index f567b9baa..0c1590270 100644 --- a/libc/sysdeps/linux/common/bits/mman.h +++ b/libc/sysdeps/linux/common/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. - Copyright (C) 1994-1998,2000,01 Free Software Foundation, Inc. + Copyright (C) 1994-1998,2000,01,02,05 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 @@ -80,6 +80,16 @@ # define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ #endif +/* Flags to `msync'. */ +#define MS_ASYNC 1 /* Sync memory asynchronously. */ +#define MS_SYNC 0 /* Synchronous memory sync. */ +#define MS_INVALIDATE 2 /* Invalidate the caches. */ + +/* Flags for `mremap'. */ +#ifdef __USE_GNU +# define MREMAP_MAYMOVE 1 /* Mapping address may change. */ +# define MREMAP_FIXED 2 /* Fifth argument sets new address. */ +#endif /* Flags for `mlockall' (can be OR'd together). */ #define MCL_CURRENT 1 /* Lock all currently mapped pages. */ diff --git a/libc/sysdeps/linux/common/bits/utmp.h b/libc/sysdeps/linux/common/bits/utmp.h index 2ed29bbb4..e855ad73f 100644 --- a/libc/sysdeps/linux/common/bits/utmp.h +++ b/libc/sysdeps/linux/common/bits/utmp.h @@ -1,5 +1,6 @@ /* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1993, 1996, 1997, 1998, 1999, 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 @@ -24,6 +25,7 @@ #include <paths.h> #include <sys/time.h> #include <sys/types.h> +#include <bits/wordsize.h> #define UT_LINESIZE 32 @@ -35,7 +37,11 @@ previous logins. */ struct lastlog { +#if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 + int32_t ll_time; +#else __time_t ll_time; +#endif char ll_line[UT_LINESIZE]; char ll_host[UT_HOSTSIZE]; }; @@ -61,8 +67,21 @@ struct utmp char ut_host[UT_HOSTSIZE]; /* Hostname for remote login. */ struct exit_status ut_exit; /* Exit status of a process marked as DEAD_PROCESS. */ +/* 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. */ }; diff --git a/libc/sysdeps/linux/common/bits/utmpx.h b/libc/sysdeps/linux/common/bits/utmpx.h index 99735370b..c84cda6fe 100644 --- a/libc/sysdeps/linux/common/bits/utmpx.h +++ b/libc/sysdeps/linux/common/bits/utmpx.h @@ -1,5 +1,5 @@ /* Structures and definitions for the user accounting database. GNU version. - Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc. + 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 @@ -23,6 +23,7 @@ #include <bits/types.h> #include <sys/time.h> +#include <bits/wordsize.h> #ifdef __USE_GNU @@ -62,8 +63,21 @@ struct utmpx 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. */ +#endif __int32_t ut_addr_v6[4]; /* Internet address of remote host. */ char __unused[20]; /* Reserved for future use. */ }; |
