Add automatic strndup detection instead of the previous hack
This commit is contained in:
parent
aeb006beb6
commit
4c5038c26d
@ -63,6 +63,7 @@ if (MSVC)
|
||||
endif()
|
||||
|
||||
check_symbol_exists(memmem string.h HAVE_MEMMEM)
|
||||
check_symbol_exists(strndup string.h HAVE_STRNDUP)
|
||||
|
||||
include_directories("${PROJECT_SOURCE_DIR}")
|
||||
include_directories(${SQLITE3_INCLUDE_DIRS})
|
||||
|
@ -79,13 +79,13 @@
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/resource.h>
|
||||
#define HAVE_STRNDUP
|
||||
#define HAVE_DLOPEN
|
||||
#define HAVE_GETOPT
|
||||
#define HAVE_SSIZE_T
|
||||
#include <dlfcn.h>
|
||||
#define HAVE_GETRLIMIT
|
||||
#endif
|
||||
#cmakedefine HAVE_STRNDUP
|
||||
#cmakedefine HAVE_MEMMEM
|
||||
|
||||
/* printf support for size_t and uint64_t */
|
||||
@ -136,10 +136,6 @@
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#if ( defined(BSD_LIKE) && !defined(__FreeBSD_kernel__) ) || defined(__sun__)
|
||||
#undef HAVE_STRNDUP
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GETOPT
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user