Skip to content
Snippets Groups Projects
Commit dddae218 authored by Steve Lhomme's avatar Steve Lhomme
Browse files

configure: detect asprintf/vasprintf the standard way

The mingw-w64 variant is equivalent to ours. No need to do a special case.
These are GNU functions, not C11 or POSIX functions.
parent 6b1f7dc2
No related branches found
No related tags found
1 merge request!3101remove mingw-w64 specific defines
......@@ -753,7 +753,7 @@ need_libc=false
dnl Check for usual libc functions
AC_CHECK_FUNCS([accept4 dup3 fcntl flock fstatat fstatvfs fork getmntent_r getenv getpwuid_r isatty memalign mkostemp mmap open_memstream newlocale pipe2 posix_fadvise setlocale stricmp uselocale wordexp])
AC_REPLACE_FUNCS([aligned_alloc atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lfind lldiv localtime_r memrchr nrand48 poll posix_memalign readv recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp writev])
AC_REPLACE_FUNCS([aligned_alloc asprintf atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lfind lldiv localtime_r memrchr nrand48 poll posix_memalign readv recvmsg rewind sendmsg setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strnstr strsep strtof strtok_r strtoll swab tdestroy tfind timegm timespec_get strverscmp vasprintf writev])
AC_REPLACE_FUNCS([gettimeofday])
AC_CHECK_FUNC(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
......@@ -761,10 +761,6 @@ AC_CHECK_FUNC(fdatasync,,
VLC_REPLACE_DECL([realpath], [#include <stdlib.h>])
dnl mingw64 implements those as static inline, not functions with C linkage
VLC_REPLACE_DECL([asprintf], [#include <stdio.h>])
VLC_REPLACE_DECL([vasprintf], [#include <stdio.h>])
# Windows CE does not have strcoll()
AC_FUNC_STRCOLL
......
......@@ -635,6 +635,8 @@ libcompat_functions = [
['localtime_r', '#include <time.h>'],
['strverscmp', '#include <string.h>'],
['writev', '#include <sys/uio.h>'],
['asprintf', '#include <stdio.h>'],
['vasprintf', '#include <stdio.h>'],
['gettimeofday', '#include <sys/time.h>'],
......@@ -669,11 +671,8 @@ foreach f : libcompat_functions
endforeach
# These functions need to be checked with has_header_symbol as
# MinGW-w64 implements those as static inline, not functions with C linkage
libcompat_functions = [
['realpath', 'stdlib.h'],
['asprintf', 'stdio.h'],
['vasprintf', 'stdio.h'],
]
foreach f : libcompat_functions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment