[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103438: Implement stubs of `readlink
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103438: Implement stubs of `readlink' and `symlink' for MS-Windows. |
Date: |
Sun, 27 Feb 2011 21:48:31 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 103438
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2011-02-27 21:48:31 +0200
message:
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.
modified:
nt/ChangeLog
nt/inc/unistd.h
src/ChangeLog
src/w32.c
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2011-02-26 14:02:45 +0000
+++ b/nt/ChangeLog 2011-02-27 19:48:31 +0000
@@ -1,3 +1,7 @@
+2011-02-27 Eli Zaretskii <address@hidden>
+
+ * inc/unistd.h (readlink, symlink): Declare prototypes.
+
2011-02-26 Eli Zaretskii <address@hidden>
* config.nt (nlink_t): Define.
=== modified file 'nt/inc/unistd.h'
--- a/nt/inc/unistd.h 2011-01-15 23:16:57 +0000
+++ b/nt/inc/unistd.h 2011-02-27 19:48:31 +0000
@@ -1,2 +1,10 @@
/* Fake unistd.h: config.h already provides most of the relevant things. */
+#ifndef _UNISTD_H
+#define _UNISTD_H
+
+extern ssize_t readlink (const char *, char *, size_t);
+extern int symlink (char const *, char const *);
+
+#endif /* _UNISTD_H */
+
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-02-27 07:50:33 +0000
+++ b/src/ChangeLog 2011-02-27 19:48:31 +0000
@@ -1,3 +1,7 @@
+2011-02-27 Eli Zaretskii <address@hidden>
+
+ * w32.c (symlink, readlink): New stub functions.
+
2011-02-27 Paul Eggert <address@hidden>
* scroll.c (CHECK_BOUNDS): #define only if GLYPH_DEBUG.
=== modified file 'src/w32.c'
--- a/src/w32.c 2011-01-25 04:08:28 +0000
+++ b/src/w32.c 2011-02-27 19:48:31 +0000
@@ -3614,6 +3614,25 @@
}
+/* Symlink-related functions that always fail. Used in fileio.c to
+ avoid #ifdef's. */
+int
+symlink (char const *dummy1, char const *dummy2)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+ssize_t
+readlink (const char *name, char *dummy1, size_t dummy2)
+{
+ /* `access' is much faster than `stat' on MS-Windows. */
+ if (sys_access (name, 0) == 0)
+ errno = EINVAL;
+ return -1;
+}
+
+
/* Support for browsing other processes and their attributes. See
process.c for the Lisp bindings. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103438: Implement stubs of `readlink' and `symlink' for MS-Windows.,
Eli Zaretskii <=