build: fix compilation by including <wchar.h> and checking for regwexec.
This commit is contained in:
parent
1684e8936e
commit
60a9b3a67a
@ -65,6 +65,7 @@ AC_SUBST(DLL_LDFLAGS)
|
||||
AC_CHECK_HEADERS(windows.h winsock2.h io.h process.h unistd.h inttypes.h stdint.h libc.h malloc.h dlfcn.h regex.h sys/cdefs.h sys/socket.h netinet/in.h arpa/inet.h sys/uio.h aio.h sys/mman.h sys/wait.h sys/resource.h sys/time.h endian.h mach/task.h)
|
||||
|
||||
AC_CHECK_FUNCS(setenv waitpid setrlimit gettimeofday fork kill pipe _pipe)
|
||||
AC_CHECK_FUNCS(regexec regwexec)
|
||||
AC_CHECK_FUNCS(dup dup2 ftello fseeko _IO_getc getline getdelim fgetln map_fd memalign posix_memalign aio_read accept bind connect socket readv pread recv recvfrom recvmsg mmap valloc sigaction getpagesize)
|
||||
AC_CHECK_FUNCS(getc_unlocked getchar_unlocked fgetc_unlocked fread_unlocked fgets_unlocked)
|
||||
AC_CHECK_FUNCS(__getdelim __srefill __filbuf __srget __uflow)
|
||||
|
||||
@ -81,8 +81,9 @@
|
||||
#define HAVE_RECV 1
|
||||
#define HAVE_RECVFROM 1
|
||||
/* #undef HAVE_RECVMSG */
|
||||
/* #undef HAVE_REGEX_H */
|
||||
/* #undef HAVE_REGEXEC */
|
||||
#define HAVE_REGEX_H 1
|
||||
#define HAVE_REGWEXEC 1
|
||||
#define HAVE_REOPENFILE 1
|
||||
/* #undef HAVE_SETENV */
|
||||
/* #undef HAVE_SETRLIMIT */
|
||||
|
||||
@ -199,7 +199,7 @@ void _zz_fd_fini(void)
|
||||
|
||||
int _zz_mustwatch(char const *file)
|
||||
{
|
||||
#if defined HAVE_REGEX_H
|
||||
#if defined HAVE_REGEXEC
|
||||
if(has_include && regexec(&re_include, file, 0, NULL, 0) == REG_NOMATCH)
|
||||
return 0; /* not included: ignore */
|
||||
|
||||
@ -214,7 +214,7 @@ int _zz_mustwatch(char const *file)
|
||||
|
||||
int _zz_mustwatchw(wchar_t const *file)
|
||||
{
|
||||
#if defined HAVE_REGEX_H
|
||||
#if defined HAVE_REGWEXEC
|
||||
if(has_include && regwexec(&re_include, file, 0, NULL, 0) == REG_NOMATCH)
|
||||
return 0; /* not included: ignore */
|
||||
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
* fd.h: file descriptor functions
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <wchar.h>
|
||||
|
||||
extern void _zz_include(char const *);
|
||||
extern void _zz_exclude(char const *);
|
||||
extern void _zz_setseed(int32_t);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user