This merges the changes proposed for glibc in: https://sourceware.org/pipermail/libc-alpha/2020-December/121085.html https://sourceware.org/pipermail/libc-alpha/2020-December/121086.html * lib/canonicalize-lgpl.c: Include idx.h and filename.h unconditionally. (idx_t, IDX_MAX, FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME) (ISSLASH) [_LIBC]: Remove. --- ChangeLog | 11 +++++++++++ lib/canonicalize-lgpl.c | 9 ++------- 2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 531c4166d..30be929b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2020-12-24 Paul Eggert <egg...@cs.ucla.edu> + + canonicalize-lgpl: merge proposed libc changes + This merges the changes proposed for glibc in: + https://sourceware.org/pipermail/libc-alpha/2020-December/121085.html + https://sourceware.org/pipermail/libc-alpha/2020-December/121086.html + * lib/canonicalize-lgpl.c: Include idx.h and filename.h + unconditionally. + (idx_t, IDX_MAX, FILE_SYSTEM_PREFIX_LEN, IS_ABSOLUTE_FILE_NAME) + (ISSLASH) [_LIBC]: Remove. + 2020-12-24 Bruno Haible <br...@clisp.org> posix_spawn-internal: Implement for native Windows. diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index d6dd18dcf..8c8f98abc 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -38,15 +38,12 @@ #include <unistd.h> #include <eloop-threshold.h> +#include <idx.h> +#include <filename.h> #include <scratch_buffer.h> #ifdef _LIBC # include <shlib-compat.h> -typedef ptrdiff_t idx_t; -# define IDX_MAX PTRDIFF_MAX -# define FILE_SYSTEM_PREFIX_LEN(name) 0 -# define IS_ABSOLUTE_FILE_NAME(name) ISSLASH (*(name)) -# define ISSLASH(c) ((c) == '/') # include <sysdep.h> # ifdef __ASSUME_FACCESSAT2 # define FACCESSAT_NEVER_EOVERFLOWS __ASSUME_FACCESSAT2 @@ -56,9 +53,7 @@ typedef ptrdiff_t idx_t; #else # define __canonicalize_file_name canonicalize_file_name # define __realpath realpath -# include "idx.h" # include "pathmax.h" -# include "filename.h" # define __faccessat faccessat # if defined _WIN32 && !defined __CYGWIN__ # define __getcwd _getcwd -- 2.27.0