$(srcdir)/test_getpw.c \
$(srcdir)/test_getsockname.c \
$(srcdir)/test_cxx_krb5.cpp \
+ $(srcdir)/test_cxx_k5int.cpp \
$(srcdir)/test_cxx_gss.cpp \
$(srcdir)/test_cxx_rpc.cpp
all:: test_getpw
-check:: test_getpw test_cxx_krb5 test_cxx_gss test_cxx_rpc
+check:: test_getpw test_cxx_krb5 test_cxx_gss test_cxx_rpc test_cxx_k5int
$(RUN_SETUP) $(VALGRIND) ./test_getpw
$(RUN_SETUP) $(VALGRIND) ./test_cxx_krb5
+ $(RUN_SETUP) $(VALGRIND) ./test_cxx_k5int
$(RUN_SETUP) $(VALGRIND) ./test_cxx_gss
$(RUN_SETUP) $(VALGRIND) ./test_cxx_rpc
test_cxx_krb5: $(OUTPRE)test_cxx_krb5.$(OBJEXT) $(KRB5_DEPLIB)
$(CXX_LINK) $(ALL_CXXFLAGS) -o test_cxx_krb5 $(OUTPRE)test_cxx_krb5.$(OBJEXT) $(KRB5_BASE_LIBS) $(LIBS)
+test_cxx_k5int: $(OUTPRE)test_cxx_k5int.$(OBJEXT) $(KRB5_DEPLIB)
+ $(CXX_LINK) $(ALL_CXXFLAGS) -o test_cxx_k5int $(OUTPRE)test_cxx_k5int.$(OBJEXT) $(KRB5_BASE_LIBS) $(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)
--- /dev/null
+// Test that the krb5 internal headers are compatible with C++ code.
+// (Some Windows-specific code is in C++ in this source tree.)
+
+#include <stdio.h>
+#include "k5-int.h"
+#include "k5-ipc_stream.h"
+#include "k5-utf8.h"
+
+int main (int argc, char *argv[])
+{
+ krb5_context ctx;
+
+ if (krb5_init_context(&ctx) != 0) {
+ printf("krb5_init_context returned an error\n");
+ return 1;
+ }
+ printf("hello, world\n");
+ return 0;
+}