Commit 0f7bb05d authored by Eli Zaretskii's avatar Eli Zaretskii

Implement stubs of `readlink' and `symlink' for MS-Windows.

 src/w32.c (symlink, readlink): New stub functions.
 nt/inc/unistd.h (readlink, symlink): Declare prototypes.
parent d05e7e67
2011-02-27 Eli Zaretskii <eliz@gnu.org>
* inc/unistd.h (readlink, symlink): Declare prototypes.
2011-02-26 Eli Zaretskii <eliz@gnu.org>
* config.nt (nlink_t): Define.
......
/* Fake unistd.h: config.h already provides most of the relevant things. */
#ifndef _UNISTD_H
#define _UNISTD_H
extern ssize_t readlink (const char *, char *, size_t);
extern int symlink (char const *, char const *);
#endif /* _UNISTD_H */
2011-02-27 Eli Zaretskii <eliz@gnu.org>
* w32.c (symlink, readlink): New stub functions.
2011-02-27 Paul Eggert <eggert@cs.ucla.edu>
* scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
......@@ -3613,6 +3613,25 @@ utime (const char *name, struct utimbuf *times)
return 0;
}
/* Symlink-related functions that always fail. Used in fileio.c to
avoid #ifdef's. */
int
symlink (char const *dummy1, char const *dummy2)
{
errno = ENOSYS;
return -1;
}
ssize_t
readlink (const char *name, char *dummy1, size_t dummy2)
{
/* `access' is much faster than `stat' on MS-Windows. */
if (sys_access (name, 0) == 0)
errno = EINVAL;
return -1;
}
/* Support for browsing other processes and their attributes. See
process.c for the Lisp bindings. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment