+2012-02-09 Joel Brobecker <brobecker@adacore.com>
+
+ * configure.ac: Add readlink to AC_CHECK_FUNCS list.
+ * configure, config.in: Regenerate.
+ * hostio.c: Provide an alternate implementation if HAVE_READLINK
+ is not defined.
+
2012-02-02 Pedro Alves <palves@redhat.com>
Try SIGKILL first, then PTRACE_KILL.
/* Define to 1 if you have the `pwrite' function. */
#undef HAVE_PWRITE
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
/* Define to 1 if you have the <sgtty.h> header file. */
#undef HAVE_SGTTY_H
done
-for ac_func in pread pwrite pread64
+for ac_func in pread pwrite pread64 readlink
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
errno.h fcntl.h signal.h sys/file.h malloc.h dnl
sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
netinet/tcp.h arpa/inet.h sys/wait.h)
-AC_CHECK_FUNCS(pread pwrite pread64)
+AC_CHECK_FUNCS(pread pwrite pread64 readlink)
AC_REPLACE_FUNCS(memmem vasprintf vsnprintf)
# Check for UST
static void
handle_readlink (char *own_buf, int *new_packet_len)
{
+#if defined (HAVE_READLINK)
char filename[PATH_MAX], linkname[PATH_MAX];
char *p;
int ret, bytes_sent;
to return a partial response, but simply fail. */
if (bytes_sent < ret)
sprintf (own_buf, "F-1,%x", FILEIO_ENAMETOOLONG);
+#else /* ! HAVE_READLINK */
+ sprintf (own_buf, "F-1,%x", FILEIO_ENOSYS);
+#endif
}
/* Handle all the 'F' file transfer packets. */