svn rev #21919: trunk/src/tests/misc/
raeburn@MIT.EDU
raeburn at MIT.EDU
Mon Feb 9 11:36:11 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21919
Commit By: raeburn
Log Message:
Check C++ compatibility for some internal headers that may (now or in
the future) be used in C++ code on Windows.
Changed Files:
U trunk/src/tests/misc/Makefile.in
A trunk/src/tests/misc/test_cxx_k5int.cpp
Modified: trunk/src/tests/misc/Makefile.in
===================================================================
--- trunk/src/tests/misc/Makefile.in 2009-02-09 16:35:01 UTC (rev 21918)
+++ trunk/src/tests/misc/Makefile.in 2009-02-09 16:36:09 UTC (rev 21919)
@@ -11,14 +11,16 @@
$(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
@@ -30,6 +32,8 @@
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)
Added: trunk/src/tests/misc/test_cxx_k5int.cpp
===================================================================
--- trunk/src/tests/misc/test_cxx_k5int.cpp 2009-02-09 16:35:01 UTC (rev 21918)
+++ trunk/src/tests/misc/test_cxx_k5int.cpp 2009-02-09 16:36:09 UTC (rev 21919)
@@ -0,0 +1,19 @@
+// 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;
+}
More information about the cvs-krb5
mailing list