]> Savannah Git Hosting - gnulib.git/commitdiff
canonicalize-lgpl: merge proposed libc changes
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Dec 2020 22:47:31 +0000 (14:47 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Dec 2020 22:49:08 +0000 (14:49 -0800)
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
lib/canonicalize-lgpl.c

index 531c4166df68fd13a83150e2da01827239113710..30be929b52edc43a687162d0061a36d8becdfcc9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2020-12-24  Paul Eggert  <eggert@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  <bruno@clisp.org>
 
        posix_spawn-internal: Implement for native Windows.
index d6dd18dcff74cd202a346df8b0cc9f1248924a0c..8c8f98abc49989132b2b551fa5069e9030607a13 100644 (file)
 #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