From 7c7dc5ea3a8f7fca0c2696e434938c1048f9e66d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 28 Feb 2021 13:19:20 -0800 Subject: =?UTF-8?q?Omit=20=E2=80=98inline=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With today’s compilers ‘inline’ is typically not needed for performance (at least the way GNU Tar uses it) and it gets in the way of portability. Some compilers ignore ‘inline’ and some inline even without ‘inline’, and when inlining is haphazard GNU Tar can link on your GNU/Linux host but not link on Solaris. Better to have it not link everywhere so these problems are caught before porting. * configure.ac: Omit AC_C_INLINE; no longer needed here. * lib/system.h (sys_reset_uid_gid): No longer inline. --- configure.ac | 1 - lib/system.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e2cf400..6439a21 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,6 @@ gl_EARLY AC_PROG_RANLIB AC_SYS_LARGEFILE AC_ISC_POSIX -AC_C_INLINE AC_CHECK_HEADERS(fcntl.h linux/fd.h memory.h net/errno.h \ sgtty.h string.h \ diff --git a/lib/system.h b/lib/system.h index 6acefd7..92b2462 100644 --- a/lib/system.h +++ b/lib/system.h @@ -470,7 +470,7 @@ char *getenv (); # define SET_BINARY_MODE(arc) # define TTY_NAME "/dev/tty" # include -static inline char const * +static char const * sys_reset_uid_gid (void) { uid_t uid = getuid (); -- cgit v1.2.1