]>
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 | ||
8 | diff -up -rup gdb-orig/configure.ac gdb/configure.ac | |
9 | --- ./gdb-orig/configure.ac 2009-03-02 23:39:01.000000000 +0100 | |
10 | +++ ./gdb/configure.ac 2009-03-02 23:40:46.000000000 +0100 | |
11 | @@ -30,6 +30,7 @@ AC_GNU_SOURCE | |
12 | AC_AIX | |
13 | AC_ISC_POSIX | |
14 | gl_EARLY | |
15 | +AC_SYS_LARGEFILE | |
16 | AM_PROG_CC_STDC | |
17 | ||
18 | AC_CONFIG_AUX_DIR(..) | |
19 | diff -up -rup gdb-orig/config.in gdb/config.in | |
20 | --- ./gdb-orig/config.in 2009-03-02 23:39:01.000000000 +0100 | |
21 | +++ ./gdb/config.in 2009-03-02 23:40:53.000000000 +0100 | |
22 | @@ -725,6 +725,9 @@ | |
23 | # undef _ALL_SOURCE | |
24 | #endif | |
25 | ||
26 | +/* Number of bits in a file offset, on hosts where this is settable. */ | |
27 | +#undef _FILE_OFFSET_BITS | |
28 | + | |
29 | /* Enable GNU extensions on systems that have them. */ | |
30 | #ifndef _GNU_SOURCE | |
31 | # undef _GNU_SOURCE | |
32 | @@ -734,6 +737,9 @@ | |
33 | <sys/proc.h> problem on IRIX 5. */ | |
34 | #undef _KMEMUSER | |
35 | ||
36 | +/* Define for large files, on AIX-style hosts. */ | |
37 | +#undef _LARGE_FILES | |
38 | + | |
39 | /* Define to 1 if on MINIX. */ | |
40 | #undef _MINIX | |
41 | ||
42 | diff -up -rup gdb-orig/configure gdb/configure | |
43 | --- ./gdb-orig/configure 2009-03-02 23:39:01.000000000 +0100 | |
44 | +++ ./gdb/configure 2009-03-02 23:40:49.000000000 +0100 | |
45 | @@ -862,6 +862,7 @@ Optional Features: | |
46 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
47 | --enable-maintainer-mode enable make rules and dependencies not useful | |
48 | (and sometimes confusing) to the casual installer | |
49 | + --disable-largefile omit support for large files | |
50 | --disable-dependency-tracking speeds up one-time build | |
51 | --enable-dependency-tracking do not reject slow dependency extractors | |
52 | --enable-targets alternative target configurations | |
53 | @@ -3313,6 +3314,370 @@ _ACEOF | |
54 | ||
55 | ||
56 | ||
57 | +# Check whether --enable-largefile or --disable-largefile was given. | |
58 | +if test "${enable_largefile+set}" = set; then | |
59 | + enableval="$enable_largefile" | |
60 | + | |
61 | +fi; | |
62 | +if test "$enable_largefile" != no; then | |
63 | + | |
64 | + echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 | |
65 | +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 | |
66 | +if test "${ac_cv_sys_largefile_CC+set}" = set; then | |
67 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
68 | +else | |
69 | + ac_cv_sys_largefile_CC=no | |
70 | + if test "$GCC" != yes; then | |
71 | + ac_save_CC=$CC | |
72 | + while :; do | |
73 | + # IRIX 6.2 and later do not support large files by default, | |
74 | + # so use the C compiler's -n32 option if that helps. | |
75 | + cat >conftest.$ac_ext <<_ACEOF | |
76 | +/* confdefs.h. */ | |
77 | +_ACEOF | |
78 | +cat confdefs.h >>conftest.$ac_ext | |
79 | +cat >>conftest.$ac_ext <<_ACEOF | |
80 | +/* end confdefs.h. */ | |
81 | +#include <sys/types.h> | |
82 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
83 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
84 | + since some C++ compilers masquerading as C compilers | |
85 | + incorrectly reject 9223372036854775807. */ | |
86 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
87 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
88 | + && LARGE_OFF_T % 2147483647 == 1) | |
89 | + ? 1 : -1]; | |
90 | +int | |
91 | +main () | |
92 | +{ | |
93 | + | |
94 | + ; | |
95 | + return 0; | |
96 | +} | |
97 | +_ACEOF | |
98 | + rm -f conftest.$ac_objext | |
99 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
100 | + (eval $ac_compile) 2>conftest.er1 | |
101 | + ac_status=$? | |
102 | + grep -v '^ *+' conftest.er1 >conftest.err | |
103 | + rm -f conftest.er1 | |
104 | + cat conftest.err >&5 | |
105 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
106 | + (exit $ac_status); } && | |
107 | + { ac_try='test -z "$ac_c_werror_flag" | |
108 | + || test ! -s conftest.err' | |
109 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
110 | + (eval $ac_try) 2>&5 | |
111 | + ac_status=$? | |
112 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
113 | + (exit $ac_status); }; } && | |
114 | + { ac_try='test -s conftest.$ac_objext' | |
115 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
116 | + (eval $ac_try) 2>&5 | |
117 | + ac_status=$? | |
118 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
119 | + (exit $ac_status); }; }; then | |
120 | + break | |
121 | +else | |
122 | + echo "$as_me: failed program was:" >&5 | |
123 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
124 | + | |
125 | +fi | |
126 | +rm -f conftest.err conftest.$ac_objext | |
127 | + CC="$CC -n32" | |
128 | + rm -f conftest.$ac_objext | |
129 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
130 | + (eval $ac_compile) 2>conftest.er1 | |
131 | + ac_status=$? | |
132 | + grep -v '^ *+' conftest.er1 >conftest.err | |
133 | + rm -f conftest.er1 | |
134 | + cat conftest.err >&5 | |
135 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
136 | + (exit $ac_status); } && | |
137 | + { ac_try='test -z "$ac_c_werror_flag" | |
138 | + || test ! -s conftest.err' | |
139 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
140 | + (eval $ac_try) 2>&5 | |
141 | + ac_status=$? | |
142 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
143 | + (exit $ac_status); }; } && | |
144 | + { ac_try='test -s conftest.$ac_objext' | |
145 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
146 | + (eval $ac_try) 2>&5 | |
147 | + ac_status=$? | |
148 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
149 | + (exit $ac_status); }; }; then | |
150 | + ac_cv_sys_largefile_CC=' -n32'; break | |
151 | +else | |
152 | + echo "$as_me: failed program was:" >&5 | |
153 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
154 | + | |
155 | +fi | |
156 | +rm -f conftest.err conftest.$ac_objext | |
157 | + break | |
158 | + done | |
159 | + CC=$ac_save_CC | |
160 | + rm -f conftest.$ac_ext | |
161 | + fi | |
162 | +fi | |
163 | +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 | |
164 | +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 | |
165 | + if test "$ac_cv_sys_largefile_CC" != no; then | |
166 | + CC=$CC$ac_cv_sys_largefile_CC | |
167 | + fi | |
168 | + | |
169 | + echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 | |
170 | +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 | |
171 | +if test "${ac_cv_sys_file_offset_bits+set}" = set; then | |
172 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
173 | +else | |
174 | + while :; do | |
175 | + ac_cv_sys_file_offset_bits=no | |
176 | + cat >conftest.$ac_ext <<_ACEOF | |
177 | +/* confdefs.h. */ | |
178 | +_ACEOF | |
179 | +cat confdefs.h >>conftest.$ac_ext | |
180 | +cat >>conftest.$ac_ext <<_ACEOF | |
181 | +/* end confdefs.h. */ | |
182 | +#include <sys/types.h> | |
183 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
184 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
185 | + since some C++ compilers masquerading as C compilers | |
186 | + incorrectly reject 9223372036854775807. */ | |
187 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
188 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
189 | + && LARGE_OFF_T % 2147483647 == 1) | |
190 | + ? 1 : -1]; | |
191 | +int | |
192 | +main () | |
193 | +{ | |
194 | + | |
195 | + ; | |
196 | + return 0; | |
197 | +} | |
198 | +_ACEOF | |
199 | +rm -f conftest.$ac_objext | |
200 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
201 | + (eval $ac_compile) 2>conftest.er1 | |
202 | + ac_status=$? | |
203 | + grep -v '^ *+' conftest.er1 >conftest.err | |
204 | + rm -f conftest.er1 | |
205 | + cat conftest.err >&5 | |
206 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
207 | + (exit $ac_status); } && | |
208 | + { ac_try='test -z "$ac_c_werror_flag" | |
209 | + || test ! -s conftest.err' | |
210 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
211 | + (eval $ac_try) 2>&5 | |
212 | + ac_status=$? | |
213 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
214 | + (exit $ac_status); }; } && | |
215 | + { ac_try='test -s conftest.$ac_objext' | |
216 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
217 | + (eval $ac_try) 2>&5 | |
218 | + ac_status=$? | |
219 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
220 | + (exit $ac_status); }; }; then | |
221 | + break | |
222 | +else | |
223 | + echo "$as_me: failed program was:" >&5 | |
224 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
225 | + | |
226 | +fi | |
227 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
228 | + cat >conftest.$ac_ext <<_ACEOF | |
229 | +/* confdefs.h. */ | |
230 | +_ACEOF | |
231 | +cat confdefs.h >>conftest.$ac_ext | |
232 | +cat >>conftest.$ac_ext <<_ACEOF | |
233 | +/* end confdefs.h. */ | |
234 | +#define _FILE_OFFSET_BITS 64 | |
235 | +#include <sys/types.h> | |
236 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
237 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
238 | + since some C++ compilers masquerading as C compilers | |
239 | + incorrectly reject 9223372036854775807. */ | |
240 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
241 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
242 | + && LARGE_OFF_T % 2147483647 == 1) | |
243 | + ? 1 : -1]; | |
244 | +int | |
245 | +main () | |
246 | +{ | |
247 | + | |
248 | + ; | |
249 | + return 0; | |
250 | +} | |
251 | +_ACEOF | |
252 | +rm -f conftest.$ac_objext | |
253 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
254 | + (eval $ac_compile) 2>conftest.er1 | |
255 | + ac_status=$? | |
256 | + grep -v '^ *+' conftest.er1 >conftest.err | |
257 | + rm -f conftest.er1 | |
258 | + cat conftest.err >&5 | |
259 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
260 | + (exit $ac_status); } && | |
261 | + { ac_try='test -z "$ac_c_werror_flag" | |
262 | + || test ! -s conftest.err' | |
263 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
264 | + (eval $ac_try) 2>&5 | |
265 | + ac_status=$? | |
266 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
267 | + (exit $ac_status); }; } && | |
268 | + { ac_try='test -s conftest.$ac_objext' | |
269 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
270 | + (eval $ac_try) 2>&5 | |
271 | + ac_status=$? | |
272 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
273 | + (exit $ac_status); }; }; then | |
274 | + ac_cv_sys_file_offset_bits=64; break | |
275 | +else | |
276 | + echo "$as_me: failed program was:" >&5 | |
277 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
278 | + | |
279 | +fi | |
280 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
281 | + break | |
282 | +done | |
283 | +fi | |
284 | +echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 | |
285 | +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 | |
286 | +if test "$ac_cv_sys_file_offset_bits" != no; then | |
287 | + | |
288 | +cat >>confdefs.h <<_ACEOF | |
289 | +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits | |
290 | +_ACEOF | |
291 | + | |
292 | +fi | |
293 | +rm -f conftest* | |
294 | + echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 | |
295 | +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 | |
296 | +if test "${ac_cv_sys_large_files+set}" = set; then | |
297 | + echo $ECHO_N "(cached) $ECHO_C" >&6 | |
298 | +else | |
299 | + while :; do | |
300 | + ac_cv_sys_large_files=no | |
301 | + cat >conftest.$ac_ext <<_ACEOF | |
302 | +/* confdefs.h. */ | |
303 | +_ACEOF | |
304 | +cat confdefs.h >>conftest.$ac_ext | |
305 | +cat >>conftest.$ac_ext <<_ACEOF | |
306 | +/* end confdefs.h. */ | |
307 | +#include <sys/types.h> | |
308 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
309 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
310 | + since some C++ compilers masquerading as C compilers | |
311 | + incorrectly reject 9223372036854775807. */ | |
312 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
313 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
314 | + && LARGE_OFF_T % 2147483647 == 1) | |
315 | + ? 1 : -1]; | |
316 | +int | |
317 | +main () | |
318 | +{ | |
319 | + | |
320 | + ; | |
321 | + return 0; | |
322 | +} | |
323 | +_ACEOF | |
324 | +rm -f conftest.$ac_objext | |
325 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
326 | + (eval $ac_compile) 2>conftest.er1 | |
327 | + ac_status=$? | |
328 | + grep -v '^ *+' conftest.er1 >conftest.err | |
329 | + rm -f conftest.er1 | |
330 | + cat conftest.err >&5 | |
331 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
332 | + (exit $ac_status); } && | |
333 | + { ac_try='test -z "$ac_c_werror_flag" | |
334 | + || test ! -s conftest.err' | |
335 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
336 | + (eval $ac_try) 2>&5 | |
337 | + ac_status=$? | |
338 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
339 | + (exit $ac_status); }; } && | |
340 | + { ac_try='test -s conftest.$ac_objext' | |
341 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
342 | + (eval $ac_try) 2>&5 | |
343 | + ac_status=$? | |
344 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
345 | + (exit $ac_status); }; }; then | |
346 | + break | |
347 | +else | |
348 | + echo "$as_me: failed program was:" >&5 | |
349 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
350 | + | |
351 | +fi | |
352 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
353 | + cat >conftest.$ac_ext <<_ACEOF | |
354 | +/* confdefs.h. */ | |
355 | +_ACEOF | |
356 | +cat confdefs.h >>conftest.$ac_ext | |
357 | +cat >>conftest.$ac_ext <<_ACEOF | |
358 | +/* end confdefs.h. */ | |
359 | +#define _LARGE_FILES 1 | |
360 | +#include <sys/types.h> | |
361 | + /* Check that off_t can represent 2**63 - 1 correctly. | |
362 | + We can't simply define LARGE_OFF_T to be 9223372036854775807, | |
363 | + since some C++ compilers masquerading as C compilers | |
364 | + incorrectly reject 9223372036854775807. */ | |
365 | +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) | |
366 | + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 | |
367 | + && LARGE_OFF_T % 2147483647 == 1) | |
368 | + ? 1 : -1]; | |
369 | +int | |
370 | +main () | |
371 | +{ | |
372 | + | |
373 | + ; | |
374 | + return 0; | |
375 | +} | |
376 | +_ACEOF | |
377 | +rm -f conftest.$ac_objext | |
378 | +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |
379 | + (eval $ac_compile) 2>conftest.er1 | |
380 | + ac_status=$? | |
381 | + grep -v '^ *+' conftest.er1 >conftest.err | |
382 | + rm -f conftest.er1 | |
383 | + cat conftest.err >&5 | |
384 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
385 | + (exit $ac_status); } && | |
386 | + { ac_try='test -z "$ac_c_werror_flag" | |
387 | + || test ! -s conftest.err' | |
388 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
389 | + (eval $ac_try) 2>&5 | |
390 | + ac_status=$? | |
391 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
392 | + (exit $ac_status); }; } && | |
393 | + { ac_try='test -s conftest.$ac_objext' | |
394 | + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | |
395 | + (eval $ac_try) 2>&5 | |
396 | + ac_status=$? | |
397 | + echo "$as_me:$LINENO: \$? = $ac_status" >&5 | |
398 | + (exit $ac_status); }; }; then | |
399 | + ac_cv_sys_large_files=1; break | |
400 | +else | |
401 | + echo "$as_me: failed program was:" >&5 | |
402 | +sed 's/^/| /' conftest.$ac_ext >&5 | |
403 | + | |
404 | +fi | |
405 | +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext | |
406 | + break | |
407 | +done | |
408 | +fi | |
409 | +echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 | |
410 | +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 | |
411 | +if test "$ac_cv_sys_large_files" != no; then | |
412 | + | |
413 | +cat >>confdefs.h <<_ACEOF | |
414 | +#define _LARGE_FILES $ac_cv_sys_large_files | |
415 | +_ACEOF | |
416 | + | |
417 | +fi | |
418 | +rm -f conftest* | |
419 | +fi | |
420 | + | |
421 | ||
422 | ||
423 |