diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/regress/lib/libc/cxa-atexit | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/regress/lib/libc/cxa-atexit')
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/Makefile | 7 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/libgd1/Makefile | 9 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/libgd1/gd1.C | 32 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/libgd1/shlib_version | 2 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/libgd2/Makefile | 9 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/libgd2/gd2.C | 32 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/libgd2/shlib_version | 2 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/test1/Makefile | 29 | ||||
-rw-r--r-- | src/regress/lib/libc/cxa-atexit/test1/test1.C | 63 |
9 files changed, 0 insertions, 185 deletions
diff --git a/src/regress/lib/libc/cxa-atexit/Makefile b/src/regress/lib/libc/cxa-atexit/Makefile deleted file mode 100644 index a2821e01d3..0000000000 --- a/src/regress/lib/libc/cxa-atexit/Makefile +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.3 2013/08/06 19:11:53 miod Exp $ | ||
2 | |||
3 | SUBDIR+= libgd1 libgd2 test1 | ||
4 | |||
5 | install: | ||
6 | |||
7 | .include <bsd.subdir.mk> | ||
diff --git a/src/regress/lib/libc/cxa-atexit/libgd1/Makefile b/src/regress/lib/libc/cxa-atexit/libgd1/Makefile deleted file mode 100644 index 958b726d28..0000000000 --- a/src/regress/lib/libc/cxa-atexit/libgd1/Makefile +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2007/09/03 14:42:44 millert Exp $ | ||
2 | |||
3 | LIB=gd1 | ||
4 | SRCS= gd1.C | ||
5 | NOPROFILE=yes | ||
6 | |||
7 | regress: all | ||
8 | |||
9 | .include <bsd.lib.mk> | ||
diff --git a/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C b/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C deleted file mode 100644 index b3ecd56d91..0000000000 --- a/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* $OpenBSD: gd1.C,v 1.1 2007/09/03 14:42:44 millert Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Copyright (c) 2007 Kurt Miller <kurt@openbsd.org> | ||
5 | * | ||
6 | * Permission to use, copy, modify, and distribute this software for any | ||
7 | * purpose with or without fee is hereby granted, provided that the above | ||
8 | * copyright notice and this permission notice appear in all copies. | ||
9 | * | ||
10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | */ | ||
18 | |||
19 | #include <stdio.h> | ||
20 | |||
21 | extern int check1; | ||
22 | |||
23 | struct global_destructor_test_obj1 { | ||
24 | inline ~global_destructor_test_obj1() { | ||
25 | check1 = 0; | ||
26 | } | ||
27 | }; | ||
28 | |||
29 | extern "C" void gd_test1() | ||
30 | { | ||
31 | static global_destructor_test_obj1 gdt; | ||
32 | } | ||
diff --git a/src/regress/lib/libc/cxa-atexit/libgd1/shlib_version b/src/regress/lib/libc/cxa-atexit/libgd1/shlib_version deleted file mode 100644 index 97c9f92d6b..0000000000 --- a/src/regress/lib/libc/cxa-atexit/libgd1/shlib_version +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | major=0 | ||
2 | minor=0 | ||
diff --git a/src/regress/lib/libc/cxa-atexit/libgd2/Makefile b/src/regress/lib/libc/cxa-atexit/libgd2/Makefile deleted file mode 100644 index 7ca21d8bd2..0000000000 --- a/src/regress/lib/libc/cxa-atexit/libgd2/Makefile +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2007/09/03 14:42:44 millert Exp $ | ||
2 | |||
3 | LIB=gd2 | ||
4 | SRCS= gd2.C | ||
5 | NOPROFILE=yes | ||
6 | |||
7 | regress: all | ||
8 | |||
9 | .include <bsd.lib.mk> | ||
diff --git a/src/regress/lib/libc/cxa-atexit/libgd2/gd2.C b/src/regress/lib/libc/cxa-atexit/libgd2/gd2.C deleted file mode 100644 index 69e7ffb220..0000000000 --- a/src/regress/lib/libc/cxa-atexit/libgd2/gd2.C +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | /* $OpenBSD: gd2.C,v 1.1 2007/09/03 14:42:44 millert Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Copyright (c) 2007 Kurt Miller <kurt@openbsd.org> | ||
5 | * | ||
6 | * Permission to use, copy, modify, and distribute this software for any | ||
7 | * purpose with or without fee is hereby granted, provided that the above | ||
8 | * copyright notice and this permission notice appear in all copies. | ||
9 | * | ||
10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | */ | ||
18 | |||
19 | #include <stdio.h> | ||
20 | |||
21 | extern int check2; | ||
22 | |||
23 | struct global_destructor_test_obj2 { | ||
24 | inline ~global_destructor_test_obj2() { | ||
25 | check2 = 0; | ||
26 | } | ||
27 | }; | ||
28 | |||
29 | extern "C" void gd_test2() | ||
30 | { | ||
31 | static global_destructor_test_obj2 gdt; | ||
32 | } | ||
diff --git a/src/regress/lib/libc/cxa-atexit/libgd2/shlib_version b/src/regress/lib/libc/cxa-atexit/libgd2/shlib_version deleted file mode 100644 index 97c9f92d6b..0000000000 --- a/src/regress/lib/libc/cxa-atexit/libgd2/shlib_version +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | major=0 | ||
2 | minor=0 | ||
diff --git a/src/regress/lib/libc/cxa-atexit/test1/Makefile b/src/regress/lib/libc/cxa-atexit/test1/Makefile deleted file mode 100644 index 162922b35a..0000000000 --- a/src/regress/lib/libc/cxa-atexit/test1/Makefile +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.2 2015/05/29 04:17:11 miod Exp $ | ||
2 | |||
3 | .include <bsd.obj.mk> | ||
4 | |||
5 | GD1_DIR=${.CURDIR}/../libgd1 | ||
6 | GD1_OBJDIR!= if [ -d $(GD1_DIR)/${__objdir} ]; then \ | ||
7 | echo "$(GD1_DIR)/${__objdir}"; \ | ||
8 | else \ | ||
9 | echo "$(GD1_DIR)"; \ | ||
10 | fi | ||
11 | |||
12 | GD2_DIR=${.CURDIR}/../libgd2 | ||
13 | GD2_OBJDIR!= if [ -d $(GD2_DIR)/${__objdir} ]; then \ | ||
14 | echo "$(GD2_DIR)/${__objdir}"; \ | ||
15 | else \ | ||
16 | echo "$(GD2_DIR)"; \ | ||
17 | fi | ||
18 | |||
19 | PROG= test1 | ||
20 | |||
21 | SRCS= test1.C | ||
22 | |||
23 | CXXFLAGS+= -DLIBGD1="\"$(GD1_OBJDIR)/libgd1.so\"" | ||
24 | CXXFLAGS+= -DLIBGD2="\"$(GD2_OBJDIR)/libgd2.so\"" | ||
25 | LDFLAGS+= -Wl,-E | ||
26 | |||
27 | NOMAN= | ||
28 | |||
29 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libc/cxa-atexit/test1/test1.C b/src/regress/lib/libc/cxa-atexit/test1/test1.C deleted file mode 100644 index 75fb967a90..0000000000 --- a/src/regress/lib/libc/cxa-atexit/test1/test1.C +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | /* $OpenBSD: test1.C,v 1.1 2007/09/03 14:42:44 millert Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Copyright (c) 2007 Kurt Miller <kurt@openbsd.org> | ||
5 | * | ||
6 | * Permission to use, copy, modify, and distribute this software for any | ||
7 | * purpose with or without fee is hereby granted, provided that the above | ||
8 | * copyright notice and this permission notice appear in all copies. | ||
9 | * | ||
10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | */ | ||
18 | |||
19 | #include <dlfcn.h> | ||
20 | #include <err.h> | ||
21 | #include <stdio.h> | ||
22 | |||
23 | int check1, check2; | ||
24 | |||
25 | int | ||
26 | main() | ||
27 | { | ||
28 | void *libgd1, *libgd2; | ||
29 | void (*gd_test)(); | ||
30 | int i; | ||
31 | |||
32 | for (i=0; i < 50; i++) { | ||
33 | check1 = check2 = 1; | ||
34 | |||
35 | libgd1 = dlopen(LIBGD1, RTLD_LAZY); | ||
36 | if (libgd1 == NULL) | ||
37 | errx(1, "dlopen(%s, RTLD_LAZY) FAILED\n", LIBGD1); | ||
38 | |||
39 | gd_test = (void (*)())dlsym(libgd1, "gd_test1"); | ||
40 | if (gd_test == NULL) | ||
41 | errx(1, "dlsym(libgd1, \"gd_test1\") FAILED\n"); | ||
42 | |||
43 | (*gd_test)(); | ||
44 | |||
45 | libgd2 = dlopen(LIBGD2, RTLD_LAZY); | ||
46 | if (libgd2 == NULL) | ||
47 | errx(1, "dlopen(%s, RTLD_LAZY) FAILED\n", LIBGD2); | ||
48 | |||
49 | gd_test = (void (*)())dlsym(libgd2, "gd_test2"); | ||
50 | if (gd_test == NULL) | ||
51 | errx(1, "dlsym(libgd2, \"gd_test2\") FAILED\n"); | ||
52 | |||
53 | (*gd_test)(); | ||
54 | |||
55 | dlclose(libgd1); | ||
56 | dlclose(libgd2); | ||
57 | |||
58 | if (check1 || check2) | ||
59 | errx(1, "global destructors not called\n"); | ||
60 | } | ||
61 | |||
62 | return (0); | ||
63 | } | ||