Diff below modernizes the C++ code a bit such that the test case
compiles again without warnings. It also uses CPPFLAGS instead of
CFLAGS such that the c++ compiler actually stands a chance finding the
header files.
Since the tests succeed on amd64, and should succeed on other
architectures, the diff re-enables this test.
ok?
Index: regress/libexec/ld.so/Makefile
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/Makefile,v
retrieving revision 1.16
diff -u -p -r1.16 Makefile
--- regress/libexec/ld.so/Makefile 20 Mar 2016 05:13:22 -0000 1.16
+++ regress/libexec/ld.so/Makefile 26 Sep 2016 21:35:45 -0000
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.16 2016/03/20 05:13:22 guenther Exp $
SUBDIR+= elf hidden weak dlsym dlopen dlclose lazy
-#SUBDIR+= constructor
+SUBDIR+= constructor
SUBDIR+= link-order edgecases initfirst
SUBDIR+= df_1_noopen randomdata subst dependencies
SUBDIR+= init-env
Index: regress/libexec/ld.so/constructor/libab/Makefile
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/constructor/libab/Makefile,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile
--- regress/libexec/ld.so/constructor/libab/Makefile 1 Feb 2003 19:56:17
-0000 1.1
+++ regress/libexec/ld.so/constructor/libab/Makefile 26 Sep 2016 21:35:45
-0000
@@ -1,6 +1,6 @@
LIB=ab
SRCS= ab.C
-CFLAGS=-I${.CURDIR}/../libaa
+CPPFLAGS=-I${.CURDIR}/../libaa
LDADD=-L../libaa
LDADD+=-laa
.include <bsd.lib.mk>
Index: regress/libexec/ld.so/constructor/libab/ab.C
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/constructor/libab/ab.C,v
retrieving revision 1.2
diff -u -p -r1.2 ab.C
--- regress/libexec/ld.so/constructor/libab/ab.C 18 Feb 2003 13:14:42
-0000 1.2
+++ regress/libexec/ld.so/constructor/libab/ab.C 26 Sep 2016 21:35:45
-0000
@@ -4,9 +4,11 @@
* $OpenBSD: ab.C,v 1.2 2003/02/18 13:14:42 jmc Exp $
*/
-#include "iostream.h"
+#include <iostream>
#include "aa.h"
#include "ab.h"
+
+using namespace std;
extern int a;
Index: regress/libexec/ld.so/constructor/prog1/Makefile
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/constructor/prog1/Makefile,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile
--- regress/libexec/ld.so/constructor/prog1/Makefile 1 Feb 2003 19:56:17
-0000 1.1
+++ regress/libexec/ld.so/constructor/prog1/Makefile 26 Sep 2016 21:35:45
-0000
@@ -22,7 +22,7 @@ AB_OBJDIR!= if [ -d $(AB_DIR)/${__obj
-CFLAGS=-I${.CURDIR}/../libab
+CPPFLAGS=-I${.CURDIR}/../libab
LDADD=
LDADD+=-lab
LDADD+=-laa
Index: regress/libexec/ld.so/constructor/prog1/prog1.C
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/constructor/prog1/prog1.C,v
retrieving revision 1.1
diff -u -p -r1.1 prog1.C
--- regress/libexec/ld.so/constructor/prog1/prog1.C 1 Feb 2003 19:56:17
-0000 1.1
+++ regress/libexec/ld.so/constructor/prog1/prog1.C 26 Sep 2016 21:35:45
-0000
@@ -3,8 +3,11 @@
*
* $OpenBSD: prog1.C,v 1.1 2003/02/01 19:56:17 drahn Exp $
*/
-#include "iostream.h"
+#include <iostream>
#include "ab.h"
+
+using namespace std;
+
BB BBmain("main");
int a;
Index: regress/libexec/ld.so/constructor/prog2/Makefile
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/constructor/prog2/Makefile,v
retrieving revision 1.1
diff -u -p -r1.1 Makefile
--- regress/libexec/ld.so/constructor/prog2/Makefile 1 Feb 2003 19:56:17
-0000 1.1
+++ regress/libexec/ld.so/constructor/prog2/Makefile 26 Sep 2016 21:35:45
-0000
@@ -22,7 +22,7 @@ AB_OBJDIR!= if [ -d $(AB_DIR)/${__obj
-CFLAGS=-I${.CURDIR}/../libab
+CPPFLAGS=-I${.CURDIR}/../libab
LDADD=
LDADD+=-laa
LDADD+=-lab
Index: regress/libexec/ld.so/constructor/prog2/prog2.C
===================================================================
RCS file: /cvs/src/regress/libexec/ld.so/constructor/prog2/prog2.C,v
retrieving revision 1.1
diff -u -p -r1.1 prog2.C
--- regress/libexec/ld.so/constructor/prog2/prog2.C 1 Feb 2003 19:56:17
-0000 1.1
+++ regress/libexec/ld.so/constructor/prog2/prog2.C 26 Sep 2016 21:35:45
-0000
@@ -3,8 +3,11 @@
*
* $OpenBSD: prog2.C,v 1.1 2003/02/01 19:56:17 drahn Exp $
*/
-#include "iostream.h"
+#include <iostream>
#include "ab.h"
+
+using namespace std;
+
BB BBmain("main");
int a;