configure.ac: Check for caddr_t, define to char * if not defined.
2008-07-06 Andreas Tobler <a.tobler@schweiz.org> * configure.ac: Check for caddr_t, define to char * if not defined. * configure: Regenerate. * ggc-common.c (mmap_gt_pch_get_address): Fix -Wc++-compat warnings. (mmap_gt_pch_use_address): Likewise. * config/host-solaris.c (sol_gt_pch_use_address): Likewise. From-SVN: r137538
This commit is contained in:
parent
ee7d4b57a5
commit
bba09b5aac
@ -1,3 +1,11 @@
|
|||||||
|
2008-07-06 Andreas Tobler <a.tobler@schweiz.org>
|
||||||
|
|
||||||
|
* configure.ac: Check for caddr_t, define to char * if not defined.
|
||||||
|
* configure: Regenerate.
|
||||||
|
* ggc-common.c (mmap_gt_pch_get_address): Fix -Wc++-compat warnings.
|
||||||
|
(mmap_gt_pch_use_address): Likewise.
|
||||||
|
* config/host-solaris.c (sol_gt_pch_use_address): Likewise.
|
||||||
|
|
||||||
2008-07-06 Richard Guenther <rguenther@suse.de>
|
2008-07-06 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
* tree-ssa-structalias.c (struct variable_info): Remove has_union.
|
* tree-ssa-structalias.c (struct variable_info): Remove has_union.
|
||||||
|
@ -42,7 +42,7 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
|
|||||||
if (size == 0)
|
if (size == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
|
addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
|
||||||
fd, offset);
|
fd, offset);
|
||||||
|
|
||||||
/* Solaris isn't good about honoring the mmap START parameter
|
/* Solaris isn't good about honoring the mmap START parameter
|
||||||
@ -55,18 +55,18 @@ sol_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
|
|||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
if (addr != (void *) MAP_FAILED)
|
if (addr != (void *) MAP_FAILED)
|
||||||
munmap (addr, size);
|
munmap ((caddr_t) addr, size);
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
for (i = 0; i < size; i += page_size)
|
for (i = 0; i < size; i += page_size)
|
||||||
if (mincore ((char *)base + i, page_size, (void *)&one_byte) == -1
|
if (mincore ((char *)base + i, page_size, (char *) &one_byte) == -1
|
||||||
&& errno == ENOMEM)
|
&& errno == ENOMEM)
|
||||||
continue; /* The page is not mapped. */
|
continue; /* The page is not mapped. */
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (i >= size)
|
if (i >= size)
|
||||||
addr = mmap (base, size,
|
addr = mmap ((caddr_t) base, size,
|
||||||
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED,
|
PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED,
|
||||||
fd, offset);
|
fd, offset);
|
||||||
}
|
}
|
||||||
|
94
gcc/configure
vendored
94
gcc/configure
vendored
@ -10326,6 +10326,72 @@ _ACEOF
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "$as_me:$LINENO: checking for caddr_t" >&5
|
||||||
|
echo $ECHO_N "checking for caddr_t... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_type_caddr_t+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
$ac_includes_default
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
if ((caddr_t *) 0)
|
||||||
|
return 0;
|
||||||
|
if (sizeof (caddr_t))
|
||||||
|
return 0;
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
|
(eval $ac_compile) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag"
|
||||||
|
|| test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_type_caddr_t=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_type_caddr_t=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_type_caddr_t" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_type_caddr_t" >&6
|
||||||
|
if test $ac_cv_type_caddr_t = yes; then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define caddr_t char *
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Try to determine the array type of the second argument of getgroups
|
# Try to determine the array type of the second argument of getgroups
|
||||||
# for the target system (int or gid_t).
|
# for the target system (int or gid_t).
|
||||||
@ -14659,13 +14725,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
|
|||||||
else
|
else
|
||||||
lt_cv_nm_interface="BSD nm"
|
lt_cv_nm_interface="BSD nm"
|
||||||
echo "int some_variable = 0;" > conftest.$ac_ext
|
echo "int some_variable = 0;" > conftest.$ac_ext
|
||||||
(eval echo "\"\$as_me:14662: $ac_compile\"" >&5)
|
(eval echo "\"\$as_me:14728: $ac_compile\"" >&5)
|
||||||
(eval "$ac_compile" 2>conftest.err)
|
(eval "$ac_compile" 2>conftest.err)
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
(eval echo "\"\$as_me:14665: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
(eval echo "\"\$as_me:14731: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
|
||||||
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
(eval echo "\"\$as_me:14668: output\"" >&5)
|
(eval echo "\"\$as_me:14734: output\"" >&5)
|
||||||
cat conftest.out >&5
|
cat conftest.out >&5
|
||||||
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
|
||||||
lt_cv_nm_interface="MS dumpbin"
|
lt_cv_nm_interface="MS dumpbin"
|
||||||
@ -15720,7 +15786,7 @@ ia64-*-hpux*)
|
|||||||
;;
|
;;
|
||||||
*-*-irix6*)
|
*-*-irix6*)
|
||||||
# Find out which ABI we are using.
|
# Find out which ABI we are using.
|
||||||
echo '#line 15723 "configure"' > conftest.$ac_ext
|
echo '#line 15789 "configure"' > conftest.$ac_ext
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
(eval $ac_compile) 2>&5
|
(eval $ac_compile) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
@ -16340,11 +16406,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:16343: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:16409: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>conftest.err)
|
(eval "$lt_compile" 2>conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
echo "$as_me:16347: \$? = $ac_status" >&5
|
echo "$as_me:16413: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings other than the usual output.
|
# So say no if there are warnings other than the usual output.
|
||||||
@ -16662,11 +16728,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:16665: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:16731: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>conftest.err)
|
(eval "$lt_compile" 2>conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat conftest.err >&5
|
cat conftest.err >&5
|
||||||
echo "$as_me:16669: \$? = $ac_status" >&5
|
echo "$as_me:16735: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
# So say no if there are warnings other than the usual output.
|
# So say no if there are warnings other than the usual output.
|
||||||
@ -16767,11 +16833,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:16770: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:16836: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>out/conftest.err)
|
(eval "$lt_compile" 2>out/conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat out/conftest.err >&5
|
cat out/conftest.err >&5
|
||||||
echo "$as_me:16774: \$? = $ac_status" >&5
|
echo "$as_me:16840: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||||
then
|
then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
@ -16822,11 +16888,11 @@ else
|
|||||||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||||
-e 's:$: $lt_compiler_flag:'`
|
-e 's:$: $lt_compiler_flag:'`
|
||||||
(eval echo "\"\$as_me:16825: $lt_compile\"" >&5)
|
(eval echo "\"\$as_me:16891: $lt_compile\"" >&5)
|
||||||
(eval "$lt_compile" 2>out/conftest.err)
|
(eval "$lt_compile" 2>out/conftest.err)
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
cat out/conftest.err >&5
|
cat out/conftest.err >&5
|
||||||
echo "$as_me:16829: \$? = $ac_status" >&5
|
echo "$as_me:16895: \$? = $ac_status" >&5
|
||||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||||
then
|
then
|
||||||
# The compiler can only warn and ignore the option if not recognized
|
# The compiler can only warn and ignore the option if not recognized
|
||||||
@ -19619,7 +19685,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 19622 "configure"
|
#line 19688 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -19719,7 +19785,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 19722 "configure"
|
#line 19788 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
@ -1010,6 +1010,7 @@ int main()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_TYPE(ssize_t, int)
|
AC_CHECK_TYPE(ssize_t, int)
|
||||||
|
AC_CHECK_TYPE(caddr_t, char *)
|
||||||
|
|
||||||
# Try to determine the array type of the second argument of getgroups
|
# Try to determine the array type of the second argument of getgroups
|
||||||
# for the target system (int or gid_t).
|
# for the target system (int or gid_t).
|
||||||
|
@ -638,7 +638,7 @@ mmap_gt_pch_get_address (size_t size, int fd)
|
|||||||
if (ret == (void *) MAP_FAILED)
|
if (ret == (void *) MAP_FAILED)
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
else
|
else
|
||||||
munmap (ret, size);
|
munmap ((caddr_t) ret, size);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -662,7 +662,7 @@ mmap_gt_pch_use_address (void *base, size_t size, int fd, size_t offset)
|
|||||||
if (size == 0)
|
if (size == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
addr = mmap (base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
|
addr = mmap ((caddr_t) base, size, PROT_READ | PROT_WRITE, MAP_PRIVATE,
|
||||||
fd, offset);
|
fd, offset);
|
||||||
|
|
||||||
return addr == base ? 1 : -1;
|
return addr == base ? 1 : -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user