Home | History | Annotate | Line # | Download | only in os
      1 #ifndef JEMALLOC_INTERNAL_OS_FMT_H
      2 #define JEMALLOC_INTERNAL_OS_FMT_H
      3 
      4 #include "jemalloc/internal/jemalloc_preamble.h"
      5 #include "jemalloc/internal/os/detect.h"
      6 
      7 /*
      8  * Printf format-specifier macros for fixed-width and pointer-sized integers
      9  * (FMTd32/FMTu32/FMTx32/FMTd64/FMTu64/FMTx64/FMTdPTR/FMTuPTR/FMTxPTR).
     10  * Default: posix/ (<inttypes.h>'s PRId32 etc).  Override: Windows (MSVC's
     11  * CRT historically didn't support the C99 <inttypes.h> macros the same way,
     12  * so these are hand-rolled from an ll/I64-style prefix instead).
     13  *
     14  * Unlike other modules, this one defines only macros, no functions.
     15  */
     16 
     17 #if defined(_WIN32)
     18 #  include "jemalloc/internal/os/windows/fmt.h"
     19 #elif defined(JEMALLOC_OS_POSIX)
     20 #  include "jemalloc/internal/os/posix/fmt.h"
     21 #else
     22 #  error "OS layer: no fmt backend for this platform; add os/<os>/fmt.h"
     23 #endif
     24 
     25 #endif /* JEMALLOC_INTERNAL_OS_FMT_H */
     26