Explorar o código

libcompat: Remove compat definition for strtoul()

Using this function is unsafe, because there's no way to know if the
input contained a negative number. Remove the compat definition now
that we do not use this function any longer.
Guillem Jover %!s(int64=14) %!d(string=hai) anos
pai
achega
ff8d590a68
Modificáronse 2 ficheiros con 1 adicións e 5 borrados
  1. 1 1
      configure.ac
  2. 0 4
      lib/compat/compat.h

+ 1 - 1
configure.ac

@@ -92,7 +92,7 @@ DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
 AC_CHECK_DECLS([strnlen], [[#include <string.h>]])
 AC_CHECK_FUNCS([memcpy lchown],
                [], [AC_ERROR([missing required function])])
-AC_CHECK_FUNCS([strtoul strtoimax isascii setsid getdtablesize \
+AC_CHECK_FUNCS([strtoimax isascii setsid getdtablesize \
                 getprogname getexecname lutimes posix_fadvise])
 
 DPKG_MMAP

+ 0 - 4
lib/compat/compat.h

@@ -38,10 +38,6 @@ extern "C" {
 #define WCOREDUMP(x) 0
 #endif
 
-#ifndef HAVE_STRTOUL
-#define strtoul strtol
-#endif
-
 #ifndef HAVE_VA_COPY
 #include <string.h>
 #define va_copy(dest, src) memcpy(&(dest), &(src), sizeof(va_list))