diff options
Diffstat (limited to '')
-rw-r--r-- | src/regress/lib/libssl/symbols/Makefile | 22 | ||||
-rw-r--r-- | src/regress/lib/libssl/symbols/symbols.awk | 58 |
2 files changed, 0 insertions, 80 deletions
diff --git a/src/regress/lib/libssl/symbols/Makefile b/src/regress/lib/libssl/symbols/Makefile deleted file mode 100644 index d500dfcd0a..0000000000 --- a/src/regress/lib/libssl/symbols/Makefile +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.2 2023/07/15 23:40:46 tb Exp $ | ||
2 | |||
3 | PROG = symbols | ||
4 | |||
5 | .include <bsd.own.mk> | ||
6 | |||
7 | DPADD= ${LIBCRYPTO} ${LIBSSL} | ||
8 | LDFLAGS+= -lcrypto -lssl | ||
9 | LDFLAGS+= -Wl,--no-allow-shlib-undefined | ||
10 | CFLAGS+= -Wno-deprecated-declarations | ||
11 | |||
12 | CLEANFILES+= symbols.c symbols.c.tmp | ||
13 | |||
14 | symbols.c: symbols.awk ../../../../lib/libssl/Symbols.list | ||
15 | awk -f ${.CURDIR}/symbols.awk \ | ||
16 | < ${BSDSRCDIR}/lib/libssl/Symbols.list > $@.tmp && \ | ||
17 | mv -f $@.tmp $@ | ||
18 | |||
19 | run-regress-symbols: symbols | ||
20 | ./symbols 2>/dev/null | ||
21 | |||
22 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libssl/symbols/symbols.awk b/src/regress/lib/libssl/symbols/symbols.awk deleted file mode 100644 index ecbe25e393..0000000000 --- a/src/regress/lib/libssl/symbols/symbols.awk +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | # $OpenBSD: symbols.awk,v 1.4 2024/05/08 06:54:43 tb Exp $ | ||
2 | |||
3 | # Copyright (c) 2018,2020,2023 Theo Buehler <tb@openbsd.org> | ||
4 | # | ||
5 | # Permission to use, copy, modify, and distribute this software for any | ||
6 | # purpose with or without fee is hereby granted, provided that the above | ||
7 | # copyright notice and this permission notice appear in all copies. | ||
8 | # | ||
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | |||
17 | # usage: awk -f symbols.awk < Symbols.list > symbols.c | ||
18 | |||
19 | BEGIN { | ||
20 | printf("#include <stdio.h>\n\n") | ||
21 | |||
22 | printf("#include <openssl/dtls1.h>\n") | ||
23 | printf("#include <openssl/ssl.h>\n") | ||
24 | printf("#include <openssl/tls1.h>\n\n") | ||
25 | |||
26 | printf("#include <openssl/srtp.h>\n\n") # depends on ssl.h | ||
27 | } | ||
28 | |||
29 | { | ||
30 | symbols[$0] = $0 | ||
31 | |||
32 | # Undefine aliases, so we don't accidentally leave them in Symbols.list. | ||
33 | printf("#ifdef %s\n#undef %s\n#endif\n", $0, $0) | ||
34 | } | ||
35 | |||
36 | END { | ||
37 | printf("\nint\nmain(void)\n{\n") | ||
38 | printf("\tsize_t i;\n"); | ||
39 | |||
40 | printf("\tstruct {\n") | ||
41 | printf("\t\tconst char *const name;\n") | ||
42 | printf("\t\tconst void *addr;\n") | ||
43 | printf("\t} symbols[] = {\n") | ||
44 | |||
45 | for (symbol in symbols) { | ||
46 | printf("\t\t{\n") | ||
47 | printf("\t\t\t.name = \"%s\",\n", symbol) | ||
48 | printf("\t\t\t.addr = &%s,\n", symbol) | ||
49 | printf("\t\t},\n") | ||
50 | } | ||
51 | |||
52 | printf("\t\};\n\n") | ||
53 | |||
54 | printf("\tfor (i = 0; i < sizeof(symbols) / sizeof(symbols[0]); i++)\n") | ||
55 | printf("\t\tfprintf(stderr, \"%%s: %%p\\n\", symbols[i].name, symbols[i].addr);\n") | ||
56 | printf("\n\tprintf(\"OK\\n\");\n") | ||
57 | printf("\n\treturn 0;\n}\n") | ||
58 | } | ||