mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-04-05 20:31:00 +08:00
Another attempted Cygwin fix
This commit is contained in:
parent
7dcb42eae3
commit
f1af742ecf
@ -96,7 +96,7 @@ typedef struct GOptionContext {
|
||||
#define g_free free
|
||||
#define g_realloc realloc
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#if defined _WIN32
|
||||
#define g_strdup _strdup
|
||||
#else
|
||||
#define g_strdup strdup
|
||||
|
@ -83,7 +83,7 @@ char *g_strconcat(const char *first, ...) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#if defined _WIN32
|
||||
int vasprintf(char **ret, const char *format, va_list ap) {
|
||||
int len;
|
||||
int retval;
|
||||
@ -106,7 +106,12 @@ char *g_strdup_printf(const char *format, ...) {
|
||||
va_list argp;
|
||||
|
||||
va_start(argp, format);
|
||||
#ifdef ___CYGWIN__
|
||||
size_t len = 0;
|
||||
vasnprintf(&ret, &len, format, argp);
|
||||
#else
|
||||
vasprintf(&ret, format, argp);
|
||||
#endif
|
||||
va_end(argp);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user