chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / debian / patches / any / local-no-pagesize.diff
1 ---
2  ports/sysdeps/unix/sysv/linux/alpha/sys/user.h |    4 ++--
3  ports/sysdeps/unix/sysv/linux/mips/sys/user.h  |    4 ++--
4  sysdeps/unix/sysv/linux/ia64/sys/user.h        |    3 ++-
5  sysdeps/unix/sysv/linux/x86_64/sys/user.h      |    4 ++--
6  4 files changed, 8 insertions(+), 7 deletions(-)
7
8 --- a/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h
9 +++ b/ports/sysdeps/unix/sysv/linux/alpha/sys/user.h
10 @@ -23,7 +23,7 @@
11     only. Don't read too much into it. Don't use it for anything other
12     than gdb/strace unless you know what you are doing. */
13  
14 -#include <asm/page.h>
15 +#include <unistd.h>
16  #include <asm/reg.h>
17  
18  struct user
19 @@ -41,7 +41,7 @@
20    char u_comm[32];                             /* user command name */
21  };
22  
23 -#define NBPG                   PAGE_SIZE
24 +#define NBPG                   (sysconf(_SC_PAGESIZE))
25  #define UPAGES                 1
26  #define HOST_TEXT_START_ADDR   (u.start_code)
27  #define HOST_DATA_START_ADDR   (u.start_data)
28 --- a/sysdeps/unix/sysv/linux/ia64/sys/user.h
29 +++ b/sysdeps/unix/sysv/linux/ia64/sys/user.h
30 @@ -21,6 +21,7 @@
31  
32  #include <features.h>
33  #include <sys/types.h>
34 +#include <unistd.h>
35  
36  /* This definition comes directly from the kernel headers.  If
37     anything changes in them this header has to be changed, too.  */
38 @@ -45,7 +46,7 @@
39    char u_comm[32];                             /* User command name.  */
40  };
41  
42 -#define NBPG                   PAGE_SIZE
43 +#define NBPG                   (sysconf(_SC_PAGESIZE))
44  #define UPAGES                 1
45  #define HOST_TEXT_START_ADDR   (u.start_code)
46  #define HOST_DATA_START_ADDR   (u.start_data)
47 --- a/ports/sysdeps/unix/sysv/linux/mips/sys/user.h
48 +++ b/ports/sysdeps/unix/sysv/linux/mips/sys/user.h
49 @@ -20,6 +20,7 @@
50  #define _SYS_USER_H    1
51  
52  #include <sgidefs.h>
53 +#include <unistd.h>
54  
55  /* The whole purpose of this file is for GDB and GDB only.  Don't read
56     too much into it.  Don't use it for anything other than GDB unless
57 @@ -207,8 +208,7 @@
58  
59  #endif
60  
61 -#define PAGE_SHIFT             12
62 -#define PAGE_SIZE              (1UL << PAGE_SHIFT)
63 +#define PAGE_SIZE              (sysconf(_SC_PAGESIZE))
64  #define PAGE_MASK              (~(PAGE_SIZE-1))
65  #define NBPG                   PAGE_SIZE
66  #define UPAGES                 1
67 --- a/sysdeps/unix/sysv/linux/x86_64/sys/user.h
68 +++ b/sysdeps/unix/sysv/linux/x86_64/sys/user.h
69 @@ -24,6 +24,7 @@
70     you know what you are doing.  */
71  
72  #include <bits/wordsize.h>
73 +#include <unistd.h>
74  
75  #if __WORDSIZE == 64
76  
77 @@ -164,8 +165,7 @@
78  };
79  #endif  /* __WORDSIZE */
80  
81 -#define PAGE_SHIFT             12
82 -#define PAGE_SIZE              (1UL << PAGE_SHIFT)
83 +#define PAGE_SIZE              (sysconf(_SC_PAGESIZE))
84  #define PAGE_MASK              (~(PAGE_SIZE-1))
85  #define NBPG                   PAGE_SIZE
86  #define UPAGES                 1