@@ -187,6 +187,11 @@ along with GCC; see the file COPYING3.
#endif /* HAVE_LD_EH_FRAME && TARGET_DL_ITERATE_PHDR */
#endif
+#ifndef USE_GLD
+/* The default MFLIB_SPEC is GNU ld specific. */
+#define MFLIB_SPEC ""
+#endif
+
/* collect2.c can only parse GNU nm -n output. Solaris nm needs -png to
produce the same format. */
#define NM_FLAGS "-png"
@@ -62,7 +62,7 @@ enable_shared=no])
AC_CHECK_HEADERS(stdint.h execinfo.h signal.h dlfcn.h dirent.h pwd.h grp.h \
netdb.h sys/ipc.h sys/sem.h sys/shm.h sys/wait.h ctype.h mntent.h \
- sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h)
+ sys/mnttab.h sys/socket.h netinet/in.h arpa/inet.h dlfcn.h sys/mman.h)
AC_CHECK_FUNCS(backtrace backtrace_symbols gettimeofday signal)
AC_CHECK_FUNCS(fopen64 fseeko64 ftello64 stat64 freopen64)
@@ -147,6 +147,8 @@ AC_SUBST(build_libmudflapth)
AC_CHECK_LIB(dl, dlsym)
+AC_CHECK_FUNC(connect,, AC_CHECK_LIB(socket, connect))
+
# Calculate toolexeclibdir
# Also toolexecdir, though it's only used in toolexeclibdir
case ${version_specific_libs} in
@@ -1,5 +1,5 @@
/* Mudflap: narrow-pointer bounds-checking by tree rewriting.
- Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2009, 2011 Free Software Foundation, Inc.
Contributed by Frank Ch. Eigler <fche@redhat.com>
and Graydon Hoare <graydon@redhat.com>
@@ -90,6 +90,9 @@ see the files COPYING3 and COPYING.RUNTI
#ifdef HAVE_MNTENT_H
#include <mntent.h>
#endif
+#ifdef HAVE_SYS_MNTTAB_H
+#include <sys/mnttab.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -2063,6 +2066,7 @@ WRAPPER2(const char *, gai_strerror, int
#ifdef HAVE_GETMNTENT
+#ifdef HAVE_MNTENT_H
WRAPPER2(struct mntent *, getmntent, FILE *filep)
{
struct mntent *m;
@@ -2097,6 +2101,9 @@ WRAPPER2(struct mntent *, getmntent, FIL
return m;
}
+#elif defined HAVE_SYS_MNTTAB_H
+/* FIXME: Implement. */
+#endif
#endif
@@ -153,7 +153,7 @@ main (int argc, char *argv[])
}
}
-#ifndef __FreeBSD__
+#if !defined __FreeBSD__ && !(defined __sun__ && defined __svr4__)
/* rawmemchr test */
for (outer = size - 1; outer >= MAX (0, size - 128); --outer)
{
@@ -250,7 +250,7 @@ main (int argc, char *argv[])
}
}
-#ifndef __FreeBSD__
+#ifndef __FreeBSD__ && !(defined __sun__ && defined __svr4__)
/* stpcpy test */
for (outer = size - 1; outer >= MAX (0, size - 128); --outer)
{
@@ -302,7 +302,7 @@ main (int argc, char *argv[])
result = 1;
}
-#ifndef __FreeBSD__
+#if !defined __FreeBSD__ && !(defined __sun__ && defined __svr4__)
/* mempcpy test */
for (outer = size - 1; outer >= MAX (0, size - 128); --outer)
for (inner = 0; inner < size - outer; ++inner)