A fix is now on trunk.  https://www.sqlite.org/src/info/795eede331b832a5

On 8/8/17, Richard Hipp <d...@sqlite.org> wrote:
> On 8/8/17, Gavin Rayner <rayner.ga...@gmail.com> wrote:
>> Hi,
>>
>> I’m new to sqlite and C. I get this error whilst trying to compile csv.c
>> on
>> macOS 10.12.6. See http://sqlite.org/csv.html
>> <http://sqlite.org/csv.html>
>
> It appears that recent versions of XCode have created a macro
> "vsnprintf" in the <stdio.h>.  I'm not sure that is allowed.  But
> allowed or not, it does cause a symbol conflict within SQLite, which
> also uses that label.
>
> I do not have a solution just yet.
>
>>
>> gavmacbook:code Gavin$ gcc -g -fPIC -dynamiclib csv.c -o csv.dylib
>> csv.c:115:3: error: no member named '__builtin___vsnprintf_chk' in
>> 'struct
>> sqlite3_api_routines'
>>   sqlite3_vsnprintf(CSV_MXERR, p->zErr, zFormat, ap);
>>   ^~~~~~~~~~~~~~~~~
>> /usr/include/sqlite3ext.h:435:53: note: expanded from macro
>> 'sqlite3_vsnprintf'
>> #define sqlite3_vsnprintf              sqlite3_api->vsnprintf
>>                                        ~~~~~~~~~~~  ^
>> /usr/include/secure/_stdio.h:75:3: note: expanded from macro 'vsnprintf'
>>   __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
>>   ^
>> csv.c:115:21: warning: incompatible integer to pointer conversion passing
>> 'int' to parameter of type 'const void *' [-Wint-conversion]
>>   sqlite3_vsnprintf(CSV_MXERR, p->zErr, zFormat, ap);
>>                     ^~~~~~~~~
>> csv.c:67:19: note: expanded from macro 'CSV_MXERR'
>> #define CSV_MXERR 200
>>                   ^~~
>> /usr/include/secure/_stdio.h:75:57: note: expanded from macro 'vsnprintf'
>>   __builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
>>                                                         ^~~
>> /usr/include/secure/_common.h:39:54: note: expanded from macro
>> '__darwin_obsz'
>> #define __darwin_obsz(object) __builtin_object_size (object,
>> _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
>>                                                      ^~~~~~
>> 1 warning and 1 error generated.
>>
>>
>> Any assistance would be greatly appreciated.
>>
>> Regards,
>>
>>
>> Gavin Rayner
>>
>>
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
>


-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to