Skip to content

Commit

Permalink
Merge pull request #1561 from grobian/missing-asprintf
Browse files Browse the repository at this point in the history
buildsys: add check for asprintf to enable alt implementation
  • Loading branch information
k-takata authored Sep 29, 2017
2 parents 3edfba8 + 2a0a0d8 commit d9d7aa7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@ AC_SUBST([FNMATCH_CPPFLAGS])
AC_CHECK_HEADERS(fnmatch.h)
AM_CONDITIONAL([HAVE_FNMATCH], [test "x$have_fnmatch" = "xyes"])

AC_CHECK_FUNCS(asprintf)
AC_CHECK_FUNCS(strstr)
AC_CHECK_FUNCS(strcasecmp stricmp, break)
AC_CHECK_FUNCS(strncasecmp strnicmp, break)
Expand Down
4 changes: 4 additions & 0 deletions main/e_msoft.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ typedef enum { false, true } bool;
# define FA_DIREC _A_SUBDIR
# define ff_name name

# if defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR)
# define HAVE_ASPRINTF 1
# endif

#endif

#endif
2 changes: 1 addition & 1 deletion main/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ static vString* getHome (void)
}
}

#if defined(_WIN32) && !(defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR))
#ifndef HAVE_ASPRINTF

/* Some versions of MinGW are missing _vscprintf's declaration, although they
* still provide the symbol in the import library.
Expand Down

0 comments on commit d9d7aa7

Please sign in to comment.