bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH] canonicalize-lgpl: merge proposed libc changes
Date: Thu, 24 Dec 2020 14:49:41 -0800	[thread overview]
Message-ID: <20201224224941.1153032-1-eggert@cs.ucla.edu> (raw)

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  <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.
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



                 reply	other threads:[~2020-12-24 22:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201224224941.1153032-1-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).