* cris/configure.ac: Check for limits.h and sys/param.h.
* cris/configure, cris/config.in: Rebuild. * cris/traps.c (SIM_PATHMAX): New macro. (cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.
This commit is contained in:
parent
a0cd8207a6
commit
3ca4d560ef
@ -1,3 +1,10 @@
|
||||
2006-09-29 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* cris/configure.ac: Check for limits.h and sys/param.h.
|
||||
* cris/configure, cris/config.in: Rebuild.
|
||||
* cris/traps.c (SIM_PATHMAX): New macro.
|
||||
(cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.
|
||||
|
||||
2006-08-08 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* configure.ac (sparc-*-rtems*|sparc-*-elf*): Enable erc32 simulator.
|
||||
|
@ -0,0 +1,108 @@
|
||||
/* config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the <fpu_control.h> header file. */
|
||||
#undef HAVE_FPU_CONTROL_H
|
||||
|
||||
/* Define to 1 if you have the `getrusage' function. */
|
||||
#undef HAVE_GETRUSAGE
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
#undef HAVE_LIBNSL
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
#undef HAVE_LIBSOCKET
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `sigaction' function. */
|
||||
#undef HAVE_SIGACTION
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#undef HAVE_SYS_PARAM_H
|
||||
|
||||
/* Define to 1 if you have the <sys/resource.h> header file. */
|
||||
#undef HAVE_SYS_RESOURCE_H
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#undef HAVE_SYS_SELECT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the `time' function. */
|
||||
#undef HAVE_TIME
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `__setfpucw' function. */
|
||||
#undef HAVE___SETFPUCW
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define to 1 if your processor stores words with the most significant byte
|
||||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
4
sim/cris/configure
vendored
4
sim/cris/configure
vendored
@ -4355,7 +4355,9 @@ sim_link_links="${sim_link_links} targ-vals.def"
|
||||
# For dv-rv and rvdummy.
|
||||
|
||||
|
||||
for ac_header in sys/socket.h sys/select.h
|
||||
|
||||
|
||||
for ac_header in sys/socket.h sys/select.h limits.h sys/param.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
|
@ -10,7 +10,7 @@ sinclude(../common/aclocal.m4)
|
||||
sinclude(../common/common.m4)
|
||||
|
||||
# For dv-rv and rvdummy.
|
||||
AC_CHECK_HEADERS(sys/socket.h sys/select.h)
|
||||
AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
|
||||
|
||||
SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
|
||||
SIM_AC_OPTION_HOSTENDIAN
|
||||
|
@ -38,6 +38,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#ifdef HAVE_SYS_STAT_H
|
||||
#include <sys/stat.h>
|
||||
#endif
|
||||
/* For PATH_MAX, originally. */
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
/* From ld/sysdep.h. */
|
||||
#ifdef PATH_MAX
|
||||
# define SIM_PATHMAX PATH_MAX
|
||||
#else
|
||||
# ifdef MAXPATHLEN
|
||||
# define SIM_PATHMAX MAXPATHLEN
|
||||
# else
|
||||
# define SIM_PATHMAX 1024
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The verbatim values are from asm-cris/unistd.h. */
|
||||
|
||||
@ -2413,8 +2428,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|
||||
USI buf = arg1;
|
||||
USI size = arg2;
|
||||
|
||||
char *cwd = xmalloc (MAXPATHLEN);
|
||||
if (cwd != getcwd (cwd, MAXPATHLEN))
|
||||
char *cwd = xmalloc (SIM_PATHMAX);
|
||||
if (cwd != getcwd (cwd, SIM_PATHMAX))
|
||||
abort ();
|
||||
|
||||
/* FIXME: When and if we support chdir, we need something
|
||||
@ -2440,8 +2455,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|
||||
SI path = arg1;
|
||||
SI buf = arg2;
|
||||
SI bufsiz = arg3;
|
||||
char *pbuf = xmalloc (MAXPATHLEN);
|
||||
char *lbuf = xmalloc (MAXPATHLEN);
|
||||
char *pbuf = xmalloc (SIM_PATHMAX);
|
||||
char *lbuf = xmalloc (SIM_PATHMAX);
|
||||
char *lbuf_alloc = lbuf;
|
||||
int nchars = -1;
|
||||
int i;
|
||||
@ -2453,7 +2468,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|
||||
o += strlen (simulator_sysroot);
|
||||
}
|
||||
|
||||
for (i = 0; i + o < MAXPATHLEN; i++)
|
||||
for (i = 0; i + o < SIM_PATHMAX; i++)
|
||||
{
|
||||
pbuf[i + o]
|
||||
= sim_core_read_unaligned_1 (current_cpu, pc, 0, path + i);
|
||||
@ -2461,7 +2476,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|
||||
break;
|
||||
}
|
||||
|
||||
if (i + o == MAXPATHLEN)
|
||||
if (i + o == SIM_PATHMAX)
|
||||
{
|
||||
retval = -cb_host_to_target_errno (cb, ENAMETOOLONG);
|
||||
break;
|
||||
@ -2497,8 +2512,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getcwd (lbuf, MAXPATHLEN) != NULL
|
||||
&& strlen (lbuf) + 2 + strlen (argv0) < MAXPATHLEN)
|
||||
if (getcwd (lbuf, SIM_PATHMAX) != NULL
|
||||
&& strlen (lbuf) + 2 + strlen (argv0) < SIM_PATHMAX)
|
||||
{
|
||||
if (strncmp (simulator_sysroot, lbuf,
|
||||
strlen (simulator_sysroot)) == 0)
|
||||
@ -2513,7 +2528,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
|
||||
}
|
||||
}
|
||||
else
|
||||
nchars = readlink (pbuf, lbuf, MAXPATHLEN);
|
||||
nchars = readlink (pbuf, lbuf, SIM_PATHMAX);
|
||||
|
||||
/* We trust that the readlink result returns a *relative*
|
||||
link, or one already adjusted for the file-path-prefix.
|
||||
|
Loading…
x
Reference in New Issue
Block a user