From 861c6e7c8e4dfdd842442dde47cc653764baff4f Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Mon, 7 Sep 2020 18:11:46 +1200 Subject: Skip unnecessary stat() calls in walkdir(). Some kernels can tell us the type of a "dirent", so we can avoid a call to stat() or lstat() in many cases. Define a new function get_dirent_type() to contain that logic, for use by the backend and frontend versions of walkdir(), and perhaps other callers in future. Reviewed-by: Tom Lane Reviewed-by: Juan José Santamaría Flecha Discussion: https://postgr.es/m/CA%2BhUKG%2BFzxupGGN4GpUdbzZN%2Btn6FQPHo8w0Q%2BAPH5Wz8RG%2Bww%40mail.gmail.com --- src/tools/msvc/Mkvcbuild.pm | 4 ++-- src/tools/pgindent/typedefs.list | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tools') diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 536df5a92e7..89e1b390365 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -121,7 +121,7 @@ sub mkvcbuild our @pgcommonallfiles = qw( archive.c base64.c checksum_helper.c config_info.c controldata_utils.c d2s.c encnames.c exec.c - f2s.c file_perm.c hashfn.c ip.c jsonapi.c + f2s.c file_perm.c file_utils.c hashfn.c ip.c jsonapi.c keywords.c kwlookup.c link-canary.c md5.c pg_get_line.c pg_lzcompress.c pgfnames.c psprintf.c relpath.c rmtree.c saslprep.c scram-common.c string.c stringinfo.c unicode_norm.c username.c @@ -138,7 +138,7 @@ sub mkvcbuild } our @pgcommonfrontendfiles = ( - @pgcommonallfiles, qw(fe_memutils.c file_utils.c + @pgcommonallfiles, qw(fe_memutils.c logging.c restricted_token.c sprompt.c)); our @pgcommonbkndfiles = @pgcommonallfiles; diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index 500623e2301..391c204f721 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -1515,6 +1515,7 @@ PGEventResultCopy PGEventResultCreate PGEventResultDestroy PGFInfoFunction +PGFileType PGFunction PGLZ_HistEntry PGLZ_Strategy -- cgit v1.2.3