Skip to content

Commit

Permalink
Emit #include <stdint.h> when -i is in effect
Browse files Browse the repository at this point in the history
  • Loading branch information
avakar authored and wbenny committed Aug 8, 2019
1 parent 7be7565 commit dba65c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Source/PDBExtractor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ namespace
" * Dumped by pdbex tool v" PDBEX_VERSION_STRING ", by wbenny\n"
" */\n\n";

static const char DEFINITIONS_INCLUDE_STDINT[] =
"#include <stdint.h>";

static const char DEFINITIONS_PRAGMA_PACK_BEGIN[] =
"#include <pshpack1.h>";

Expand Down Expand Up @@ -502,6 +505,13 @@ PDBExtractor::PrintPDBDefinitions()

if (m_Settings.PrintDefinitions)
{
if (m_Settings.UdtFieldDefinitionSettings.UseStdInt)
{
*m_Settings.PdbHeaderReconstructorSettings.OutputFile
<< DEFINITIONS_INCLUDE_STDINT
<< std::endl;
}

if (m_Settings.PrintPragmaPack)
{
*m_Settings.PdbHeaderReconstructorSettings.OutputFile
Expand Down

0 comments on commit dba65c0

Please sign in to comment.