Fix return type of readlink().
[ira/wip.git] / lib / replace / replace.h
index d717d6391ca1462d7ddd2a76cb01b7198c20f05d..c1444cd5ee5c36ee2ff20657ed63c047013d66b6 100644 (file)
@@ -232,7 +232,7 @@ int rep_link(const char *oldpath, const char *newpath);
 
 #ifndef HAVE_READLINK
 #define readlink rep_readlink
-int rep_readlink(const char *path, char *buf, size_t bufsize);
+ssize_t rep_readlink(const char *path, char *buf, size_t bufsize);
 #endif
 
 #ifndef HAVE_SYMLINK
@@ -393,6 +393,11 @@ struct tm;
 char *rep_strptime(const char *buf, const char *format, struct tm *tm);
 #endif
 
+#ifndef HAVE_DUP2
+#define dup2 rep_dup2
+int rep_dup2(int oldfd, int newfd);
+#endif
+
 /* Load header file for dynamic linking stuff */
 #ifdef HAVE_DLFCN_H
 #include <dlfcn.h>