From 7463f87cf1c3b8494a604976a8f818b07747b55e Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Fri, 7 Jul 2023 11:46:21 +0300 Subject: add compat getopt implementation, remove patches This adds a getopt implementation for compatibility where it is not available, removing a couple of regress patches. Note, this is a slightly modified copy from OpenBSD libc that doesn't expose getopt_long, which has dependency conflicts with Windows system headers and isn't needed anyway. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b8863c4..6f0d5cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,11 @@ if(HAVE_ASPRINTF) add_definitions(-DHAVE_ASPRINTF) endif() +check_function_exists(getopt HAVE_GETOPT) +if(HAVE_GETOPT) + add_definitions(-DHAVE_GETOPT) +endif() + check_function_exists(reallocarray HAVE_REALLOCARRAY) if(HAVE_REALLOCARRAY) add_definitions(-DHAVE_REALLOCARRAY) -- cgit v1.2.3-55-g6feb