1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

added test for C99 compliant vsnprintf

(This used to be commit 9ebd90904e)
This commit is contained in:
Andrew Tridgell 2001-04-27 02:35:42 +00:00
parent 9d32e3a528
commit dfc07f6174
3 changed files with 282 additions and 214 deletions

View File

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

476
source3/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) AC_DEFINE(HAVE_GETTIMEOFDAY_TZ)
fi 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_CACHE_CHECK([for broken readdir],samba_cv_HAVE_BROKEN_READDIR,[
AC_TRY_RUN([#include <sys/types.h> AC_TRY_RUN([#include <sys/types.h>