[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05

Clint Adams schizo at debian.org
Sun Nov 15 03:17:23 UTC 2009


The following commit has been merged in the upstream branch:
commit 93d7d2499ef0e82026362af638c5ca6291302a40
Author: Clint Adams <schizo at debian.org>
Date:   Wed Nov 21 22:00:12 2007 +0000

    Fix configure test to handle platforms where the return value of readlink is ssize_t and this is not the same size as int.
    
    git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-145

diff --git a/configure.ac b/configure.ac
index 9611003..5880327 100644
--- a/configure.ac
+++ b/configure.ac
@@ -74,20 +74,26 @@ fi
 dnl The parameters to the wrapped functions have to match
 dnl those in the system header files. I don't know how to
 dnl really get the names of the paramters, but this seems to work.
-AC_MSG_CHECKING([for second and third argument of readlink])
+AC_MSG_CHECKING([for return value and second and third argument of readlink])
 readlink_buf_arg=unknown
 readlink_bufsize_arg=unknown
-for second in void char; do
-  for third in size_t int; do
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
-      int readlink(const char *path, $second *buf, $third bufsiz);]], [[puts("hello, world");]])],[readlink_buf_arg=$second
-       readlink_bufsize_arg=$third
-      ],[])
+for zeroth in ssize_t int; do
+  for second in void char; do
+    for third in size_t int; do
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>
+        $zeroth readlink(const char *path, $second *buf, $third bufsiz);]], [[puts("hello, world");]])],
+	[readlink_retval=$zeroth
+	 readlink_buf_arg=$second
+	 readlink_bufsize_arg=$third
+        ],[])
+    done
   done
 done
-AC_MSG_RESULT([$readlink_buf_arg, $readlink_bufsize_arg])
+AC_MSG_RESULT([$readlink_retval, $readlink_buf_arg, $readlink_bufsize_arg])
+AH_TEMPLATE([READLINK_RETVAL_TYPE], [type of readlink return value])
 AH_TEMPLATE([READLINK_BUF_TYPE], [type of readlink buf])
 AH_TEMPLATE([READLINK_BUFSIZE_TYPE], [type of readlink bufsize])
+AC_DEFINE_UNQUOTED(READLINK_RETVAL_TYPE, $readlink_retval)
 AC_DEFINE_UNQUOTED(READLINK_BUF_TYPE, $readlink_buf_arg)
 AC_DEFINE_UNQUOTED(READLINK_BUFSIZE_TYPE, $readlink_bufsize_arg)
 
diff --git a/wrapfunc.inp b/wrapfunc.inp
index cd99816..0039671 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -46,7 +46,7 @@ WRAP_MKNODAT;int;MKNODAT_ARG(int ver, int dir_fd, const char *pathname, mode_t m
 /*opendir;DIR *;(const char *name);(name)*/
 /*closedir;int;(DIR *dir);(dir)*/
 /*readdir;struct dirent *;(DIR *dir);(dir)*/
-/*readlink;int;(const char *path, READLINK_BUF_TYPE *buf, READLINK_BUFSIZE_TYPE bufsize);(path, buf, bufsize)*/
+/*readlink;READLINK_RETVAL_TYPE;(const char *path, READLINK_BUF_TYPE *buf, READLINK_BUFSIZE_TYPE bufsize);(path, buf, bufsize)*/
 /*telldir;off_t;(DIR *dir);(dir)*/
 
 chown;int;(const char *path, uid_t owner, gid_t group);(path, owner, group)

-- 
fakeroot



More information about the Fakeroot-commits mailing list