ICU-22807 Fix for missing __STDC_FORMAT_MACROS before inttypes.h

Co-authored-by: Markus Scherer <markus.icu@gmail.com>
This commit is contained in:
Sergey Fedorov 2024-06-25 06:03:20 +08:00 committed by Markus Scherer
parent 967babdc5f
commit a4ace3ace7

View file

@ -19,6 +19,13 @@
#include "number_types.h"
#include "uvector.h" // U_ASSERT
// The C99 standard suggested that C++ implementations not define PRId64 etc. constants
// unless this macro is defined.
// See the Notes at https://en.cppreference.com/w/cpp/types/integer .
// Similar to defining __STDC_LIMIT_MACROS in unicode/ptypes.h .
#ifndef __STDC_FORMAT_MACROS
# define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#include <math.h>