diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2011-04-03 22:29:51 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2011-04-03 22:29:51 +0000 |
commit | 3511836bbd8b3613ff05e6e1e0b496e0a39c222c (patch) | |
tree | 12aa4b298d48624b74ebf7c13e426b43f4235b33 /regress/libexec/ld.so/dlopen | |
parent | 6274fc7c801f92795cf001d4987c8cfd121f64ea (diff) |
Fix the really bad C++ test code that I wrote long ago.
Diffstat (limited to 'regress/libexec/ld.so/dlopen')
-rw-r--r-- | regress/libexec/ld.so/dlopen/libaa/aa.C | 6 | ||||
-rw-r--r-- | regress/libexec/ld.so/dlopen/libaa/aa.h | 4 | ||||
-rw-r--r-- | regress/libexec/ld.so/dlopen/libab/ab.C | 6 | ||||
-rw-r--r-- | regress/libexec/ld.so/dlopen/libab/ab.h | 6 | ||||
-rw-r--r-- | regress/libexec/ld.so/dlopen/libac/ac.C | 6 | ||||
-rw-r--r-- | regress/libexec/ld.so/dlopen/libac/ac.h | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/regress/libexec/ld.so/dlopen/libaa/aa.C b/regress/libexec/ld.so/dlopen/libaa/aa.C index 8655a96ed14..4956a35738a 100644 --- a/regress/libexec/ld.so/dlopen/libaa/aa.C +++ b/regress/libexec/ld.so/dlopen/libaa/aa.C @@ -1,7 +1,7 @@ /* * Public Domain 2003 Dale Rahn * - * $OpenBSD: aa.C,v 1.4 2005/09/19 18:39:37 deraadt Exp $ + * $OpenBSD: aa.C,v 1.5 2011/04/03 22:29:50 drahn Exp $ */ #include <iostream> @@ -10,7 +10,7 @@ char strbuf[512]; extern "C" { -char *libname = "libaa"; +const char *libname = "libaa"; }; extern "C" char * @@ -23,7 +23,7 @@ lib_entry() std::cout << "called into aa " << libname << " libname " << "\n"; } -AA::AA(char *arg) +AA::AA(const char *arg) { _name = arg; } diff --git a/regress/libexec/ld.so/dlopen/libaa/aa.h b/regress/libexec/ld.so/dlopen/libaa/aa.h index f4cc1f0e9a3..ba2a7fa043a 100644 --- a/regress/libexec/ld.so/dlopen/libaa/aa.h +++ b/regress/libexec/ld.so/dlopen/libaa/aa.h @@ -1,9 +1,9 @@ class AA { public: - AA(char *); + AA(const char *); ~AA(); private: - char *_name; + const char *_name; }; diff --git a/regress/libexec/ld.so/dlopen/libab/ab.C b/regress/libexec/ld.so/dlopen/libab/ab.C index f9e3ef719aa..f5391474953 100644 --- a/regress/libexec/ld.so/dlopen/libab/ab.C +++ b/regress/libexec/ld.so/dlopen/libab/ab.C @@ -1,7 +1,7 @@ /* * Public Domain 2003 Dale Rahn * - * $OpenBSD: ab.C,v 1.4 2005/09/19 18:39:37 deraadt Exp $ + * $OpenBSD: ab.C,v 1.5 2011/04/03 22:29:50 drahn Exp $ */ #include <iostream> @@ -12,7 +12,7 @@ char strbuf[512]; extern "C" { -char *libname = "libab"; +const char *libname = "libab"; }; extern "C" char * @@ -25,7 +25,7 @@ lib_entry() std::cout << "called into ab " << libname << " libname " << "\n"; } -BB::BB(char *str) +BB::BB(const char *str) { _name = str; } diff --git a/regress/libexec/ld.so/dlopen/libab/ab.h b/regress/libexec/ld.so/dlopen/libab/ab.h index cebb460fef3..da7a65c5c53 100644 --- a/regress/libexec/ld.so/dlopen/libab/ab.h +++ b/regress/libexec/ld.so/dlopen/libab/ab.h @@ -1,14 +1,14 @@ /* * Public Domain 2003 Dale Rahn * - * $OpenBSD: ab.h,v 1.1 2005/09/13 20:51:39 drahn Exp $ + * $OpenBSD: ab.h,v 1.2 2011/04/03 22:29:50 drahn Exp $ */ class BB { public: - BB(char *); + BB(const char *); ~BB(); private: - char *_name; + const char *_name; }; diff --git a/regress/libexec/ld.so/dlopen/libac/ac.C b/regress/libexec/ld.so/dlopen/libac/ac.C index 9b9f239a9cb..191d8e659f8 100644 --- a/regress/libexec/ld.so/dlopen/libac/ac.C +++ b/regress/libexec/ld.so/dlopen/libac/ac.C @@ -1,7 +1,7 @@ /* * Public Domain 2003 Dale Rahn * - * $OpenBSD: ac.C,v 1.2 2005/09/18 19:58:50 drahn Exp $ + * $OpenBSD: ac.C,v 1.3 2011/04/03 22:29:50 drahn Exp $ */ #include <iostream> @@ -11,7 +11,7 @@ extern int a; extern "C" { -char *libname = "libac"; +const char *libname = "libac"; }; extern "C" void @@ -20,7 +20,7 @@ lib_entry() std::cout << "called into ac " << libname << " libname " << "\n"; } -AC::AC(char *str) +AC::AC(const char *str) { _name = str; } diff --git a/regress/libexec/ld.so/dlopen/libac/ac.h b/regress/libexec/ld.so/dlopen/libac/ac.h index 8a33b847d8a..d7691b03e6a 100644 --- a/regress/libexec/ld.so/dlopen/libac/ac.h +++ b/regress/libexec/ld.so/dlopen/libac/ac.h @@ -1,14 +1,14 @@ /* * Public Domain 2003 Dale Rahn * - * $OpenBSD: ac.h,v 1.1 2005/09/17 02:58:54 drahn Exp $ + * $OpenBSD: ac.h,v 1.2 2011/04/03 22:29:50 drahn Exp $ */ class AC { public: - AC(char *); + AC(const char *); ~AC(); private: - char *_name; + const char *_name; }; |