The code is already selected (or not) to be included by the Makefile machinery, there's no need to disabled it too in the actual code, and not doing so will allow to test it later on.
@@ -22,7 +22,6 @@
#include <string.h>
#include <dirent.h>
-#ifndef HAVE_ALPHASORT
int
alphasort(const void *a, const void *b)
{
@@ -30,4 +29,3 @@ alphasort(const void *a, const void *b)
(*(const struct dirent **)b)->d_name);
}
-#endif
#include <stdarg.h>
#include <stdio.h>
-#ifndef HAVE_ASPRINTF
asprintf(char **strp, char const *fmt, ...)
@@ -35,4 +34,3 @@ asprintf(char **strp, char const *fmt, ...)
return n;
@@ -26,7 +26,6 @@
#include <stdlib.h>
-#ifndef HAVE_SCANDIR
static int
cleanup(DIR *dir, struct dirent **dirlist, int used)
@@ -97,4 +96,3 @@ scandir(const char *dir, struct dirent ***namelist,
return used;
@@ -24,7 +24,6 @@
-#ifndef HAVE_SNPRINTF
snprintf(char *str, size_t n, char const *fmt, ...)
@@ -37,4 +36,3 @@ snprintf(char *str, size_t n, char const *fmt, ...)
return i;
#define _(str) gettext(str)
-#ifndef HAVE_STRERROR
extern const char *const sys_errlist[];
extern const int sys_nerr;
@@ -40,4 +39,3 @@ strerror(int e)
return buf;
@@ -23,7 +23,6 @@
-#ifndef HAVE_STRNDUP
#undef strndup
char *
@@ -42,4 +41,3 @@ strndup(const char *s, size_t n)
return str;
@@ -56,7 +56,6 @@ const char *const sys_siglist[] = {
extern const char *const sys_siglist[];
#endif
-#ifndef HAVE_STRSIGNAL
const char *
strsignal(int s)
@@ -69,4 +68,3 @@ strsignal(int s)
-#ifndef HAVE_UNSETENV
unsetenv(const char *p)
@@ -36,4 +35,3 @@ unsetenv(const char *p)
strcat(q, "=");
return putenv(q);
-#ifndef HAVE_VASPRINTF
vasprintf(char **strp, char const *fmt, va_list args)
@@ -56,4 +55,3 @@ vasprintf(char **strp, char const *fmt, va_list args)
-#ifndef HAVE_VSNPRINTF
vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
@@ -68,4 +67,3 @@ vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
return total;