Просмотр исходного кода

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 лет назад: 14
Родитель
Сommit
ff8d590a68
2 измененных файлов с 1 добавлено и 5 удалено
  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))