ソースを参照

build: Check for the presence of the strnlen declaration

This will define the HAVE_DECL_STRNLEN macro, needed so that the
strnlen.h declares the function in case the system lacks it.
Guillem Jover 15 年 前
コミット
86ec744869
共有2 個のファイルを変更した3 個の追加0 個の削除を含む
  1. 1 0
      configure.ac
  2. 2 0
      debian/changelog

+ 1 - 0
configure.ac

@@ -83,6 +83,7 @@ DPKG_CHECK_PROGNAME
 DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free \
                          strnlen strerror strsignal asprintf \
                          scandir alphasort unsetenv])
+AC_CHECK_DECLS([strnlen], [[#include <string.h>]])
 AC_CHECK_FUNCS([strtoul strtoimax isascii memcpy setsid getdtablesize \
                 getprogname getexecname lutimes posix_fadvise])
 

+ 2 - 0
debian/changelog

@@ -7,6 +7,8 @@ dpkg (1.16.2) UNRELEASED; urgency=low
     the obstack compat module from gnulib.
   * Link the libdpkg unit tests with libcompat and libintl, so that systems
     needing them will compile correctly.
+  * Check for the presence of the strnlen declaration and correctly provide
+    the compat one in case the systems lacks it.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).