Added configure check for readlink.
diff --git a/configure b/configure
index 7ad9bc2..aeff6d6 100755
--- a/configure
+++ b/configure
@@ -15484,6 +15484,7 @@
+
for ac_func in \
_lwp_create \
_lwp_self \
@@ -15519,6 +15520,7 @@
popen \
pread \
pwrite \
+ readlink \
rfork \
select \
sendmsg \
diff --git a/configure.ac b/configure.ac
index 5ea663f..b641220 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1040,6 +1040,7 @@
popen \
pread \
pwrite \
+ readlink \
rfork \
select \
sendmsg \
diff --git a/include/config.h.in b/include/config.h.in
index 1ce5de7..4685930 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -722,6 +722,11 @@
#undef HAVE_PWRITE
/*
+ Define to 1 if you have the `readlink'
+ function. */
+#undef HAVE_READLINK
+
+/*
Define to 1 if you have the <regex.h>
header file. */
#undef HAVE_REGEX_H
diff --git a/include/wine/port.h b/include/wine/port.h
index b2a5a57..9d3ccc1 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -248,6 +248,10 @@
ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
#endif /* HAVE_PWRITE */
+#ifndef HAVE_READLINK
+int readlink( const char *path, char *buf, size_t size );
+#endif /* HAVE_READLINK */
+
#ifndef HAVE_SIGSETJMP
# include <setjmp.h>
typedef jmp_buf sigjmp_buf;
diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in
index 70d8ec9..73530d9 100644
--- a/libs/port/Makefile.in
+++ b/libs/port/Makefile.in
@@ -18,6 +18,7 @@
mkstemps.c \
pread.c \
pwrite.c \
+ readlink.c \
sigsetjmp.c \
spawn.c \
statfs.c \
diff --git a/libs/port/readlink.c b/libs/port/readlink.c
new file mode 100644
index 0000000..e5db92d
--- /dev/null
+++ b/libs/port/readlink.c
@@ -0,0 +1,32 @@
+/*
+ * readlink function
+ *
+ * Copyright 2004 Alexandre Julliard
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include <errno.h>
+
+#ifndef HAVE_READLINK
+int readlink( const char *path, char *buf, size_t size )
+{
+ errno = -ENOSYS;
+ return -1;
+}
+#endif /* HAVE_READLINK */