diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-02-27 21:51:35 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-02-27 21:51:35 +0200 |
commit | 4824410fa8236c8c005107d24898e48c762e83c6 (patch) | |
tree | f281f350b17a34b5b8dae65f8395e8944e53beee /src/msdos.c | |
parent | 0f7bb05d28a57975fca586d7b3aa5e72edf56897 (diff) | |
parent | 40be44e2a95cd703e49022c8f8aa0ce5b9b29ea6 (diff) | |
download | emacs-4824410fa8236c8c005107d24898e48c762e83c6.tar.gz |
Implement stub emulation of `readlink' for MS-DOS.
src/msdos.c (readlink) [DJGPP < 2.04]: New stub function.
src/msdos.h: (readlink) [DJGPP < 2.04]: Declare prototype.
Diffstat (limited to 'src/msdos.c')
-rw-r--r-- | src/msdos.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/msdos.c b/src/msdos.c index df51c5fdb88..261a09ac859 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -3920,6 +3920,18 @@ croak (char *badfunc) */ int setpgrp (void) {return 0; } int setpriority (int x, int y, int z) { return 0; } + +#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4 +ssize_t +readlink (const char *name, char *dummy1, size_t dummy2) +{ + /* `access' is much faster than `stat' on MS-DOS. */ + if (access (name, F_OK) == 0) + errno = EINVAL; + return -1; +} +#endif + #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 |