* Removed compile-time checks for _SC_OPEN_MAX, _PC_PATH_MAX and _SC_PAGESIZE
and used simple build-time #ifdefs. git-svn-id: svn://svn.zoy.org/elk/trunk@196 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
+2
-2
@@ -42,7 +42,7 @@
|
||||
#if defined(MPROTECT_SIG) || defined(MPROTECT_MMAP)
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
#if defined(HAVE_GETPAGESIZE) || defined(SC_PAGESIZE_IN_UNISTD_H)
|
||||
#if defined(HAVE_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
# 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)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#ifdef PC_PATH_MAX_IN_UNISTD_H
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#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)
|
||||
|
||||
Reference in New Issue
Block a user