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.
This commit is contained in:
Eli Zaretskii 2011-04-06 20:49:21 +03:00
parent 973f782d33
commit 7c106b1e1e
4 changed files with 74 additions and 1 deletions

View file

@ -1,3 +1,15 @@
2011-04-06 Eli Zaretskii <eliz@gnu.org>
* 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 "#".
2011-03-25 Eli Zaretskii <eliz@gnu.org>
* sedlibmk.inp: Adapt to addition of the gnulib stdio module.

View file

@ -35,6 +35,16 @@
# /^STDINT_H *=/s/@[^@\n]*@/stdint.h/ -- stdint.h is needed
# /^STDDEF_H *=/s/@[^@\n]*@// -- stddef.h is not needed
#
# . Some of the headers are generated conditionally, and the
# corresponding recipes are guarder by @GL_GENERATE_xxxx_H_TRUE@
# and @GL_GENERATE_xxxx_H_FALSE@. Depending on whether DJGPP uses
# the corresponding header, these should be edited either to
# nothing (thus exposing the recipe) or to #, which comments the
# recipe away. Example:
#
# s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/
# s/^@GL_GENERATE_STDBOOL_H_FALSE@//
#
# . Also edit the NEXT_foo and NEXT_AS_FIRST_DIRECTIVE_foo_H variable
# as appropriately: to an empty value if the gnulib header is not
# used, and to the corresponding DJGPP header name otherwise.
@ -490,6 +500,7 @@ am__cd = cd
/^WCHAR_T_SUFFIX *=/s/@WCHAR_T_SUFFIX@/h/
/^WINT_T_SUFFIX *=/s/@WINT_T_SUFFIX@//
/^gl_LIBOBJS *=/s/@[^@\n]*@/getopt.o getopt1.o strftime.o time_r.o getloadavg.o md5.o filemode.o/
/^am_libgnu_a_OBJECTS *=/s/careadlinkat.\$(OBJEXT)//
/^srcdir *=/s/@[^@\n]*@/./
/^top_srcdir *=/s/@[^@\n]*@/../
/^top_builddir *=/s/@[^@\n]*@/../
@ -500,6 +511,10 @@ s/@PRAGMA_COLUMNS@//
/^\$(srcdir)\/Makefile\.in:/,/^[ ][ ]*\$(AUTOMAKE)/d
/^Makefile:/,/^[ ][ ]*esac/d
/^\$(top_srcdir)\/configure:/,/^\$(ACLOCAL_M4)/d
/^\$(top_builddir)\/config.status:/,/^$/d
#
# Remove the dependencies on $(top_builddir)/config.status
s/ $(top_builddir)\/config.status//
#
# Fix the include-dependency lines
s/^@AMDEP_TRUE@//
@ -507,7 +522,7 @@ s/^@AMDEP_FALSE@/\#/
s/@am__include@/include/
s/@am__quote@//g
s/^@am__fastdepCC_TRUE@//
s/^@am__fastdepCC_FALSE/\#/
s/^@am__fastdepCC_FALSE@/\#/
#
# Fix the *-clean rules, to not use a Unixy `test' command. Empty
# lists are replaced with a dummy file, to avoid an error message from
@ -520,6 +535,12 @@ s/^ -*test -z.*|| rm/ -rm/
s/@echo /@djecho/
#
# Fix the recipes for header files
s/^@GL_GENERATE_STDBOOL_H_TRUE@/\#/
s/^@GL_GENERATE_STDBOOL_H_FALSE@//
s/^@GL_GENERATE_STDDEF_H_TRUE@/\#/
s/^@GL_GENERATE_STDDEF_H_FALSE@//
s/^@GL_GENERATE_STDINT_H_TRUE@//
s/^@GL_GENERATE_STDINT_H_FALSE@/\#/
/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\
arg-nonnull.h: $(top_srcdir)/./arg-nonnull.h\
sed -n -e '/GL_ARG_NONNULL/,$$p' < $(top_srcdir)/./arg-nonnull.h > $@

View file

@ -1,5 +1,7 @@
2011-04-06 Eli Zaretskii <eliz@gnu.org>
* msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
* w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
2011-04-06 Paul Eggert <eggert@cs.ucla.edu>

View file

@ -81,6 +81,9 @@ extern int spawnve (int, const char *, char *const [], char *const []);
#include <signal.h>
#include "syssignal.h"
#include "careadlinkat.h"
#include "allocator.h"
#ifndef SYSTEM_MALLOC
#ifdef GNU_MALLOC
@ -3933,6 +3936,41 @@ readlink (const char *name, char *dummy1, size_t dummy2)
}
#endif
char *
careadlinkat (int fd, char const *filename,
char *buffer, size_t buffer_size,
struct allocator const *alloc,
ssize_t (*preadlinkat) (int, char const *, char *, size_t))
{
if (!buffer)
{
/* We don't support the fancy auto-allocation feature. */
if (!buffer_size)
errno = ENOSYS;
else
errno = EINVAL;
buffer = NULL;
}
else
{
ssize_t len = preadlinkat (fd, filename, buffer, buffer_size);
if (len < 0 || len == buffer_size)
buffer = NULL;
else
buffer[len + 1] = '\0';
}
return buffer;
}
ssize_t
careadlinkatcwd (int fd, char const *filename, char *buffer,
size_t buffer_size)
{
(void) fd;
return readlink (filename, buffer, buffer_size);
}
#if __DJGPP__ == 2 && __DJGPP_MINOR__ < 2