28 #if defined(_WIN32) && !defined(__CYGWIN__)
41 #if defined(_WIN32) && !defined(__CYGWIN__)
46 W32_snprintf (
char *__restrict s,
48 const char *__restrict format,
71 ret = _vscprintf (format,
88 # if __has_builtin(__builtin_mul_overflow)
89 # define MHD_HAVE_NUL_OVERFLOW 1
92 # define MHD_HAVE_NUL_OVERFLOW 1
100 #ifdef MHD_HAVE_NUL_OVERFLOW
101 if (__builtin_mul_overflow(nelem, elsize, &alloc_size) || 0 == alloc_size)
104 alloc_size = nelem * elsize;
105 if (0 == alloc_size || elsize != alloc_size / nelem)
108 ptr = malloc (alloc_size);
111 memset(ptr, 0, alloc_size);