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.
This commit is contained in:
Eli Zaretskii 2011-02-27 21:51:35 +02:00
commit 4824410fa8
3 changed files with 21 additions and 0 deletions

View file

@ -1,5 +1,9 @@
2011-02-27 Eli Zaretskii <eliz@gnu.org>
* msdos.c (readlink) [DJGPP < 2.04]: New stub function.
* msdos.h: (readlink) [DJGPP < 2.04]: Declare prototype.
* w32.c (symlink, readlink): New stub functions.
2011-02-27 Paul Eggert <eggert@cs.ucla.edu>

View file

@ -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

View file

@ -40,6 +40,11 @@ void mouse_init (void);
void mouse_on (void);
void mouse_off (void);
void mouse_moveto (int, int);
#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
int readlink (const char *, char *, size_t);
#endif
#ifndef HAVE_X_WINDOWS
/* Dummy types. */