aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-02-27 21:48:31 +0200
committerEli Zaretskii2011-02-27 21:48:31 +0200
commit0f7bb05d28a57975fca586d7b3aa5e72edf56897 (patch)
tree808ec29fd466d37a0f90b3818a39567a5cd85249 /src
parentd05e7e6721bc02b910965293752198e9c73e2208 (diff)
downloademacs-0f7bb05d28a57975fca586d7b3aa5e72edf56897.tar.gz
emacs-0f7bb05d28a57975fca586d7b3aa5e72edf56897.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 1929c3fc98a..f3710495c4a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12011-02-27 Eli Zaretskii <eliz@gnu.org>
2
3 * w32.c (symlink, readlink): New stub functions.
4
12011-02-27 Paul Eggert <eggert@cs.ucla.edu> 52011-02-27 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG. 7 * scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
diff --git a/src/w32.c b/src/w32.c
index d4f68544c1d..ae2373be46e 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -3614,6 +3614,25 @@ utime (const char *name, struct utimbuf *times)
3614} 3614}
3615 3615
3616 3616
3617/* Symlink-related functions that always fail. Used in fileio.c to
3618 avoid #ifdef's. */
3619int
3620symlink (char const *dummy1, char const *dummy2)
3621{
3622 errno = ENOSYS;
3623 return -1;
3624}
3625
3626ssize_t
3627readlink (const char *name, char *dummy1, size_t dummy2)
3628{
3629 /* `access' is much faster than `stat' on MS-Windows. */
3630 if (sys_access (name, 0) == 0)
3631 errno = EINVAL;
3632 return -1;
3633}
3634
3635
3617/* Support for browsing other processes and their attributes. See 3636/* Support for browsing other processes and their attributes. See
3618 process.c for the Lisp bindings. */ 3637 process.c for the Lisp bindings. */
3619 3638