aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-04-06 20:49:21 +0300
committerEli Zaretskii2011-04-06 20:49:21 +0300
commit7c106b1e1e4e2bef3920787160e1e31e352d14cc (patch)
tree0bc2167ecf7ffa9e9906c7687f32f94786ff7878
parent973f782d33cb0b9fa6caf5487ca8916838d12556 (diff)
downloademacs-7c106b1e1e4e2bef3920787160e1e31e352d14cc.tar.gz
emacs-7c106b1e1e4e2bef3920787160e1e31e352d14cc.zip
Adapt the MS-DOS build to changes in gnulib.
msdos/sedlibmk.inp: Update checklist. (am_libgnu_a_OBJECTS): Remove careadlinkat.$(OBJEXT). ($(top_builddir)/config.status): Edit away, both as target and in prerequisites. (@am__fastdepCC_FALSE@): Fix editing. (@GL_GENERATE_STDBOOL_H_TRUE@, @GL_GENERATE_STDBOOL_H_FALSE@) (@GL_GENERATE_STDDEF_H_TRUE@, @GL_GENERATE_STDDEF_H_FALSE@) (@GL_GENERATE_STDINT_H_TRUE@, @GL_GENERATE_STDINT_H_FALSE@): Edit to either nothing or "#". src/msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
-rw-r--r--msdos/ChangeLog12
-rw-r--r--msdos/sedlibmk.inp23
-rw-r--r--src/ChangeLog2
-rw-r--r--src/msdos.c38
4 files changed, 74 insertions, 1 deletions
diff --git a/msdos/ChangeLog b/msdos/ChangeLog
index 510b3b16482..ebac5b288b6 100644
--- a/msdos/ChangeLog
+++ b/msdos/ChangeLog
@@ -1,3 +1,15 @@
12011-04-06 Eli Zaretskii <eliz@gnu.org>
2
3 * sedlibmk.inp: Update checklist.
4 (am_libgnu_a_OBJECTS): Remove careadlinkat.$(OBJEXT).
5 ($(top_builddir)/config.status): Edit away, both as target and in
6 prerequisites.
7 (@am__fastdepCC_FALSE@): Fix editing.
8 (@GL_GENERATE_STDBOOL_H_TRUE@, @GL_GENERATE_STDBOOL_H_FALSE@)
9 (@GL_GENERATE_STDDEF_H_TRUE@, @GL_GENERATE_STDDEF_H_FALSE@)
10 (@GL_GENERATE_STDINT_H_TRUE@, @GL_GENERATE_STDINT_H_FALSE@): Edit
11 to either nothing or "#".
12
12011-03-25 Eli Zaretskii <eliz@gnu.org> 132011-03-25 Eli Zaretskii <eliz@gnu.org>
2 14
3 * sedlibmk.inp: Adapt to addition of the gnulib stdio module. 15 * sedlibmk.inp: Adapt to addition of the gnulib stdio module.
diff --git a/msdos/sedlibmk.inp b/msdos/sedlibmk.inp
index d7af3681ef9..df4dd7ddf75 100644
--- a/msdos/sedlibmk.inp
+++ b/msdos/sedlibmk.inp
@@ -35,6 +35,16 @@
35# /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed 35# /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed
36# /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed 36# /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed
37# 37#
38# . Some of the headers are generated conditionally, and the
39# corresponding recipes are guarder by @GL_GENERATE_xxxx_H_TRUE@
40# and @GL_GENERATE_xxxx_H_FALSE@. Depending on whether DJGPP uses
41# the corresponding header, these should be edited either to
42# nothing (thus exposing the recipe) or to #, which comments the
43# recipe away. Example:
44#
45# s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/
46# s/^@GL_GENERATE_STDBOOL_H_FALSE@//
47#
38# . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable 48# . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable
39# as appropriately: to an empty value if the gnulib header is not 49# as appropriately: to an empty value if the gnulib header is not
40# used, and to the corresponding DJGPP header name otherwise. 50# used, and to the corresponding DJGPP header name otherwise.
@@ -490,6 +500,7 @@ am__cd = cd
490/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/ 500/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/
491/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@// 501/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@//
492/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o md5.o filemode.o/ 502/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o md5.o filemode.o/
503/^am_libgnu_a_OBJECTS *=/s/careadlinkat.\$(OBJEXT)//
493/^srcdir *=/s/@[^@\n]*@/./ 504/^srcdir *=/s/@[^@\n]*@/./
494/^top_srcdir *=/s/@[^@\n]*@/../ 505/^top_srcdir *=/s/@[^@\n]*@/../
495/^top_builddir *=/s/@[^@\n]*@/../ 506/^top_builddir *=/s/@[^@\n]*@/../
@@ -500,6 +511,10 @@ s/@PRAGMA_COLUMNS@//
500/^\$(srcdir)\/Makefile\.in:/,/^[ ][ ]*\$(AUTOMAKE)/d 511/^\$(srcdir)\/Makefile\.in:/,/^[ ][ ]*\$(AUTOMAKE)/d
501/^Makefile:/,/^[ ][ ]*esac/d 512/^Makefile:/,/^[ ][ ]*esac/d
502/^\$(top_srcdir)\/configure:/,/^\$(ACLOCAL_M4)/d 513/^\$(top_srcdir)\/configure:/,/^\$(ACLOCAL_M4)/d
514/^\$(top_builddir)\/config.status:/,/^$/d
515#
516# Remove the dependencies on $(top_builddir)/config.status
517s/ $(top_builddir)\/config.status//
503# 518#
504# Fix the include-dependency lines 519# Fix the include-dependency lines
505s/^@AMDEP_TRUE@// 520s/^@AMDEP_TRUE@//
@@ -507,7 +522,7 @@ s/^@AMDEP_FALSE@/\#/
507s/@am__include@/include/ 522s/@am__include@/include/
508s/@am__quote@//g 523s/@am__quote@//g
509s/^@am__fastdepCC_TRUE@// 524s/^@am__fastdepCC_TRUE@//
510s/^@am__fastdepCC_FALSE/\#/ 525s/^@am__fastdepCC_FALSE@/\#/
511# 526#
512# Fix the *-clean rules, to not use a Unixy `test' command. Empty 527# Fix the *-clean rules, to not use a Unixy `test' command. Empty
513# lists are replaced with a dummy file, to avoid an error message from 528# lists are replaced with a dummy file, to avoid an error message from
@@ -520,6 +535,12 @@ s/^ -*test -z.*|| rm/ -rm/
520s/@echo /@djecho/ 535s/@echo /@djecho/
521# 536#
522# Fix the recipes for header files 537# Fix the recipes for header files
538s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/
539s/^@GL_GENERATE_STDBOOL_H_FALSE@//
540s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/
541s/^@GL_GENERATE_STDDEF_H_FALSE@//
542s/^@GL_GENERATE_STDINT_H_TRUE@//
543s/^@GL_GENERATE_STDINT_H_FALSE@/\#/
523/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\ 544/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\
524arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h\ 545arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h\
525 sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/./arg-nonnull.h > $@ 546 sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/./arg-nonnull.h > $@
diff --git a/src/ChangeLog b/src/ChangeLog
index 240fd8fb9a7..1dff4e4a61b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12011-04-06 Eli Zaretskii <eliz@gnu.org> 12011-04-06 Eli Zaretskii <eliz@gnu.org>
2 2
3 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
4
3 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs. 5 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
4 6
52011-04-06 Paul Eggert <eggert@cs.ucla.edu> 72011-04-06 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/src/msdos.c b/src/msdos.c
index b0bf5c4fdd9..e02e64b9ece 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -81,6 +81,9 @@ extern int spawnve (int, const char *, char *const [], char *const []);
81#include <signal.h> 81#include <signal.h>
82#include "syssignal.h" 82#include "syssignal.h"
83 83
84#include "careadlinkat.h"
85#include "allocator.h"
86
84#ifndef SYSTEM_MALLOC 87#ifndef SYSTEM_MALLOC
85 88
86#ifdef GNU_MALLOC 89#ifdef GNU_MALLOC
@@ -3933,6 +3936,41 @@ readlink (const char *name, char *dummy1, size_t dummy2)
3933} 3936}
3934#endif 3937#endif
3935 3938
3939char *
3940careadlinkat (int fd, char const *filename,
3941 char *buffer, size_t buffer_size,
3942 struct allocator const *alloc,
3943 ssize_t (*preadlinkat) (int, char const *, char *, size_t))
3944{
3945 if (!buffer)
3946 {
3947 /* We don't support the fancy auto-allocation feature. */
3948 if (!buffer_size)
3949 errno = ENOSYS;
3950 else
3951 errno = EINVAL;
3952 buffer = NULL;
3953 }
3954 else
3955 {
3956 ssize_t len = preadlinkat (fd, filename, buffer, buffer_size);
3957
3958 if (len < 0 || len == buffer_size)
3959 buffer = NULL;
3960 else
3961 buffer[len + 1] = '\0';
3962 }
3963 return buffer;
3964}
3965
3966ssize_t
3967careadlinkatcwd (int fd, char const *filename, char *buffer,
3968 size_t buffer_size)
3969{
3970 (void) fd;
3971 return readlink (filename, buffer, buffer_size);
3972}
3973
3936 3974
3937#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2 3975#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2
3938 3976