]>
Commit | Line | Data |
---|---|---|
3a58abaf AM |
1 | gdb/ |
2 | 2009-03-02 Jan Kratochvil <jan.kratochvil@redhat.com> | |
3 | ||
4 | * configure.ac: Call AC_SYS_LARGEFILE. | |
5 | * config.in: Regenerate. | |
6 | * configure: Regenerate. | |
7 | ||
7566401a ER |
8 | Index: gdb-6.8.50.20090909/gdb/configure.ac |
9 | =================================================================== | |
10 | --- gdb-6.8.50.20090909.orig/gdb/configure.ac 2009-09-09 20:08:04.000000000 +0200 | |
11 | +++ gdb-6.8.50.20090909/gdb/configure.ac 2009-09-09 20:11:04.000000000 +0200 | |
12 | @@ -28,6 +28,7 @@ AM_MAINTAINER_MODE | |
13 | AC_PROG_CC | |
14 | AC_USE_SYSTEM_EXTENSIONS | |
3a58abaf AM |
15 | gl_EARLY |
16 | +AC_SYS_LARGEFILE | |
17 | AM_PROG_CC_STDC | |
18 | ||
19 | AC_CONFIG_AUX_DIR(..) | |
7566401a ER |
20 | Index: gdb-6.8.50.20090909/gdb/config.in |
21 | =================================================================== | |
22 | --- gdb-6.8.50.20090909.orig/gdb/config.in 2009-09-09 20:08:04.000000000 +0200 | |
23 | +++ gdb-6.8.50.20090909/gdb/config.in 2009-09-09 20:11:33.000000000 +0200 | |
24 | @@ -751,10 +751,16 @@ | |
25 | # endif | |
3a58abaf AM |
26 | #endif |
27 | ||
28 | +/* Number of bits in a file offset, on hosts where this is settable. */ | |
29 | +#undef _FILE_OFFSET_BITS | |
30 | + | |
7566401a | 31 | /* Define to 1 so <sys/proc.h> gets a definition of anon_hdl. Works around a |
3a58abaf AM |
32 | <sys/proc.h> problem on IRIX 5. */ |
33 | #undef _KMEMUSER | |
34 | ||
35 | +/* Define for large files, on AIX-style hosts. */ | |
36 | +#undef _LARGE_FILES | |
37 | + | |
38 | /* Define to 1 if on MINIX. */ | |
39 | #undef _MINIX | |
40 | ||
7566401a ER |
41 | Index: gdb-6.8.50.20090909/gdb/configure |
42 | =================================================================== | |
43 | --- gdb-6.8.50.20090909.orig/gdb/configure 2009-09-09 20:10:45.000000000 +0200 | |
44 | +++ gdb-6.8.50.20090909/gdb/configure 2009-09-09 20:11:07.000000000 +0200 | |
45 | @@ -884,6 +884,7 @@ ac_subst_files='host_makefile_frag' | |
46 | ac_user_opts=' | |
47 | enable_option_checking | |
48 | enable_maintainer_mode | |
49 | +enable_largefile | |
50 | enable_dependency_tracking | |
51 | with_separate_debug_dir | |
52 | with_gdb_datadir | |
53 | @@ -1562,6 +1563,7 @@ Optional Features: | |
3a58abaf AM |
54 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
55 | --enable-maintainer-mode enable make rules and dependencies not useful | |
56 | (and sometimes confusing) to the casual installer | |
57 | + --disable-largefile omit support for large files | |
58 | --disable-dependency-tracking speeds up one-time build | |
59 | --enable-dependency-tracking do not reject slow dependency extractors | |
7566401a ER |
60 | --enable-targets=TARGETS |
61 | @@ -4100,6 +4102,204 @@ fi | |
3a58abaf AM |
62 | |
63 | ||
64 | ||
7566401a ER |
65 | +# Check whether --enable-largefile was given. |
66 | +if test "${enable_largefile+set}" = set; then : | |
67 | + enableval=$enable_largefile; | |
68 | +fi | |
3a58abaf | 69 | + |
3a58abaf AM |
70 | +if test "$enable_largefile" != no; then |
71 | + | |
7566401a ER |
72 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 |
73 | +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } | |
74 | +if test "${ac_cv_sys_largefile_CC+set}" = set; then : | |
75 | + $as_echo_n "(cached) " >&6 | |
3a58abaf AM |
76 | +else |
77 | + ac_cv_sys_largefile_CC=no | |
78 | + if test "$GCC" != yes; then | |
79 | + ac_save_CC=$CC | |
80 | + while :; do | |
7566401a ER |
81 | + # IRIX 6.2 and later do not support large files by default, |
82 | + # so use the C compiler's -n32 option if that helps. | |
83 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3a58abaf AM |
84 | +/* end confdefs.h. */ |
85 | +#include <sys/types.h> | |
86 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
87 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
88 | + since some C++ compilers masquerading as C compilers | |
89 | + incorrectly reject 9223372036854775807. */ | |
90 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
91 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
92 | + && LARGE_OFF_T % 2147483647 == 1) | |
93 | + ? 1 : -1]; | |
94 | +int | |
95 | +main () | |
96 | +{ | |
97 | + | |
98 | + ; | |
99 | + return 0; | |
100 | +} | |
101 | +_ACEOF | |
7566401a | 102 | + if ac_fn_c_try_compile "$LINENO"; then : |
3a58abaf | 103 | + break |
3a58abaf | 104 | +fi |
7566401a ER |
105 | +rm -f core conftest.err conftest.$ac_objext |
106 | + CC="$CC -n32" | |
107 | + if ac_fn_c_try_compile "$LINENO"; then : | |
3a58abaf | 108 | + ac_cv_sys_largefile_CC=' -n32'; break |
3a58abaf | 109 | +fi |
7566401a | 110 | +rm -f core conftest.err conftest.$ac_objext |
3a58abaf AM |
111 | + break |
112 | + done | |
113 | + CC=$ac_save_CC | |
114 | + rm -f conftest.$ac_ext | |
115 | + fi | |
116 | +fi | |
7566401a ER |
117 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 |
118 | +$as_echo "$ac_cv_sys_largefile_CC" >&6; } | |
3a58abaf AM |
119 | + if test "$ac_cv_sys_largefile_CC" != no; then |
120 | + CC=$CC$ac_cv_sys_largefile_CC | |
121 | + fi | |
122 | + | |
7566401a ER |
123 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 |
124 | +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } | |
125 | +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : | |
126 | + $as_echo_n "(cached) " >&6 | |
3a58abaf AM |
127 | +else |
128 | + while :; do | |
7566401a | 129 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3a58abaf AM |
130 | +/* end confdefs.h. */ |
131 | +#include <sys/types.h> | |
132 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
133 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
134 | + since some C++ compilers masquerading as C compilers | |
135 | + incorrectly reject 9223372036854775807. */ | |
136 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
137 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
138 | + && LARGE_OFF_T % 2147483647 == 1) | |
139 | + ? 1 : -1]; | |
140 | +int | |
141 | +main () | |
142 | +{ | |
143 | + | |
144 | + ; | |
145 | + return 0; | |
146 | +} | |
147 | +_ACEOF | |
7566401a ER |
148 | +if ac_fn_c_try_compile "$LINENO"; then : |
149 | + ac_cv_sys_file_offset_bits=no; break | |
3a58abaf | 150 | +fi |
7566401a ER |
151 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
152 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3a58abaf AM |
153 | +/* end confdefs.h. */ |
154 | +#define _FILE_OFFSET_BITS 64 | |
155 | +#include <sys/types.h> | |
156 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
157 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
158 | + since some C++ compilers masquerading as C compilers | |
159 | + incorrectly reject 9223372036854775807. */ | |
160 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
161 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
162 | + && LARGE_OFF_T % 2147483647 == 1) | |
163 | + ? 1 : -1]; | |
164 | +int | |
165 | +main () | |
166 | +{ | |
167 | + | |
168 | + ; | |
169 | + return 0; | |
170 | +} | |
171 | +_ACEOF | |
7566401a | 172 | +if ac_fn_c_try_compile "$LINENO"; then : |
3a58abaf | 173 | + ac_cv_sys_file_offset_bits=64; break |
3a58abaf | 174 | +fi |
7566401a ER |
175 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
176 | + ac_cv_sys_file_offset_bits=unknown | |
3a58abaf AM |
177 | + break |
178 | +done | |
179 | +fi | |
7566401a ER |
180 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 |
181 | +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } | |
182 | +case $ac_cv_sys_file_offset_bits in #( | |
183 | + no | unknown) ;; | |
184 | + *) | |
3a58abaf AM |
185 | +cat >>confdefs.h <<_ACEOF |
186 | +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
187 | +_ACEOF | |
7566401a ER |
188 | +;; |
189 | +esac | |
190 | +rm -rf conftest* | |
191 | + if test $ac_cv_sys_file_offset_bits = unknown; then | |
192 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 | |
193 | +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } | |
194 | +if test "${ac_cv_sys_large_files+set}" = set; then : | |
195 | + $as_echo_n "(cached) " >&6 | |
3a58abaf AM |
196 | +else |
197 | + while :; do | |
7566401a | 198 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
3a58abaf AM |
199 | +/* end confdefs.h. */ |
200 | +#include <sys/types.h> | |
201 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
202 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
203 | + since some C++ compilers masquerading as C compilers | |
204 | + incorrectly reject 9223372036854775807. */ | |
205 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
206 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
207 | + && LARGE_OFF_T % 2147483647 == 1) | |
208 | + ? 1 : -1]; | |
209 | +int | |
210 | +main () | |
211 | +{ | |
212 | + | |
213 | + ; | |
214 | + return 0; | |
215 | +} | |
216 | +_ACEOF | |
7566401a ER |
217 | +if ac_fn_c_try_compile "$LINENO"; then : |
218 | + ac_cv_sys_large_files=no; break | |
3a58abaf | 219 | +fi |
7566401a ER |
220 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
221 | + cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
3a58abaf AM |
222 | +/* end confdefs.h. */ |
223 | +#define _LARGE_FILES 1 | |
224 | +#include <sys/types.h> | |
225 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
226 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
227 | + since some C++ compilers masquerading as C compilers | |
228 | + incorrectly reject 9223372036854775807. */ | |
229 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
230 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
231 | + && LARGE_OFF_T % 2147483647 == 1) | |
232 | + ? 1 : -1]; | |
233 | +int | |
234 | +main () | |
235 | +{ | |
236 | + | |
237 | + ; | |
238 | + return 0; | |
239 | +} | |
240 | +_ACEOF | |
7566401a | 241 | +if ac_fn_c_try_compile "$LINENO"; then : |
3a58abaf | 242 | + ac_cv_sys_large_files=1; break |
3a58abaf | 243 | +fi |
7566401a ER |
244 | +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
245 | + ac_cv_sys_large_files=unknown | |
3a58abaf AM |
246 | + break |
247 | +done | |
248 | +fi | |
7566401a ER |
249 | +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
250 | +$as_echo "$ac_cv_sys_large_files" >&6; } | |
251 | +case $ac_cv_sys_large_files in #( | |
252 | + no | unknown) ;; | |
253 | + *) | |
3a58abaf AM |
254 | +cat >>confdefs.h <<_ACEOF |
255 | +#define _LARGE_FILES $ac_cv_sys_large_files | |
256 | +_ACEOF | |
7566401a ER |
257 | +;; |
258 | +esac | |
259 | +rm -rf conftest* | |
260 | + fi | |
3a58abaf AM |
261 | +fi |
262 | + | |
263 | ||
264 | ||
265 |