@@ -1031,7 +1031,7 @@ __gnat_install_handler (void)
exceptions. Make sure that the handler isn't interrupted by another
signal that might cause a scheduling event! */
- act.sa_handler = __gnat_error_handler;
+ act.sa_sigaction = __gnat_error_handler;
act.sa_flags = SA_NODEFER | SA_RESTART | SA_SIGINFO;
sigemptyset (&act.sa_mask);
@@ -482,12 +482,12 @@ __gnat_backtrace (void **array,
while (cnt < size)
{
if (STOP_FRAME (current, top_stack) ||
- !VALID_STACK_FRAME((char *)(current->return_address + PC_ADJUST)))
+ !VALID_STACK_FRAME(((char *) current->return_address) + PC_ADJUST))
break;
if (current->return_address < exclude_min
|| current->return_address > exclude_max)
- array[cnt++] = current->return_address + PC_ADJUST;
+ array[cnt++] = ((char *) current->return_address) + PC_ADJUST;
current = (struct layout *) ((size_t) current->next + FRAME_OFFSET (1));
}
@@ -1,5 +1,6 @@
/* Solaris support needed only by C/C++ frontends.
- Copyright (C) 2004, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2009, 2010, 2011
+ Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GCC.
@@ -68,7 +69,7 @@ static const format_char_info cmn_err_ch
{ NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }
};
-const format_kind_info solaris_format_types[] = {
+EXPORTED_CONST format_kind_info solaris_format_types[] = {
{ "cmn_err", cmn_err_length_specs, cmn_err_char_table, "", NULL,
cmn_err_flag_specs, cmn_err_flag_pairs,
FMT_FLAG_ARG_CONVERT|FMT_FLAG_EMPTY_PREC_OK,
@@ -1041,7 +1041,14 @@ case "${host}" in
esac
AC_FUNC_FORK
-AM_ICONV
+# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different
+# iconv() prototype.
+AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"],
+ [AC_LANG_PUSH([C++])
+ AM_ICONV
+ AC_LANG_POP([C++])],
+ [AM_ICONV])
+
# Until we have in-tree GNU iconv:
LIBICONV_DEP=
AC_SUBST(LIBICONV_DEP)
@@ -102,7 +102,13 @@ if test $ac_cv_type_uchar = yes; then
[Define if <sys/types.h> defines \`uchar'.])
fi
-AM_ICONV
+# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different
+# iconv() prototype.
+AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"],
+ [AC_LANG_PUSH([C++])
+ AM_ICONV
+ AC_LANG_POP([C++])],
+ [AM_ICONV])
# More defines and substitutions.
PACKAGE="$PACKAGE_TARNAME"
@@ -1,6 +1,6 @@
/* Get common system includes and various definitions and declarations based
on autoconf macros.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GCC.
@@ -353,8 +353,8 @@ extern void abort (void);
compilers, including G++. -- gdr, 2005-05-18 */
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \
- ((!defined(__cplusplus) && (GCC_VERSION >= 2007)) \
- || (__STDC_VERSION__ >= 199901L))
+ (!defined(__cplusplus) \
+ && ((GCC_VERSION >= 2007) || (__STDC_VERSION__ >= 199901L)))
#endif
#ifndef offsetof