On 4/12/22 17:51, Paul Eggert wrote:
Your patch doesn't feel quite right to me but I haven't figured out why yet; I'll try to spring time to look at it in more detail.

I did that installed the attached. Most of these are merely refactoring or minor tweaking; the 3rd patch is the real change as it omits some 'stat' calls that aren't needed on these non-GNU platforms, and it treats EOVERFLOW better on these platforms. This should all work on Solaris 11.
From 30c932a3098146128acfd839589f308ec1bb116d Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 12 Apr 2022 23:56:41 -0700
Subject: [PATCH 1/4] cp,mv,install: modularize targetdir
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Move target directory code out of system.h to a new targetdir module.
This doesn’t change functionality.
* bootstrap.conf (gnulib_modules): Add targetdir.
* src/cp.c, src/install.c, src/mv.c: Include targetdir.h.
* src/system.h (must_be_working_directory, target_directory_operand)
(targetdir_dirfd_valid): Move from here ...
* gl/lib/targetdir.c, gl/lib/targetdir.h, gl/modules/targetdir:
... to these new files.
---
 bootstrap.conf       |   1 +
 gl/lib/targetdir.c   | 100 +++++++++++++++++++++++++++++++++++++++++++
 gl/lib/targetdir.h   |  42 ++++++++++++++++++
 gl/modules/targetdir |  25 +++++++++++
 src/cp.c             |   1 +
 src/install.c        |   1 +
 src/mv.c             |   1 +
 src/system.h         |  74 --------------------------------
 8 files changed, 171 insertions(+), 74 deletions(-)
 create mode 100644 gl/lib/targetdir.c
 create mode 100644 gl/lib/targetdir.h
 create mode 100644 gl/modules/targetdir

diff --git a/bootstrap.conf b/bootstrap.conf
index c1399e30c..756df00f6 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -262,6 +262,7 @@ gnulib_modules="
   sys_resource
   sys_stat
   sys_wait
+  targetdir
   tempname
   termios
   time_rz
diff --git a/gl/lib/targetdir.c b/gl/lib/targetdir.c
new file mode 100644
index 000000000..79d888887
--- /dev/null
+++ b/gl/lib/targetdir.c
@@ -0,0 +1,100 @@
+/* Target directory operands for coreutils
+
+   Copyright 2004-2022 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#define TARGETDIR_INLINE _GL_EXTERN_INLINE
+#include <targetdir.h>
+
+#include <attribute.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#ifdef O_PATH
+enum { O_PATHSEARCH = O_PATH };
+#else
+enum { O_PATHSEARCH = O_SEARCH };
+#endif
+
+/* Must F designate the working directory?  */
+
+ATTRIBUTE_PURE static inline bool
+must_be_working_directory (char const *f)
+{
+  /* Return true for ".", "./.", ".///./", etc.  */
+  while (*f++ == '.')
+    {
+      if (*f != '/')
+        return !*f;
+      while (*++f == '/')
+        continue;
+      if (!*f)
+        return true;
+    }
+  return false;
+}
+
+/* Return a file descriptor open to FILE, for use in openat.
+   As an optimization, return AT_FDCWD if FILE must be the working directory.
+   Fail and set errno if FILE is not a directory.
+   On failure return -2 if AT_FDCWD is -1, -1 otherwise.  */
+
+int
+target_directory_operand (char const *file)
+{
+  if (must_be_working_directory (file))
+    return AT_FDCWD;
+
+  int fd = -1;
+  int maybe_dir = -1;
+  struct stat st;
+
+  /* On old systems without O_DIRECTORY, like Solaris 10,
+     check with stat first lest we try to open a fifo for example and hang.
+     Also check on systems with O_PATHSEARCH == O_SEARCH, like Solaris 11,
+     where open() was seen to return EACCES for non executable non dirs.
+     */
+  if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH))
+      && stat (file, &st) == 0)
+    {
+      maybe_dir = S_ISDIR (st.st_mode);
+      if (! maybe_dir)
+        errno = ENOTDIR;
+    }
+
+  if (maybe_dir)
+    fd = open (file, O_PATHSEARCH | O_DIRECTORY);
+
+  if (!O_DIRECTORY && 0 <= fd)
+    {
+      /* On old systems like Solaris 10 double check type,
+         to ensure we've opened a directory.  */
+      int err;
+      if (fstat (fd, &st) != 0 ? (err = errno, true)
+          : !S_ISDIR (st.st_mode) && (err = ENOTDIR, true))
+        {
+          close (fd);
+          errno = err;
+          fd = -1;
+        }
+    }
+
+  return fd - (AT_FDCWD == -1 && fd < 0);
+}
diff --git a/gl/lib/targetdir.h b/gl/lib/targetdir.h
new file mode 100644
index 000000000..be34d4981
--- /dev/null
+++ b/gl/lib/targetdir.h
@@ -0,0 +1,42 @@
+/* Target directory operands for coreutils
+
+   Copyright 2022 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#include <fcntl.h>
+#include <stdbool.h>
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef TARGETDIR_INLINE
+# define TARGETDIR_INLINE _GL_INLINE
+#endif
+
+/* Return a file descriptor open to FILE, for use in openat.
+   As an optimization, return AT_FDCWD if FILE must be the working directory.
+   Fail and set errno if FILE is not a directory.
+   On failure return -2 if AT_FDCWD is -1, -1 otherwise.  */
+extern int target_directory_operand (char const *file);
+
+/* Return true if FD represents success for target_directory_operand.  */
+TARGETDIR_INLINE _GL_ATTRIBUTE_PURE bool
+target_dirfd_valid (int fd)
+{
+  return fd != -1 - (AT_FDCWD == -1);
+}
+
+_GL_INLINE_HEADER_END
diff --git a/gl/modules/targetdir b/gl/modules/targetdir
new file mode 100644
index 000000000..25ccfb899
--- /dev/null
+++ b/gl/modules/targetdir
@@ -0,0 +1,25 @@
+Description:
+Target directory operands
+
+Files:
+lib/targetdir.c
+lib/targetdir.h
+
+Depends-on:
+attribute
+fcntl-h
+stdbool
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += targetdir.c targetdir.h
+
+Include:
+"targetdir.h"
+
+License:
+GPL
+
+Maintainer:
+all
diff --git a/src/cp.c b/src/cp.c
index b2a20b900..7d69db928 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -33,6 +33,7 @@
 #include "ignore-value.h"
 #include "quote.h"
 #include "stat-time.h"
+#include "targetdir.h"
 #include "utimens.h"
 #include "acl.h"
 
diff --git a/src/install.c b/src/install.c
index 079ce1f70..4b06f9639 100644
--- a/src/install.c
+++ b/src/install.c
@@ -42,6 +42,7 @@
 #include "savewd.h"
 #include "selinux.h"
 #include "stat-time.h"
+#include "targetdir.h"
 #include "utimens.h"
 #include "xstrtol.h"
 
diff --git a/src/mv.c b/src/mv.c
index 21018a0d3..cb10713d7 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -33,6 +33,7 @@
 #include "remove.h"
 #include "renameatu.h"
 #include "root-dev-ino.h"
+#include "targetdir.h"
 #include "priv-set.h"
 
 /* The official name of this program (e.g., no 'g' prefix).  */
diff --git a/src/system.h b/src/system.h
index 768c3a1f2..0c5c9b900 100644
--- a/src/system.h
+++ b/src/system.h
@@ -107,80 +107,6 @@ enum { O_PATHSEARCH = O_PATH };
 enum { O_PATHSEARCH = O_SEARCH };
 #endif
 
-/* Must F designate the working directory?  */
-
-ATTRIBUTE_PURE static inline bool
-must_be_working_directory (char const *f)
-{
-  /* Return true for ".", "./.", ".///./", etc.  */
-  while (*f++ == '.')
-    {
-      if (*f != '/')
-        return !*f;
-      while (*++f == '/')
-        continue;
-      if (!*f)
-        return true;
-    }
-  return false;
-}
-
-/* Return a file descriptor open to FILE, for use in openat.
-   As an optimization, return AT_FDCWD if FILE must be the working directory.
-   Fail if FILE is not a directory.
-   On failure return a negative value; this is -1 unless AT_FDCWD == -1.  */
-
-static inline int
-target_directory_operand (char const *file)
-{
-  if (must_be_working_directory (file))
-    return AT_FDCWD;
-
-  int fd = -1;
-  int maybe_dir = -1;
-  struct stat st;
-
-  /* On old systems without O_DIRECTORY, like Solaris 10,
-     check with stat first lest we try to open a fifo for example and hang.
-     Also check on systems with O_PATHSEARCH == O_SEARCH, like Solaris 11,
-     where open() was seen to return EACCES for non executable non dirs.
-     */
-  if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH))
-      && stat (file, &st) == 0)
-    {
-      maybe_dir = S_ISDIR (st.st_mode);
-      if (! maybe_dir)
-        errno = ENOTDIR;
-    }
-
-  if (maybe_dir)
-    fd = open (file, O_PATHSEARCH | O_DIRECTORY);
-
-  if (!O_DIRECTORY && 0 <= fd)
-    {
-      /* On old systems like Solaris 10 double check type,
-         to ensure we've opened a directory.  */
-      int err;
-      if (fstat (fd, &st) != 0 ? (err = errno, true)
-          : !S_ISDIR (st.st_mode) && (err = ENOTDIR, true))
-        {
-          close (fd);
-          errno = err;
-          fd = -1;
-        }
-    }
-
-  return fd - (AT_FDCWD == -1 && fd < 0);
-}
-
-/* Return true if FD represents success for target_directory_operand.  */
-
-static inline bool
-target_dirfd_valid (int fd)
-{
-  return fd != -1 - (AT_FDCWD == -1);
-}
-
 #include <dirent.h>
 #ifndef _D_EXACT_NAMLEN
 # define _D_EXACT_NAMLEN(dp) strlen ((dp)->d_name)
-- 
2.32.0

From 197a570ff0a17db5c8e003645d154e57bddc70ce Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 12 Apr 2022 23:56:41 -0700
Subject: [PATCH 2/4] cp,mv,install: avoid excess stat calls on non-GNU

* gl/lib/targetdir.c (target_directory_operand): New arg ST.
All callers changed.
* src/cp.c (do_copy):
* src/mv.c (main):
Avoid unnecessary stat call if target_directory_operand already
got the status.
---
 gl/lib/targetdir.c | 12 ++++++------
 gl/lib/targetdir.h |  4 +++-
 src/cp.c           |  7 ++++---
 src/install.c      |  5 +++--
 src/mv.c           | 10 ++++++----
 5 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/gl/lib/targetdir.c b/gl/lib/targetdir.c
index 79d888887..a966e1ea1 100644
--- a/gl/lib/targetdir.c
+++ b/gl/lib/targetdir.c
@@ -53,18 +53,18 @@ must_be_working_directory (char const *f)
 
 /* Return a file descriptor open to FILE, for use in openat.
    As an optimization, return AT_FDCWD if FILE must be the working directory.
+   As a side effect, possibly set *ST to the file's status.
    Fail and set errno if FILE is not a directory.
    On failure return -2 if AT_FDCWD is -1, -1 otherwise.  */
 
 int
-target_directory_operand (char const *file)
+target_directory_operand (char const *file, struct stat *st)
 {
   if (must_be_working_directory (file))
     return AT_FDCWD;
 
   int fd = -1;
   int maybe_dir = -1;
-  struct stat st;
 
   /* On old systems without O_DIRECTORY, like Solaris 10,
      check with stat first lest we try to open a fifo for example and hang.
@@ -72,9 +72,9 @@ target_directory_operand (char const *file)
      where open() was seen to return EACCES for non executable non dirs.
      */
   if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH))
-      && stat (file, &st) == 0)
+      && stat (file, st) == 0)
     {
-      maybe_dir = S_ISDIR (st.st_mode);
+      maybe_dir = S_ISDIR (st->st_mode);
       if (! maybe_dir)
         errno = ENOTDIR;
     }
@@ -87,8 +87,8 @@ target_directory_operand (char const *file)
       /* On old systems like Solaris 10 double check type,
          to ensure we've opened a directory.  */
       int err;
-      if (fstat (fd, &st) != 0 ? (err = errno, true)
-          : !S_ISDIR (st.st_mode) && (err = ENOTDIR, true))
+      if (fstat (fd, st) != 0 ? (err = errno, true)
+          : !S_ISDIR (st->st_mode) && (err = ENOTDIR, true))
         {
           close (fd);
           errno = err;
diff --git a/gl/lib/targetdir.h b/gl/lib/targetdir.h
index be34d4981..cb6b06835 100644
--- a/gl/lib/targetdir.h
+++ b/gl/lib/targetdir.h
@@ -17,6 +17,7 @@
 
 #include <fcntl.h>
 #include <stdbool.h>
+#include <sys/stat.h>
 
 #ifndef _GL_INLINE_HEADER_BEGIN
  #error "Please include config.h first."
@@ -28,9 +29,10 @@ _GL_INLINE_HEADER_BEGIN
 
 /* Return a file descriptor open to FILE, for use in openat.
    As an optimization, return AT_FDCWD if FILE must be the working directory.
+   As a side effect, possibly set *ST to the file's status.
    Fail and set errno if FILE is not a directory.
    On failure return -2 if AT_FDCWD is -1, -1 otherwise.  */
-extern int target_directory_operand (char const *file);
+extern int target_directory_operand (char const *file, struct stat *st);
 
 /* Return true if FD represents success for target_directory_operand.  */
 TARGETDIR_INLINE _GL_ATTRIBUTE_PURE bool
diff --git a/src/cp.c b/src/cp.c
index 7d69db928..0f44b3513 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -602,7 +602,7 @@ do_copy (int n_files, char **file, char const *target_directory,
     }
   else if (target_directory)
     {
-      target_dirfd = target_directory_operand (target_directory);
+      target_dirfd = target_directory_operand (target_directory, &sb);
       if (! target_dirfd_valid (target_dirfd))
         die (EXIT_FAILURE, errno, _("target directory %s"),
              quoteaf (target_directory));
@@ -610,7 +610,7 @@ do_copy (int n_files, char **file, char const *target_directory,
   else
     {
       char const *lastfile = file[n_files - 1];
-      int fd = target_directory_operand (lastfile);
+      int fd = target_directory_operand (lastfile, &sb);
       if (target_dirfd_valid (fd))
         {
           target_dirfd = fd;
@@ -634,7 +634,8 @@ do_copy (int n_files, char **file, char const *target_directory,
              | O_DIRECTORY) failed with EACCES not ENOTDIR.  */
           if (2 < n_files
               || (O_PATHSEARCH == O_SEARCH && err == EACCES
-                  && stat (lastfile, &sb) == 0 && S_ISDIR (sb.st_mode)))
+                  && (sb.st_mode || stat (lastfile, &sb) == 0)
+                  && S_ISDIR (sb.st_mode)))
             die (EXIT_FAILURE, err, _("target %s"), quoteaf (lastfile));
         }
     }
diff --git a/src/install.c b/src/install.c
index 4b06f9639..5c4baf7d4 100644
--- a/src/install.c
+++ b/src/install.c
@@ -931,6 +931,7 @@ main (int argc, char **argv)
       usage (EXIT_FAILURE);
     }
 
+  struct stat sb;
   int target_dirfd = AT_FDCWD;
   if (no_target_directory)
     {
@@ -946,7 +947,7 @@ main (int argc, char **argv)
     }
   else if (target_directory)
     {
-      target_dirfd = target_directory_operand (target_directory);
+      target_dirfd = target_directory_operand (target_directory, &sb);
       if (! (target_dirfd_valid (target_dirfd)
              || (mkdir_and_install && errno == ENOENT)))
         die (EXIT_FAILURE, errno, _("failed to access %s"),
@@ -955,7 +956,7 @@ main (int argc, char **argv)
   else if (!dir_arg)
     {
       char const *lastfile = file[n_files - 1];
-      int fd = target_directory_operand (lastfile);
+      int fd = target_directory_operand (lastfile, &sb);
       if (target_dirfd_valid (fd))
         {
           target_dirfd = fd;
diff --git a/src/mv.c b/src/mv.c
index cb10713d7..53b9c1300 100644
--- a/src/mv.c
+++ b/src/mv.c
@@ -382,6 +382,8 @@ main (int argc, char **argv)
       usage (EXIT_FAILURE);
     }
 
+  struct stat sb;
+  sb.st_mode = 0;
   int target_dirfd = AT_FDCWD;
   if (no_target_directory)
     {
@@ -397,7 +399,7 @@ main (int argc, char **argv)
     }
   else if (target_directory)
     {
-      target_dirfd = target_directory_operand (target_directory);
+      target_dirfd = target_directory_operand (target_directory, &sb);
       if (! target_dirfd_valid (target_dirfd))
         die (EXIT_FAILURE, errno, _("target directory %s"),
              quoteaf (target_directory));
@@ -411,7 +413,7 @@ main (int argc, char **argv)
                           ? errno : 0);
       if (x.rename_errno != 0)
         {
-          int fd = target_directory_operand (lastfile);
+          int fd = target_directory_operand (lastfile, &sb);
           if (target_dirfd_valid (fd))
             {
               x.rename_errno = -1;
@@ -431,10 +433,10 @@ main (int argc, char **argv)
                  directory, in case opening a non-directory with (O_SEARCH
                  | O_DIRECTORY) failed with EACCES not ENOTDIR.  */
               int err = errno;
-              struct stat st;
               if (2 < n_files
                   || (O_PATHSEARCH == O_SEARCH && err == EACCES
-                      && stat (lastfile, &st) == 0 && S_ISDIR (st.st_mode)))
+                      && (sb.st_mode != 0 || stat (lastfile, &sb) == 0)
+                      && S_ISDIR (sb.st_mode)))
                 die (EXIT_FAILURE, err, _("target %s"), quoteaf (lastfile));
             }
         }
-- 
2.32.0

From f0a9f5e7da4393e8e8bf2959b3b8b65240805f75 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 12 Apr 2022 23:56:41 -0700
Subject: [PATCH 3/4] cp,mv,install: improve EACCES targetdir messages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This improves on the fix for --target-directory diagnostics bugs on
Solaris 11.  Problem reported by Bruno Haible and Pádraig Brady; see:
https://lists.gnu.org/r/coreutils/2022-04/msg00044.html
Also, omit some unnecessary stat calls.
* gl/lib/targetdir.c (target_directory_operand): If !O_DIRECTORY,
do not bother calling open if stat failed with errno != EOVERFLOW.
Rename is_a_dir to try_to_open since that’s closer to what it means.
If the open failed with EACCES and we used O_SEARCH, look at stat
results to see whether errno should be ENOTDIR for better diagnostics.
Treat EOVERFLOW as an “I don’t know whether it’s a directory and
there’s no easy way to find out” rather than as an error.
---
 gl/lib/targetdir.c | 50 +++++++++++++++++++++++++++++++---------------
 1 file changed, 34 insertions(+), 16 deletions(-)

diff --git a/gl/lib/targetdir.c b/gl/lib/targetdir.c
index a966e1ea1..76e67dc00 100644
--- a/gl/lib/targetdir.c
+++ b/gl/lib/targetdir.c
@@ -64,31 +64,49 @@ target_directory_operand (char const *file, struct stat *st)
     return AT_FDCWD;
 
   int fd = -1;
-  int maybe_dir = -1;
-
-  /* On old systems without O_DIRECTORY, like Solaris 10,
-     check with stat first lest we try to open a fifo for example and hang.
-     Also check on systems with O_PATHSEARCH == O_SEARCH, like Solaris 11,
-     where open() was seen to return EACCES for non executable non dirs.
-     */
-  if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH))
-      && stat (file, st) == 0)
+  int try_to_open = 1;
+  int stat_result;
+
+  /* On old systems without O_DIRECTORY, like Solaris 10, check with
+     stat first lest we try to open a fifo for example and hang.  */
+  if (!O_DIRECTORY)
     {
-      maybe_dir = S_ISDIR (st->st_mode);
-      if (! maybe_dir)
-        errno = ENOTDIR;
+      stat_result = stat (file, st);
+      if (stat_result == 0)
+        {
+          try_to_open = S_ISDIR (st->st_mode);
+          errno = ENOTDIR;
+        }
+      else
+        {
+          /* On EOVERFLOW failure, give up on checking, as there is no
+             easy way to check.  This should be rare.  */
+          try_to_open = errno == EOVERFLOW;
+        }
     }
 
-  if (maybe_dir)
-    fd = open (file, O_PATHSEARCH | O_DIRECTORY);
+  if (try_to_open)
+    {
+      fd = open (file, O_PATHSEARCH | O_DIRECTORY);
+
+      /* On platforms lacking O_PATH, using O_SEARCH | O_DIRECTORY to
+         open an overly-protected non-directory can fail with either
+         EACCES or ENOTDIR.  Prefer ENOTDIR as it makes for better
+         diagnostics.  */
+      if (O_PATHSEARCH == O_SEARCH && fd < 0 && errno == EACCES)
+        errno = (((O_DIRECTORY ? stat (file, st) : stat_result) == 0
+                  && !S_ISDIR (st->st_mode))
+                 ? ENOTDIR : EACCES);
+    }
 
   if (!O_DIRECTORY && 0 <= fd)
     {
       /* On old systems like Solaris 10 double check type,
          to ensure we've opened a directory.  */
       int err;
-      if (fstat (fd, st) != 0 ? (err = errno, true)
-          : !S_ISDIR (st->st_mode) && (err = ENOTDIR, true))
+      if (fstat (fd, st) == 0
+          ? !S_ISDIR (st->st_mode) && (err = ENOTDIR, true)
+          : (err = errno) != EOVERFLOW)
         {
           close (fd);
           errno = err;
-- 
2.32.0

From b411f21414cbfb11bcb42d54e0771b501fa8820f Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Tue, 12 Apr 2022 23:56:41 -0700
Subject: [PATCH 4/4] =?UTF-8?q?cp,mv,install:=20omit=20an=20=E2=80=98inlin?=
 =?UTF-8?q?e=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* gl/lib/targetdir.c (target_directory_operand):
Omit unnecessary ‘inline’.
---
 gl/lib/targetdir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gl/lib/targetdir.c b/gl/lib/targetdir.c
index 76e67dc00..0006ddcf4 100644
--- a/gl/lib/targetdir.c
+++ b/gl/lib/targetdir.c
@@ -35,7 +35,7 @@ enum { O_PATHSEARCH = O_SEARCH };
 
 /* Must F designate the working directory?  */
 
-ATTRIBUTE_PURE static inline bool
+ATTRIBUTE_PURE static bool
 must_be_working_directory (char const *f)
 {
   /* Return true for ".", "./.", ".///./", etc.  */
-- 
2.32.0

Reply via email to