Skip to content

Commit

Permalink
buildsys: add check for asprintf to enable alt implementation
Browse files Browse the repository at this point in the history
Some platforms (like Solaris 10) lack asprintf.  The implementation made
for Windows works fine there, so use autoconf to determine whether
asprintf exists, and if not, enable compiling the replacement
implementation.
  • Loading branch information
grobian committed Sep 27, 2017
1 parent e1bc2a3 commit 7539ba2
Show file tree
Hide file tree
Showing 2 changed files with 2 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
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))
#if defined(_WIN32) && !(defined(__USE_MINGW_ANSI_STDIO) && defined(__MINGW64_VERSION_MAJOR)) || !defined(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 7539ba2

Please sign in to comment.