Emulate `readlink' for DJGPP versions before 2.04.
src/msdos.c (readlink) [DJGPP < 2.04]: New stub function. src/msdos.h: (readlink) [DJGPP < 2.04]: Declare prototype.
This commit is contained in:
parent
ea2bc7b02f
commit
40be44e2a9
3 changed files with 23 additions and 0 deletions
|
@ -1,3 +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.
|
||||
|
||||
2011-02-26 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* s/msdos.h (HAVE_LSTAT): Define for DJGPP >= 2.04.
|
||||
|
|
12
src/msdos.c
12
src/msdos.c
|
@ -3922,6 +3922,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
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue