]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* cris/configure.ac: Check for limits.h and sys/param.h.
authorHans-Peter Nilsson <hp@axis.com>
Fri, 29 Sep 2006 02:45:48 +0000 (02:45 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Fri, 29 Sep 2006 02:45:48 +0000 (02:45 +0000)
* cris/configure, cris/config.in: Rebuild.
* cris/traps.c (SIM_PATHMAX): New macro.
(cris_break_13_handler): Use SIM_PATHMAX, not MAXPATHLEN.

sim/ChangeLog
sim/cris/config.in
sim/cris/configure
sim/cris/configure.ac
sim/cris/traps.c

index b68d793fd399429254da8b48742d3bad4e545f16..d68f2300ea1873b686b304004239b58cecc64f8c 100644 (file)
@@ -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.
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..41eb0868593b3f4489bfbee4b88885216508f820 100644 (file)
@@ -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
index 47065279f6d65959b1f1c7107c59bf65b4ea67eb..96bb0cc6aadd3a5377dbe76b70e55f84634e1906 100755 (executable)
@@ -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
index a349d8da94593997ab227a05df024ac1c814a465..6ff1c0e6559c92308b4b3d7fdd1a96b0c5b3459d 100644 (file)
@@ -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
index 2eb0a1b4d24aec998cc16f96ce8abdc10d249e48..487fadd83a1c8018891c947e90b431bb9c955ec5 100644 (file)
@@ -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.