Skip to content

Commit a246e87

Browse files
committed
Convert MISSING_SYSCONF to !HAVE_SYSCONF for autoconf
From: Keith Parks
1 parent 197c7f5 commit a246e87

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/backend/storage/file/fd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Copyright (c) 1994, Regents of the University of California
77
*
88
* IDENTIFICATION
9-
* $Id: fd.c,v 1.13 1997/01/13 01:25:29 scrappy Exp $
9+
* $Id: fd.c,v 1.14 1997/01/27 00:09:43 scrappy Exp $
1010
*
1111
* NOTES:
1212
*
@@ -196,15 +196,15 @@ pg_nofile(void)
196196
static long no_files = 0;
197197

198198
if (no_files == 0) {
199-
#if defined(MISSING_SYSCONF)
199+
#ifndef HAVE_SYSCONF
200200
no_files = (long)NOFILE;
201201
#else
202202
no_files = sysconf(_SC_OPEN_MAX);
203203
if (no_files == -1) {
204204
elog(DEBUG,"pg_nofile: Unable to get _SC_OPEN_MAX using sysconf() using (%d)", NOFILE);
205205
no_files = (long)NOFILE;
206206
}
207-
#endif /* MISSING_SYSCONF */
207+
#endif
208208
}
209209

210210
if ((no_files - RESERVE_FOR_LD) < FD_MINFREE)

src/include/config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#define HAVE_CBRT
3636
#define HAVE_RINT
3737
#define HAVE_GETRUSAGE
38+
#define HAVE_SYSCONF
3839

3940
#if defined(aix)
4041
# undef HAVE_SYS_SELECT_H
@@ -151,6 +152,7 @@
151152
#endif
152153

153154
#if defined(nextstep)
155+
# undef HAVE_SYSCONF
154156
# undef HAVE_VALUES_H
155157
# include <sys/ioctl.h>
156158
# if defined(__STRICT_ANSI__)

0 commit comments

Comments
 (0)