X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=lexer.c;h=4efc5bbd96530a8cefa7435f17a12e1096362859;hb=f5a32d212adb7b0e23b0bc6bbb3043b230dbc24d;hp=fbed5846570892dae4bf382d1d1da81dbda10a70;hpb=3e1308e753326c6282a6c8f2d429534309832986;p=cparser diff --git a/lexer.c b/lexer.c index fbed584..4efc5bb 100644 --- a/lexer.c +++ b/lexer.c @@ -40,13 +40,18 @@ #include #include +#ifndef _WIN32 +#include +#endif + //#define DEBUG_CHARS #define MAX_PUTBACK 3 #define BUF_SIZE 1024 #if defined(_WIN32) || defined(__CYGWIN__) /* No strtold on windows and no replacement yet */ -#define strtold(s, e) strtod(s, e) +#define strtold(s, e) strtod(s, e) +#define strcasecmp(a, b) stricmp(a, b) #endif typedef unsigned int utf32; @@ -633,7 +638,8 @@ static void parse_floating_suffix(void) * A replacement for strtoull. Only those parts needed for * our parser are implemented. */ -static unsigned long long parse_int_string(const char *s, const char **endptr, int base) { +static unsigned long long parse_int_string(const char *s, const char **endptr, int base) +{ unsigned long long v = 0; switch (base) { @@ -1578,7 +1584,8 @@ typedef enum stdc_pragma_value_kind_t { /** * Parse a pragma directive. */ -static void parse_pragma(void) { +static void parse_pragma(void) +{ bool unknown_pragma = true; next_pp_token();