diff --git a/src/makeint.h b/src/makeint.h index 5a553093..61c78229 100644 --- a/src/makeint.h +++ b/src/makeint.h @@ -149,15 +149,8 @@ extern int errno; # endif #endif -#ifdef PATH_MAX -# define GET_PATH_MAX PATH_MAX -# define PATH_VAR(var) char var[PATH_MAX+1] -#else -# define NEED_GET_PATH_MAX 1 -# define GET_PATH_MAX (get_path_max ()) -# define PATH_VAR(var) char *var = alloca (GET_PATH_MAX+1) -unsigned int get_path_max (void); -#endif +#define GET_PATH_MAX PATH_MAX +#define PATH_VAR(var) char var[PATH_MAX+1] #ifndef CHAR_BIT # define CHAR_BIT 8 diff --git a/src/misc.c b/src/misc.c index 1914aa22..9e41a546 100644 --- a/src/misc.c +++ b/src/misc.c @@ -948,25 +948,6 @@ strncasecmp (const char *s1, const char *s2, size_t n) #endif -#ifdef NEED_GET_PATH_MAX -unsigned int -get_path_max (void) -{ - static unsigned int value; - - if (value == 0) - { - long x = pathconf ("/", _PC_PATH_MAX); - if (x > 0) - value = (unsigned int) x; - else - value = PATH_MAX; - } - - return value; -} -#endif - #if !HAVE_MEMPCPY void * mempcpy (void *dest, const void *src, size_t n)