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.
This commit is contained in:
parent
d05e7e6721
commit
0f7bb05d28
4 changed files with 35 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
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.
|
||||
|
|
|
@ -1,2 +1,10 @@
|
|||
/* 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 */
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
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.
|
||||
|
|
19
src/w32.c
19
src/w32.c
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue