Skip to content

Commit

Permalink
fixes for mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
lefessan committed Oct 25, 2024
1 parent ac222bd commit 8362f2f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cobc/cobc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ cobc_main_strdup (const char *dupstr)
}

/* returns a fresh allocated copy of the concatenation from str1 + str2 */
char *
static char *
cobc_main_stradd_dup (const char *str1, const char *str2)
{
char *p;
Expand Down
1 change: 0 additions & 1 deletion cobc/dump_ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ void cb_dump_ast_to_file (struct cb_program *prog, const char *filename, const c
close_fd = 0;
fd = stdout;
} else {
int len = strlen (filename);
struct stat st;
if (!stat (filename, &st)) unlink(filename);
fd = fopen (filename, "w");
Expand Down
4 changes: 2 additions & 2 deletions cobc/dump_ast_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ static void init_ptr_table ()
ptr_table = (void**) calloc (ptr_table_size, sizeof (void*) );
num_table = (int*) calloc (ptr_table_size, sizeof (int) );
} else {
bzero (ptr_table, ptr_table_size * sizeof(void*) );
bzero (num_table, ptr_table_size * sizeof(int) );
memset (ptr_table, 0, ptr_table_size * sizeof(void*) );
memset (num_table, 0, ptr_table_size * sizeof(int) );
ptr_table_used = 0;
}
}
Expand Down

0 comments on commit 8362f2f

Please sign in to comment.