X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=1c63e0bef36b61e641e171ccc211b80cbc723e6d;hb=2318f89b43538d07bf531d950e97de33962b574d;hp=9e6e551377dc14a7e11594dba29d075d57f339ef;hpb=933d8f9cae81483d28815576997bf10d94a54311;p=cparser diff --git a/main.c b/main.c index 9e6e551..1c63e0b 100644 --- a/main.c +++ b/main.c @@ -934,6 +934,13 @@ int main(int argc, char **argv) GET_ARG_AFTER(opt, "-isystem"); add_flag(&cppflags_obst, "-isystem"); add_flag(&cppflags_obst, "%s", opt); +#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__CYGWIN__) + } else if (streq(option, "pthread")) { + /* set flags for the preprocessor */ + add_flag(&cppflags_obst, "-D_REENTRANT"); + /* set flags for the linker */ + add_flag(&ldflags_obst, "-lpthread"); +#endif } else if (streq(option, "nostdinc") || streq(option, "trigraphs")) { /* pass these through to the preprocessor */