Skip to content
Snippets Groups Projects
Commit bb5595db authored by mjmac's avatar mjmac
Browse files

* now commit the sles10 build fix, after reverting previous shenanigans

parent 7891ce53
No related branches found
No related tags found
No related merge requests found
...@@ -209,6 +209,20 @@ if test "$machine" = rs6000; then ...@@ -209,6 +209,20 @@ if test "$machine" = rs6000; then
machine="powerpc" machine="powerpc"
fi fi
AC_MSG_CHECKING(if readlink returns ssize_t)
AC_TRY_COMPILE([
include <unistd.h>
],[
ssize_t readlink(const char *, char *, size_t);
],
readlink_returns_ssize_t="yes",
readlink_returns_ssize_t="no"
)
AC_MSG_RESULT($readlink_returns_ssize_t)
if test x$readlink_returns_ssize_t = xyes; then
AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
fi
# If we can't provoke the declaration of stat64 then we assume the # If we can't provoke the declaration of stat64 then we assume the
# environment supports 64-bit file support naturally. Beware! # environment supports 64-bit file support naturally. Beware!
AC_MSG_CHECKING(whether _LARGEFILE64_SOURCE definition is required) AC_MSG_CHECKING(whether _LARGEFILE64_SOURCE definition is required)
......
...@@ -247,7 +247,11 @@ extern int SYSIO_INTERFACE_NAME(ftruncate64)(int fd, off64_t length); ...@@ -247,7 +247,11 @@ extern int SYSIO_INTERFACE_NAME(ftruncate64)(int fd, off64_t length);
#endif #endif
extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path); extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path);
extern int SYSIO_INTERFACE_NAME(symlink)(const char *path1, const char *path2); extern int SYSIO_INTERFACE_NAME(symlink)(const char *path1, const char *path2);
#ifdef HAVE_POSIX_1003_READLINK
extern ssize_t SYSIO_INTERFACE_NAME(readlink)(const char *path,
#else
extern int SYSIO_INTERFACE_NAME(readlink)(const char *path, extern int SYSIO_INTERFACE_NAME(readlink)(const char *path,
#endif
char *buf, char *buf,
size_t bufsiz); size_t bufsiz);
extern int SYSIO_INTERFACE_NAME(link)(const char *oldpath, const char *newpath); extern int SYSIO_INTERFACE_NAME(link)(const char *oldpath, const char *newpath);
......
...@@ -55,7 +55,11 @@ ...@@ -55,7 +55,11 @@
#include "inode.h" #include "inode.h"
#include "sysio-symbols.h" #include "sysio-symbols.h"
#ifdef HAVE_POSIX_1003_READLINK
ssize_t
#else
int int
#endif
SYSIO_INTERFACE_NAME(readlink)(const char *path, char *buf, size_t bufsiz) SYSIO_INTERFACE_NAME(readlink)(const char *path, char *buf, size_t bufsiz)
{ {
struct intent intent; struct intent intent;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment