dhoerl / DHlibxls

Framework to read Excel xls spreadsheets
271 stars 86 forks source link

Does not compile with Xcode 4.4 (Apple LLVM Compiler 4.0) #3

Closed dfreniche closed 12 years ago

dfreniche commented 12 years ago

File: xlstool.c

Problem: asprinft is declared as static, but previous declaration (in stdio.h) is not static. In stdio.h is declared as: int asprintf(char *, const char , ...) DARWIN_LDBL_COMPAT(asprintf) printflike(2, 3);

But in xlstool.c is declared as:

 #if HAVE_ASPRINTF != 1

 #include <stdarg.h>

 static int asprintf(char **ret, const char *format, ...)
 {
 ...

Proposed fix: make it non static

dhoerl commented 12 years ago

Hmmm - something is wrong - iOS and Mac have asprintf - that define is for other systems. Any idea why HAVE_ASPRINTF is NOT 1? Otherwise I don't mind changing it...I'm just curious why this is even a problem.

dhoerl commented 12 years ago

OK - fixed - that define was recently added to libxls and was not in the pre-canned config.h I was using for this project. All fixed in github now.