diff options
author | Ron Yorston <rmy@pobox.com> | 2019-03-06 10:05:06 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-03-06 10:05:06 +0000 |
commit | 5c5197df8668ba58ec7799ccc418d124a6c6a49e (patch) | |
tree | b2cf42a770934c7adba484b5abe5e5e04e76fbff /include | |
parent | 8ebe81483b8759c36c9aa5015044d8e3d2c50fd5 (diff) | |
download | busybox-w32-5c5197df8668ba58ec7799ccc418d124a6c6a49e.tar.gz busybox-w32-5c5197df8668ba58ec7799ccc418d124a6c6a49e.tar.bz2 busybox-w32-5c5197df8668ba58ec7799ccc418d124a6c6a49e.zip |
win32: implement readlink(2)
Provide an implementation of readlink(2) based on code from Git
for Windows. This version only supports symbolic links, not
mount points, as the latter seem to work well enough as-is.
With this change the ls and stat applets can display the targets
of symbolic links. The readlink applet has been enabled in the
default configuration.
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h index 188d4eecf..b5324e49b 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -407,7 +407,11 @@ int mingw_xopen(const char *filename, int oflags); | |||
407 | ssize_t mingw_read(int fd, void *buf, size_t count); | 407 | ssize_t mingw_read(int fd, void *buf, size_t count); |
408 | int mingw_close(int fd); | 408 | int mingw_close(int fd); |
409 | int pipe(int filedes[2]); | 409 | int pipe(int filedes[2]); |
410 | #if ENABLE_FEATURE_READLINK2 | ||
411 | ssize_t readlink(const char *pathname, char *buf, size_t bufsiz); | ||
412 | #else | ||
410 | NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); | 413 | NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); |
414 | #endif | ||
411 | NOIMPL(setgid,gid_t gid UNUSED_PARAM); | 415 | NOIMPL(setgid,gid_t gid UNUSED_PARAM); |
412 | NOIMPL(setegid,gid_t gid UNUSED_PARAM); | 416 | NOIMPL(setegid,gid_t gid UNUSED_PARAM); |
413 | NOIMPL(setsid,void); | 417 | NOIMPL(setsid,void); |