| Index: runtime/tools/create_archive.py
|
| diff --git a/runtime/tools/create_archive.py b/runtime/tools/create_archive.py
|
| index dcb6a9008a06e0d7b01198b42cfdc18a7d675b02..8a5f2a3f9eeb679d4a2ff25164fefa9742b65d13 100644
|
| --- a/runtime/tools/create_archive.py
|
| +++ b/runtime/tools/create_archive.py
|
| @@ -40,12 +40,23 @@ def writeCCFile(output_file,
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| ''' % date.today().year
|
| + cc_text += '''
|
| +
|
| +#if defined(_WIN32)
|
| +typedef unsigned __int8 uint8_t;
|
| +#else
|
| +#include <inttypes.h>
|
| +#include <stdint.h>
|
| +#endif
|
| +#include <stddef.h>
|
| +
|
| +'''
|
| cc_text += 'namespace %s {\n' % outer_namespace
|
| if inner_namespace != None:
|
| cc_text += 'namespace %s {\n' % inner_namespace
|
| cc_text += '\n\n'
|
| # Write the archive.
|
| - cc_text += 'static const char %s_[] = {\n ' % name
|
| + cc_text += 'static const uint8_t %s_[] = {\n ' % name
|
| lineCounter = 0
|
| for byte in tar_archive:
|
| cc_text += r" '\x%02x'," % ord(byte)
|
| @@ -57,7 +68,7 @@ def writeCCFile(output_file,
|
| cc_text += '\n '
|
| cc_text += '};\n'
|
| cc_text += '\nunsigned int %s_len = %d;\n' % (name, len(tar_archive))
|
| - cc_text += '\nconst char* %s = %s_;\n' % (name, name)
|
| + cc_text += '\nconst uint8_t* %s = %s_;\n' % (name, name)
|
| if inner_namespace != None:
|
| cc_text += '} // namespace %s\n' % inner_namespace
|
| cc_text += '} // namespace %s\n' % outer_namespace
|
|
|