From: Knut S. O. <bir...@an...> - 2016-02-24 13:47:55
|
Fixes Visual C++ 2010 breakage in recently added codeview 8 code. Signed-off-by: Knut St. Osmundsen <bir...@an...> --- md5.h | 2 +- output/codeview.c | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/md5.h b/md5.h index 147d3dd..ea34cda 100644 --- a/md5.h +++ b/md5.h @@ -1,7 +1,7 @@ #ifndef _MD5_H_ #define _MD5_H_ -#include <stdint.h> +#include <inttypes.h> #define MD5_HASHBYTES 16 diff --git a/output/codeview.c b/output/codeview.c index 2f5bb69..fa4e9d5 100644 --- a/output/codeview.c +++ b/output/codeview.c @@ -59,15 +59,15 @@ static void cv8_output(int type, void *param); static void cv8_cleanup(void); struct dfmt df_cv8 = { - .fullname = "Codeview 8", - .shortname = "cv8", - .init = cv8_init, - .linenum = cv8_linenum, - .debug_deflabel = cv8_deflabel, - .debug_directive = null_debug_directive, - .debug_typevalue = cv8_typevalue, - .debug_output = cv8_output, - .cleanup = cv8_cleanup, + /*.fullname =*/ "Codeview 8", + /*.shortname =*/ "cv8", + /*.init =*/ cv8_init, + /*.linenum =*/ cv8_linenum, + /*.debug_deflabel =*/ cv8_deflabel, + /*.debug_directive =*/ null_debug_directive, + /*.debug_typevalue =*/ cv8_typevalue, + /*.debug_output =*/ cv8_output, + /*.cleanup =*/ cv8_cleanup, }; /******************************************************************************* @@ -379,6 +379,8 @@ static void register_reloc(struct coff_Section *const sect, { struct coff_Reloc *r; struct coff_Section *sec; + int idx_sec; + uint32_t idx_sym; r = *sect->tail = nasm_malloc(sizeof(struct coff_Reloc)); sect->tail = &r->next; @@ -390,8 +392,8 @@ static void register_reloc(struct coff_Section *const sect, r->type = type; r->symbol = 0; - for (int i = 0; i < coff_nsects; i++) { - sec = coff_sects[i]; + for (idx_sec = 0; idx_sec < coff_nsects; idx_sec++) { + sec = coff_sects[idx_sec]; if (!strcmp(sym, sec->name)) { return; } @@ -399,7 +401,7 @@ static void register_reloc(struct coff_Section *const sect, } saa_rewind(coff_syms); - for (uint32_t i = 0; i < coff_nsyms; i++) { + for (idx_sym = 0; idx_sym < coff_nsyms; idx_sym++) { struct coff_Symbol *s = saa_rstruct(coff_syms); r->symbol++; if (s->strpos == -1 && !strcmp(sym, s->name)) { -- 2.6.2.windows.1 |