aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2024-12-19 20:24:33 +0100
committerTheo Buehler <tb@openbsd.org>2024-12-20 01:14:04 +0100
commitbf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a (patch)
treeab5a678d5652e2b261a7084706a36132b6aa4f80 /CMakeLists.txt
parentc8bb0114707a17ddb2d4a7a62deef2622252a05e (diff)
downloadportable-bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a.tar.gz
portable-bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a.tar.bz2
portable-bf808ea0fc581f58ec4aabd9d7f24d3a5275bc7a.zip
Provide getdelim and getline compat shims
These are portable implementations from NetBSD that are needed on Windows and perhaps some other platforms with the new versions of the mlkem tests.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebd8260..437570b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -214,6 +214,16 @@ if(HAVE_ASPRINTF)
214 add_definitions(-DHAVE_ASPRINTF) 214 add_definitions(-DHAVE_ASPRINTF)
215endif() 215endif()
216 216
217check_symbol_exists(getdelim "stdio.h" HAVE_GETDELIM)
218if(HAVE_GETDELIM)
219 add_definitions(-DHAVE_GETDELIM)
220endif()
221
222check_symbol_exists(getline "stdio.h" HAVE_GETLINE)
223if(HAVE_GETLINE)
224 add_definitions(-DHAVE_GETLINE)
225endif()
226
217check_symbol_exists(getopt "unistd.h" HAVE_GETOPT) 227check_symbol_exists(getopt "unistd.h" HAVE_GETOPT)
218if(HAVE_GETOPT) 228if(HAVE_GETOPT)
219 add_definitions(-DHAVE_GETOPT) 229 add_definitions(-DHAVE_GETOPT)