aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-04-06 19:05:49 +0300
committerEli Zaretskii2011-04-06 19:05:49 +0300
commit973f782d33cb0b9fa6caf5487ca8916838d12556 (patch)
tree9b06c3251b3f31749936782214926a9c86bb9699
parent0f1ba050b3e8228b47e77ec77e5047c7c3276fdf (diff)
downloademacs-973f782d33cb0b9fa6caf5487ca8916838d12556.tar.gz
emacs-973f782d33cb0b9fa6caf5487ca8916838d12556.zip
Don't call gnulib's careadlinkat on Windows.
src/w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs. lib/makefile.w32-in ($(BLD)/careadlinkat.$(O), GNULIBOBJS): Revert last change.
-rw-r--r--ChangeLog5
-rw-r--r--lib/makefile.w32-in15
-rw-r--r--src/ChangeLog4
-rw-r--r--src/w32.c25
4 files changed, 34 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index c57bcabef41..b7f8f77dd34 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12011-04-06 Eli Zaretskii <eliz@gnu.org>
2
3 * lib/makefile.w32-in ($(BLD)/careadlinkat.$(O), GNULIBOBJS):
4 Revert last change.
5
12011-04-06 Juanma Barranquero <lekktu@gmail.com> 62011-04-06 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * lib/makefile.w32-in (GNULIBOBJS): Add careadlinkat.$(O). 8 * lib/makefile.w32-in (GNULIBOBJS): Add careadlinkat.$(O).
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in
index 895cd0b8369..b2aececf251 100644
--- a/lib/makefile.w32-in
+++ b/lib/makefile.w32-in
@@ -29,8 +29,7 @@ GNULIBOBJS = $(BLD)/dtoastr.$(O) \
29 $(BLD)/strftime.$(O) \ 29 $(BLD)/strftime.$(O) \
30 $(BLD)/time_r.$(O) \ 30 $(BLD)/time_r.$(O) \
31 $(BLD)/md5.$(O) \ 31 $(BLD)/md5.$(O) \
32 $(BLD)/filemode.$(O) \ 32 $(BLD)/filemode.$(O)
33 $(BLD)/careadlinkat.$(O)
34 33
35# 34#
36# Build the library 35# Build the library
@@ -119,22 +118,12 @@ $(BLD)/filemode.$(O) : \
119 $(EMACS_ROOT)/src/m/intel386.h \ 118 $(EMACS_ROOT)/src/m/intel386.h \
120 $(EMACS_ROOT)/src/config.h 119 $(EMACS_ROOT)/src/config.h
121 120
122$(BLD)/careadlinkat.$(O) : \
123 $(SRC)/careadlinkat.c \
124 $(SRC)/careadlinkat.h \
125 $(SRC)/allocator.h \
126 $(EMACS_ROOT)/nt/inc/unistd.h \
127 $(EMACS_ROOT)/nt/inc/sys/stat.h \
128 $(EMACS_ROOT)/src/s/ms-w32.h \
129 $(EMACS_ROOT)/src/m/intel386.h \
130 $(EMACS_ROOT)/src/config.h
131
132# The following dependencies are for supporting parallel builds, where 121# The following dependencies are for supporting parallel builds, where
133# we must make sure $(BLD) exists before any compilation starts. 122# we must make sure $(BLD) exists before any compilation starts.
134# 123#
135$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD 124$(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD
136$(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD 125$(BLD)/strftime.$(O) $(BLD)/time_r.$(O) $(BLD)/md5.$(O): stamp_BLD
137$(BLD)/filemode.$(O) $(BLD)/careadlinkat.$(O): stamp_BLD 126$(BLD)/filemode.$(O): stamp_BLD
138 127
139# 128#
140# Headers we would preprocess if we could. 129# Headers we would preprocess if we could.
diff --git a/src/ChangeLog b/src/ChangeLog
index 4c852723595..240fd8fb9a7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12011-04-06 Eli Zaretskii <eliz@gnu.org>
2
3 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
4
12011-04-06 Paul Eggert <eggert@cs.ucla.edu> 52011-04-06 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Fix more problems found by GCC 4.6.0's static checks. 7 Fix more problems found by GCC 4.6.0's static checks.
diff --git a/src/w32.c b/src/w32.c
index da403671115..d715c39fa81 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -138,6 +138,9 @@ typedef struct _PROCESS_MEMORY_COUNTERS_EX {
138#include "dispextern.h" /* for xstrcasecmp */ 138#include "dispextern.h" /* for xstrcasecmp */
139#include "coding.h" /* for Vlocale_coding_system */ 139#include "coding.h" /* for Vlocale_coding_system */
140 140
141#include "careadlinkat.h"
142#include "allocator.h"
143
141/* For serial_configure and serial_open. */ 144/* For serial_configure and serial_open. */
142#include "process.h" 145#include "process.h"
143 146
@@ -3610,8 +3613,8 @@ utime (const char *name, struct utimbuf *times)
3610} 3613}
3611 3614
3612 3615
3613/* Symlink-related functions that always fail. Used in fileio.c to 3616/* Symlink-related functions that always fail. Used in fileio.c and in
3614 avoid #ifdef's. */ 3617 sysdep.c to avoid #ifdef's. */
3615int 3618int
3616symlink (char const *dummy1, char const *dummy2) 3619symlink (char const *dummy1, char const *dummy2)
3617{ 3620{
@@ -3628,6 +3631,24 @@ readlink (const char *name, char *dummy1, size_t dummy2)
3628 return -1; 3631 return -1;
3629} 3632}
3630 3633
3634char *
3635careadlinkat (int fd, char const *filename,
3636 char *buffer, size_t buffer_size,
3637 struct allocator const *alloc,
3638 ssize_t (*preadlinkat) (int, char const *, char *, size_t))
3639{
3640 errno = ENOSYS;
3641 return NULL;
3642}
3643
3644ssize_t
3645careadlinkatcwd (int fd, char const *filename, char *buffer,
3646 size_t buffer_size)
3647{
3648 (void) fd;
3649 return readlink (filename, buffer, buffer_size);
3650}
3651
3631 3652
3632/* Support for browsing other processes and their attributes. See 3653/* Support for browsing other processes and their attributes. See
3633 process.c for the Lisp bindings. */ 3654 process.c for the Lisp bindings. */