now M2-Mesoplanet compiles hello world for x86 correctly
This commit is contained in:
parent
48857058eb
commit
2043782a45
2
M2libc
2
M2libc
|
@ -1 +1 @@
|
|||
Subproject commit c684e9275ff4b8ef45a970990e0a2959cef9a8c5
|
||||
Subproject commit 08a66159da8076c72f1bbf8115f8af6ec64d3af3
|
27
cc_macro.c
27
cc_macro.c
|
@ -739,33 +739,6 @@ void macro_directive()
|
|||
{
|
||||
handle_error();
|
||||
}
|
||||
else if(match("#include", macro_token->s))
|
||||
{
|
||||
eat_current_token();
|
||||
if(match("<", macro_token->s))
|
||||
{
|
||||
eat_current_token();
|
||||
if(match("stdio", macro_token->s))
|
||||
{
|
||||
eat_current_token();
|
||||
STDIO_USED = TRUE;
|
||||
}
|
||||
}
|
||||
while(TRUE)
|
||||
{
|
||||
if(NULL == macro_token)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if('\n' == macro_token->s[0])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
eat_current_token();
|
||||
}
|
||||
}
|
||||
else if(match("#FILENAME", macro_token->s))
|
||||
{
|
||||
while(TRUE)
|
||||
|
|
|
@ -314,8 +314,8 @@ void insert_file_header(char* name, int line)
|
|||
strcat(hold_string, name);
|
||||
strcat(hold_string, " ");
|
||||
strcat(hold_string, hold_line);
|
||||
strcat(hold_string, "\n");
|
||||
new_token(hold_string, strlen(hold_string)+2);
|
||||
new_token("\n", 3);
|
||||
}
|
||||
|
||||
struct token_list* read_all_tokens(FILE* a, struct token_list* current, char* filename);
|
||||
|
@ -346,6 +346,7 @@ int include_file(int ch)
|
|||
{
|
||||
char* path = env_lookup("M2LIBC_PATH");
|
||||
if(NULL == path) path = "./M2libc";
|
||||
if(match("stdio.h", new_filename + 1)) STDIO_USED = TRUE;
|
||||
reset_hold_string();
|
||||
strcat(hold_string, path);
|
||||
strcat(hold_string, "/");
|
||||
|
|
Loading…
Reference in New Issue