revert.beb312b.add-fmtcheck.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  2. Date: Sat Mar 15 21:47:40 2014 +0000
  3. Upstream-Commit: beb312b5bda6072dd9c609cd3cebd59212f93d2c
  4. Description:
  5. Revert fmtcheck
  6. Comment: This introduces a lot of regressions, see
  7. http://mx.gw.com/pipermail/file/2014/001439.html
  8. --- a/configure.ac
  9. +++ b/configure.ac
  10. @@ -136,10 +136,10 @@
  11. fi])
  12. dnl Checks for functions
  13. -AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof)
  14. +AC_CHECK_FUNCS(strerror strndup strtoul mkstemp mkostemp utimes utime wcwidth strtof fmtcheck)
  15. dnl Provide implementation of some required functions if necessary
  16. -AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr fmtcheck)
  17. +AC_REPLACE_FUNCS(getopt_long asprintf vasprintf strlcpy strlcat getline ctime_r asctime_r pread strcasestr)
  18. dnl Checks for libraries
  19. AC_CHECK_LIB(z,gzopen)
  20. --- a/src/file.h
  21. +++ b/src/file.h
  22. @@ -514,10 +514,6 @@
  23. #ifndef HAVE_ASCTIME_R
  24. char *asctime_r(const struct tm *, char *);
  25. #endif
  26. -#ifndef HAVE_FMTCHECK
  27. -const char *fmtcheck(const char *, const char *)
  28. - __attribute__((__format_arg__(2)));
  29. -#endif
  30. #if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H) && !defined(QUICK)
  31. #define QUICK
  32. --- a/src/softmagic.c
  33. +++ b/src/softmagic.c
  34. @@ -36,7 +36,12 @@
  35. #endif /* lint */
  36. #include "magic.h"
  37. +#ifdef HAVE_FMTCHECK
  38. +#include <stdio.h>
  39. #define F(a, b) fmtcheck((a), (b))
  40. +#else
  41. +#define F(a, b) (a)
  42. +#endif
  43. #include <assert.h>
  44. #include <string.h>
  45. #include <ctype.h>