mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:33:38 +03:00
build: detect and include inttypes.h again
For `PRI*` printf masks for fixed-size C99 types. Also: - add simple fallback for `PRIu32`, `PRIx32`, if `inttypes.h` is missing. Cherry-picked from #20200 Ref: #20207 Follow-up to4701a6d2ae#19695 Ref:60359ad504#12275 Closes #20208
This commit is contained in:
parent
5f612acaa1
commit
4c9e4e99c1
10 changed files with 27 additions and 1 deletions
|
|
@ -96,6 +96,9 @@
|
|||
/* Define if you have the `timeval' struct. */
|
||||
#define HAVE_STRUCT_TIMEVAL
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@
|
|||
#define HAVE_GMTIME_R 1
|
||||
#define HAVE_INET_NTOP 1
|
||||
#define HAVE_INET_PTON 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIBGEN_H 1
|
||||
#define HAVE_LIBZ 1
|
||||
#define HAVE_LOCALE_H 1
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@
|
|||
/* Define if you have the `timeval' struct. */
|
||||
#define HAVE_STRUCT_TIMEVAL
|
||||
|
||||
/* Define if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#undef HAVE_IO_H
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,11 @@
|
|||
/* Define if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#endif
|
||||
|
||||
/* Define if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
|
|
|
|||
|
|
@ -336,6 +336,9 @@
|
|||
/* Define to 1 if symbol `sa_family_t' exists */
|
||||
#cmakedefine HAVE_SA_FAMILY_T 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the ioctlsocket function. */
|
||||
#cmakedefine HAVE_IOCTLSOCKET 1
|
||||
|
||||
|
|
|
|||
|
|
@ -464,6 +464,13 @@
|
|||
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#define PRIu32 "u"
|
||||
#define PRIx32 "x"
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef HAVE_IO_H
|
||||
# include <io.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue