chr-1x / twc

A C99-compatible library for using the Twitter API from cURL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alloca.h is not standard

aameen951 opened this issue · comments

../code/twitter.c(5): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory

I'm aware it's nonstandard, but what compiler + version is this?

Im using MSVC 2015

Ah, this must be due to the change I just pushed. Seems MSVC and GCC/Clang provide it in different headers. I'll add a guard to check compiler version there. At the moment alloca is used several places where I don't have good alternatives that fit within my API constraints, so it's necessary to keep around.

in MSVC it is already included in malloc.h _alloca

you can wrap the include with ifndef _MSC_VER

This is done and committed. Thanks for the feedback!