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.
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
--- tests/bn_isqrt.c.orig Fri Dec 9 11:05:26 2022
|
||||
+++ tests/bn_isqrt.c Fri Dec 9 11:12:37 2022
|
||||
@@ -306,6 +306,7 @@ main(int argc, char *argv[])
|
||||
int ch;
|
||||
int failed = 0, print = 0;
|
||||
|
||||
+#ifndef _MSC_VER
|
||||
while ((ch = getopt(argc, argv, "C")) != -1) {
|
||||
switch (ch) {
|
||||
case 'C':
|
||||
@@ -316,6 +317,7 @@ main(int argc, char *argv[])
|
||||
break;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
if (print)
|
||||
return check_tables(1);
|
@@ -1,18 +0,0 @@
|
||||
--- tests/handshake_table.c.orig Tue Mar 15 11:37:03 2022
|
||||
+++ tests/handshake_table.c Mon Mar 21 05:26:15 2022
|
||||
@@ -518,6 +518,7 @@
|
||||
unsigned int depth = 0;
|
||||
int ch, graphviz = 0, print = 0;
|
||||
|
||||
+#ifndef _MSC_VER
|
||||
while ((ch = getopt(argc, argv, "Cg")) != -1) {
|
||||
switch (ch) {
|
||||
case 'C':
|
||||
@@ -535,6 +536,7 @@
|
||||
|
||||
if (argc != 0)
|
||||
usage();
|
||||
+#endif
|
||||
|
||||
if (graphviz && print)
|
||||
usage();
|
Reference in New Issue
Block a user