From 2992fdb8d2cebdf7499fd55f41853cf1218971cb Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 31 Oct 2007 06:59:11 +0000 Subject: [PATCH] Test more installed headers for C++ compatibility git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20156 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/misc/Makefile.in | 6 +++++- src/tests/misc/test_cxx_krb5.cpp | 2 ++ src/tests/misc/test_cxx_rpc.cpp | 14 ++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/tests/misc/test_cxx_rpc.cpp diff --git a/src/tests/misc/Makefile.in b/src/tests/misc/Makefile.in index d05b883a4..17bae094f 100644 --- a/src/tests/misc/Makefile.in +++ b/src/tests/misc/Makefile.in @@ -11,10 +11,11 @@ SRCS=$(srcdir)/test_getpw.c all:: test_getpw -check:: test_getpw test_cxx_krb5 test_cxx_gss +check:: test_getpw test_cxx_krb5 test_cxx_gss test_cxx_rpc $(RUN_SETUP) $(VALGRIND) ./test_getpw $(RUN_SETUP) $(VALGRIND) ./test_cxx_krb5 $(RUN_SETUP) $(VALGRIND) ./test_cxx_gss + $(RUN_SETUP) $(VALGRIND) ./test_cxx_rpc test_getpw: $(OUTPRE)test_getpw.$(OBJEXT) $(SUPPORT_DEPLIB) $(CC_LINK) $(ALL_CFLAGS) -o test_getpw $(OUTPRE)test_getpw.$(OBJEXT) $(SUPPORT_LIB) @@ -26,9 +27,12 @@ test_cxx_krb5: $(OUTPRE)test_cxx_krb5.$(OBJEXT) $(KRB5_DEPLIB) $(CXX_LINK) $(ALL_CXXFLAGS) -o test_cxx_krb5 $(OUTPRE)test_cxx_krb5.$(OBJEXT) $(KRB5_LIB) $(LIBS) test_cxx_gss: $(OUTPRE)test_cxx_gss.$(OBJEXT) $(CXX_LINK) $(ALL_CXXFLAGS) -o test_cxx_gss $(OUTPRE)test_cxx_gss.$(OBJEXT) $(LIBS) +test_cxx_rpc: $(OUTPRE)test_cxx_rpc.$(OBJEXT) $(GSSRPC_DEPLIBS) + $(CXX_LINK) $(ALL_CXXFLAGS) -o test_cxx_rpc $(OUTPRE)test_cxx_rpc.$(OBJEXT) $(GSSRPC_LIBS) $(LIBS) test_cxx_krb5.$(OBJEXT): test_cxx_krb5.cpp test_cxx_gss.$(OBJEXT): test_cxx_gss.cpp +test_cxx_rpc.$(OBJEXT): test_cxx_rpc.cpp install:: diff --git a/src/tests/misc/test_cxx_krb5.cpp b/src/tests/misc/test_cxx_krb5.cpp index 906c21d83..33a046f8c 100644 --- a/src/tests/misc/test_cxx_krb5.cpp +++ b/src/tests/misc/test_cxx_krb5.cpp @@ -2,6 +2,8 @@ #include #include "krb5.h" +#include "krb5/locate_plugin.h" +#include "profile.h" int main (int argc, char *argv[]) { diff --git a/src/tests/misc/test_cxx_rpc.cpp b/src/tests/misc/test_cxx_rpc.cpp new file mode 100644 index 000000000..b6ca4d398 --- /dev/null +++ b/src/tests/misc/test_cxx_rpc.cpp @@ -0,0 +1,14 @@ +// Test that the krb5.h header is compatible with C++ application code. + +#include "gssrpc/rpc.h" + +struct sockaddr_in s_in; +int main (int argc, char *argv[]) +{ + if (argc == 47 && get_myaddress (&s_in)) { + printf("error\n"); + return 1; + } + printf("hello, world\n"); + return 0; +} -- 2.26.2