diff --git a/configure.ac b/configure.ac index 1c3e637..85d65ff 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AC_PREREQ(2.50) AC_CONFIG_AUX_DIR(autotools) AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(elk, 3.99.4) +AM_INIT_AUTOMAKE(elk, 3.99.5) AM_CONFIG_HEADER(config.h) AC_PROG_CC @@ -85,21 +85,9 @@ AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/filio.h) # set sysconf_open_max=yes. # If neither is set to "yes", an educated guess will be made. AC_CHECK_FUNCS(getdtablesize) -AC_MSG_CHECKING(for _SC_OPEN_MAX in unistd.h) -AC_EGREP_HEADER(_SC_OPEN_MAX, unistd.h, [ - AC_MSG_RESULT(yes) AC_DEFINE(SC_OPEN_MAX_IN_UNISTD_H, 1, Define if defines _SC_OPEN_MAX) -],[ - AC_MSG_RESULT(no) -]) # If POSIX-style pathconf() can be invoked with _PC_PATH_MAX to determine # the maximum pathname length, set pathconf_path_max=yes. -AC_MSG_CHECKING(for _PC_PATH_MAX in unistd.h) -AC_EGREP_HEADER(_PC_PATH_MAX, unistd.h, [ - AC_MSG_RESULT(yes) AC_DEFINE(PC_PATH_MAX_IN_UNISTD_H, 1, Define if defines _PC_PATH_MAX) -],[ - AC_MSG_RESULT(no) -]) # If the system page size can be determined by calling getpagesize() # set getpagesize=yes. @@ -108,12 +96,6 @@ AC_EGREP_HEADER(_PC_PATH_MAX, unistd.h, [ # These two variables are only required if the generational garbage # collector is used. AC_CHECK_FUNCS(getpagesize) -AC_MSG_CHECKING(for _SC_PAGESIZE in unistd.h) -AC_EGREP_HEADER(_SC_PAGESIZE, unistd.h, [ - AC_MSG_RESULT(yes) AC_DEFINE(SC_PAGESIZE_IN_UNISTD_H, 1, Define if defines _SC_PAGESIZE) -],[ - AC_MSG_RESULT(no) -]) # Set reliable_signals=bsd if your system supports BSD-style reliable # signals (has sigblock and related functions); set reliable_signals=posix diff --git a/lib/unix/fdescr.c b/lib/unix/fdescr.c index 8852995..54392ad 100644 --- a/lib/unix/fdescr.c +++ b/lib/unix/fdescr.c @@ -194,7 +194,7 @@ int Num_Filedescriptors() { ret = OPEN_MAX; #elif defined(HAVE_GETDTABLESIZE) ret = getdtablesize(); -#elif defined(SC_OPEN_MAX_IN_UNISTD_H) +#elif defined(_SC_OPEN_MAX) static r; if (r == 0) { if ((r = sysconf(_SC_OPEN_MAX)) == -1) diff --git a/src/heap-gen.c b/src/heap-gen.c index 53acf13..7719429 100644 --- a/src/heap-gen.c +++ b/src/heap-gen.c @@ -42,7 +42,7 @@ #if defined(MPROTECT_SIG) || defined(MPROTECT_MMAP) # include #endif -#if defined(HAVE_GETPAGESIZE) || defined(SC_PAGESIZE_IN_UNISTD_H) +#if defined(HAVE_UNISTD_H) # include # if defined(_SC_PAGE_SIZE) && !defined(_SC_PAGESIZE) /* Wrong in HP-UX */ # define _SC_PAGESIZE _SC_PAGE_SIZE @@ -493,7 +493,7 @@ void Make_Heap (int size) { * then calculate the resulting number of heap pages. */ -#if defined(SC_PAGESIZE_IN_UNISTD_H) +#if defined(_SC_PAGESIZE) if ((bytes_per_pp = sysconf (_SC_PAGESIZE)) == -1) Fatal_Error ("sysconf(_SC_PAGESIZE) failed; can't get pagesize"); #elif defined(HAVE_GETPAGESIZE) diff --git a/src/io.c b/src/io.c index 1efc662..a66052f 100644 --- a/src/io.c +++ b/src/io.c @@ -40,7 +40,7 @@ #include #include -#ifdef PC_PATH_MAX_IN_UNISTD_H +#ifdef HAVE_UNISTD_H # include #endif @@ -122,7 +122,7 @@ unsigned int Path_Max () { return PATH_MAX; #elif defined(MAXPATHLEN) /* 4.3 BSD */ return MAXPATHLEN; -#elif defined(PC_PATH_MAX_IN_UNISTD_H) +#elif defined(_PC_PATH_MAX) static int r; if (r == 0) { if ((r = pathconf ("/", _PC_PATH_MAX)) == -1)