1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

added test for C99 compliant vsnprintf

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent ed9d93c9c3
commit 9ebd90904e
3 changed files with 282 additions and 214 deletions

View File

@ -1,5 +1,6 @@
#undef HAVE_VOLATILE
#undef HAVE_BROKEN_READDIR
#undef HAVE_C99_VSNPRINTF
#undef HAVE_ERRNO_DECL
#undef HAVE_LONGLONG
#undef HAVE_OFF64_T

476
source/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -805,6 +805,25 @@ if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
AC_DEFINE(HAVE_GETTIMEOFDAY_TZ)
fi
AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[
AC_TRY_RUN([
#include <sys/types.h>
#include <stdarg.h>
void foo(const char *format, ...) {
va_list ap;
int len;
va_start(ap, format);
len = vsnprintf(0, 0, format, ap);
va_end(ap);
if (len == 5) exit(0);
exit(1);
}
main() { foo("hello"); }
],
samba_cv_HAVE_C99_VSNPRINTF=yes,samba_cv_HAVE_C99_VSNPRINTF=no,samba_cv_HAVE_C99_VSNPRINTF=cross)])
if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
AC_DEFINE(HAVE_C99_VSNPRINTF)
fi
AC_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[
AC_TRY_RUN([#include <sys/types.h>