Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
382ff212
Commit
382ff212
authored
14 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Fix up lame idea of not using autoconf to determine if platform has scandir().
Should fix buildfarm failures.
parent
2a73ee59
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+2
-1
2 additions, 1 deletion
configure
configure.in
+2
-2
2 additions, 2 deletions
configure.in
contrib/pg_upgrade/file.c
+12
-14
12 additions, 14 deletions
contrib/pg_upgrade/file.c
src/include/pg_config.h.in
+3
-0
3 additions, 0 deletions
src/include/pg_config.h.in
with
19 additions
and
17 deletions
configure
+
2
−
1
View file @
382ff212
...
...
@@ -18494,7 +18494,8 @@ fi
for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink scandir setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
...
...
This diff is collapsed.
Click to expand it.
configure.in
+
2
−
2
View file @
382ff212
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.62
6
2010/0
4/30 03:16:58 scrappy
Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.62
7
2010/0
5/13 22:07:42 tgl
Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -1167,7 +1167,7 @@ PGAC_VAR_INT_TIMEZONE
AC_FUNC_ACCEPT_ARGTYPES
PGAC_FUNC_GETTIMEOFDAY_1ARG
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
AC_CHECK_FUNCS([cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink
scandir
setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs])
AC_REPLACE_FUNCS(fseeko)
case $host_os in
...
...
This diff is collapsed.
Click to expand it.
contrib/pg_upgrade/file.c
+
12
−
14
View file @
382ff212
...
...
@@ -33,7 +33,7 @@ static int win32_pghardlink(const char *src, const char *dst);
static
int
copy_dir
(
const
char
*
from
,
const
char
*
to
,
bool
force
);
#endif
#if
defined(sun) || defined(WIN32)
#if
ndef HAVE_SCANDIR
static
int
pg_scandir_internal
(
migratorContext
*
ctx
,
const
char
*
dirname
,
struct
dirent
***
namelist
,
int
(
*
selector
)
(
const
struct
dirent
*
));
...
...
@@ -235,26 +235,25 @@ copy_file(const char *srcfile, const char *dstfile, bool force)
* pg_scandir()
*
* Wrapper for portable scandir functionality
*
*/
int
pg_scandir
(
migratorContext
*
ctx
,
const
char
*
dirname
,
struct
dirent
***
namelist
,
int
(
*
selector
)
(
const
struct
dirent
*
))
{
#if
defined(sun) || defined(WIN32)
#if
ndef HAVE_SCANDIR
return
pg_scandir_internal
(
ctx
,
dirname
,
namelist
,
selector
);
/*
* scandir() is originally from BSD 4.3, which had the third argument as
* non-const. Linux and other C libraries have updated it to use a const.
* http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2005-12/msg00214.html
*
* Here we try to guess which libc's need const, and which don't. The net
* goal here is to try to supress a compiler warning due to a prototype
* goal here is to try to sup
p
ress a compiler warning due to a prototype
* mismatch of const usage. Ideally we would do this via autoconf, but
* Postgres's autoconf doesn't test for this and it is overkill to add
* autoconf just for this. scandir() is from BSD 4.3, which had the third
* argument as non-const. Linux and other C libraries have updated it to
* use a const.
* http://unix.derkeiler.com/Mailing-Lists/FreeBSD/questions/2005-12/msg002
* 14.html
* autoconf doesn't have a suitable builtin test and it seems overkill
* to add one just to avoid a warning.
*/
#elif defined(freebsd) || defined(bsdi) || defined(darwin) || defined(openbsd)
/* no const */
...
...
@@ -266,19 +265,18 @@ pg_scandir(migratorContext *ctx, const char *dirname,
}
#if
defined(sun) || defined(WIN32)
#if
ndef HAVE_SCANDIR
/*
* pg_scandir_internal()
*
* We'll provide our own scandir function for sun, since it is not
* part of the standard system library.
* Implement our own scandir() on platforms that don't have it.
*
* Returns count of files that meet the selection criteria coded in
* the function pointed to by selector. Creates an array of pointers
* to dirent structures. Address of array returned in namelist.
*
* Note that the number of dirent structures needed is dynamically
* allocated using realloc. Realloc can be in
n
eficient if invoked a
* allocated using realloc. Realloc can be ine
f
ficient if invoked a
* large number of times. Its use in pg_upgrade is to find filesystem
* filenames that have extended beyond the initial segment (file.1,
* .2, etc.) and should therefore be invoked a small number of times.
...
...
This diff is collapsed.
Click to expand it.
src/include/pg_config.h.in
+
3
−
0
View file @
382ff212
...
...
@@ -409,6 +409,9 @@
/* Define to 1 if you have the `rl_filename_completion_function' function. */
#undef HAVE_RL_FILENAME_COMPLETION_FUNCTION
/* Define to 1 if you have the `scandir' function. */
#undef HAVE_SCANDIR
/* Define to 1 if you have the <security/pam_appl.h> header file. */
#undef HAVE_SECURITY_PAM_APPL_H
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment