mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
binpac: Request format macros from inttypes.h explicitly.
This helps ensure the availability of PRI* macros from .pac files, which cannot create this definition themselves since the inclusion of binpac.h is hardcoded to be placed very early in the generated code and already includes inttypes.h itself.
This commit is contained in:
parent
a5fb8e3787
commit
498a5314ed
1 changed files with 7 additions and 0 deletions
|
@ -17,6 +17,13 @@
|
|||
#include <stdio.h>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
// Expose C99 functionality from inttypes.h, which would otherwise not be
|
||||
// available in C++.
|
||||
#ifndef __STDC_FORMAT_MACROS
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#define BINPAC_ASSERT(x) assert(x)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue