Преглед изворни кода

libcompat: Do not ifdef out compatibility code definitions

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.
Guillem Jover пре 14 година
родитељ
комит
e6ca514f9f

+ 0 - 2
lib/compat/alphasort.c

@@ -22,7 +22,6 @@
 #include <string.h>
 #include <string.h>
 #include <dirent.h>
 #include <dirent.h>
 
 
-#ifndef HAVE_ALPHASORT
 int
 int
 alphasort(const void *a, const void *b)
 alphasort(const void *a, const void *b)
 {
 {
@@ -30,4 +29,3 @@ alphasort(const void *a, const void *b)
 	              (*(const struct dirent **)b)->d_name);
 	              (*(const struct dirent **)b)->d_name);
 
 
 }
 }
-#endif

+ 0 - 2
lib/compat/asprintf.c

@@ -22,7 +22,6 @@
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
-#ifndef HAVE_ASPRINTF
 int
 int
 asprintf(char **strp, char const *fmt, ...)
 asprintf(char **strp, char const *fmt, ...)
 {
 {
@@ -35,4 +34,3 @@ asprintf(char **strp, char const *fmt, ...)
 
 
 	return n;
 	return n;
 }
 }
-#endif

+ 0 - 2
lib/compat/scandir.c

@@ -26,7 +26,6 @@
 #include <dirent.h>
 #include <dirent.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
-#ifndef HAVE_SCANDIR
 static int
 static int
 cleanup(DIR *dir, struct dirent **dirlist, int used)
 cleanup(DIR *dir, struct dirent **dirlist, int used)
 {
 {
@@ -97,4 +96,3 @@ scandir(const char *dir, struct dirent ***namelist,
 
 
 	return used;
 	return used;
 }
 }
-#endif

+ 0 - 2
lib/compat/snprintf.c

@@ -24,7 +24,6 @@
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
-#ifndef HAVE_SNPRINTF
 int
 int
 snprintf(char *str, size_t n, char const *fmt, ...)
 snprintf(char *str, size_t n, char const *fmt, ...)
 {
 {
@@ -37,4 +36,3 @@ snprintf(char *str, size_t n, char const *fmt, ...)
 
 
 	return i;
 	return i;
 }
 }
-#endif

+ 0 - 2
lib/compat/strerror.c

@@ -24,7 +24,6 @@
 
 
 #define _(str) gettext(str)
 #define _(str) gettext(str)
 
 
-#ifndef HAVE_STRERROR
 extern const char *const sys_errlist[];
 extern const char *const sys_errlist[];
 extern const int sys_nerr;
 extern const int sys_nerr;
 
 
@@ -40,4 +39,3 @@ strerror(int e)
 
 
 	return buf;
 	return buf;
 }
 }
-#endif

+ 0 - 2
lib/compat/strndup.c

@@ -23,7 +23,6 @@
 #include <string.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
-#ifndef HAVE_STRNDUP
 #undef strndup
 #undef strndup
 
 
 char *
 char *
@@ -42,4 +41,3 @@ strndup(const char *s, size_t n)
 
 
 	return str;
 	return str;
 }
 }
-#endif

+ 0 - 2
lib/compat/strsignal.c

@@ -56,7 +56,6 @@ const char *const sys_siglist[] = {
 extern const char *const sys_siglist[];
 extern const char *const sys_siglist[];
 #endif
 #endif
 
 
-#ifndef HAVE_STRSIGNAL
 const char *
 const char *
 strsignal(int s)
 strsignal(int s)
 {
 {
@@ -69,4 +68,3 @@ strsignal(int s)
 
 
 	return buf;
 	return buf;
 }
 }
-#endif

+ 0 - 2
lib/compat/unsetenv.c

@@ -22,7 +22,6 @@
 #include <string.h>
 #include <string.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
-#ifndef HAVE_UNSETENV
 int
 int
 unsetenv(const char *p)
 unsetenv(const char *p)
 {
 {
@@ -36,4 +35,3 @@ unsetenv(const char *p)
 	strcat(q, "=");
 	strcat(q, "=");
 	return putenv(q);
 	return putenv(q);
 }
 }
-#endif

+ 0 - 2
lib/compat/vasprintf.c

@@ -23,7 +23,6 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 
-#ifndef HAVE_VASPRINTF
 int
 int
 vasprintf(char **strp, char const *fmt, va_list args)
 vasprintf(char **strp, char const *fmt, va_list args)
 {
 {
@@ -56,4 +55,3 @@ vasprintf(char **strp, char const *fmt, va_list args)
 
 
 	return n;
 	return n;
 }
 }
-#endif

+ 0 - 2
lib/compat/vsnprintf.c

@@ -24,7 +24,6 @@
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdio.h>
 
 
-#ifndef HAVE_VSNPRINTF
 int
 int
 vsnprintf(char *buf, size_t maxsize, const char *fmt, va_list args)
 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;
 	return total;
 }
 }
-#endif