diff --git a/lib/xlsxio_read.c b/lib/xlsxio_read.c index 0c8b0dd..b1ccd26 100644 --- a/lib/xlsxio_read.c +++ b/lib/xlsxio_read.c @@ -1625,7 +1625,7 @@ DLL_EXPORT_XLSXIO int xlsxioread_sheet_next_cell_datetime (xlsxioreadersheet she if (value != 0) { value = (value - 25569) * 86400; //conversion from Excel to Unix timestamp } - *pvalue = value; + *pvalue = (time_t)value; } free(result); return 1; diff --git a/lib/xlsxio_write.c b/lib/xlsxio_write.c index 73bf0fb..178873f 100644 --- a/lib/xlsxio_write.c +++ b/lib/xlsxio_write.c @@ -47,7 +47,9 @@ typedef struct zip_source zip_source_t; #if defined(_MSC_VER) # undef DLL_EXPORT_XLSXIO # define DLL_EXPORT_XLSXIO -# define va_copy(dst,src) ((dst) = (src)) +# ifndef va_copy +# define va_copy(dst,src) ((dst) = (src)) +# endif #endif #ifdef _WIN32 diff --git a/src/xlsxio_write_main.c b/src/xlsxio_write_main.c index ec97039..5aaa6c6 100644 --- a/src/xlsxio_write_main.c +++ b/src/xlsxio_write_main.c @@ -8,7 +8,7 @@ int main (int argc, char* argv[]) if (argc <= 1) return 0; unlink(argv[1]); - if ((handle = xlsxiowrite_open(argv[1])) == NULL) { + if ((handle = xlsxiowrite_open(argv[1], NULL)) == NULL) { fprintf(stderr, "Error creating zip file\n"); return 1; }