summaryrefslogtreecommitdiffstats
path: root/src/ccapi/test
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-11-25 20:28:30 +0000
committerGreg Hudson <ghudson@mit.edu>2010-11-25 20:28:30 +0000
commit530043377ee6f39b9ca95c13f6260602e6fe7674 (patch)
tree28fd4b42c486d7097c4cd537d90042bb5fda3852 /src/ccapi/test
parente9dd6e21afc9af2237e9ae5590ad5a67e52fb24e (diff)
downloadkrb5-530043377ee6f39b9ca95c13f6260602e6fe7674.tar.gz
krb5-530043377ee6f39b9ca95c13f6260602e6fe7674.tar.xz
krb5-530043377ee6f39b9ca95c13f6260602e6fe7674.zip
Fix Windows build
Repair the Windows build. Tested with the prepare-on-Unix method. Some specific changes include: * Removed the IPC finalizer (no longer used after r20787) from ccapi/lib/ccapi_ipc.c, as it was creating a difficult dependency chain for the pingtest build in ccapi/test. Also updated pingtest to use the k5_ipc_stream interfaces since cci_stream is gone. * Reverted the apparently non-functional r20277. * klist -V prints just "Kerberos for Windows", since it has no access to PACKAGE_NAME and PACKAGE_VERSION from autoconf. This should be addressed correctly. * krb5, telnet, gssftp, and NIM are removed from the build. * Some files had CRLFs; these were replaced with LFs and the svn:eol-style property set on the files. Otherwise the CRLFs became CRCRLFs after the zip transfer. * Windows does not have opendir/readdir, so added Windows code to prof_parse.c for includedir. Probable fodder for a libkrb5support portability shim. ticket: 6826 target_version: 1.9 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24533 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/ccapi/test')
-rw-r--r--src/ccapi/test/Makefile.in38
-rw-r--r--src/ccapi/test/pingtest.c14
2 files changed, 24 insertions, 28 deletions
diff --git a/src/ccapi/test/Makefile.in b/src/ccapi/test/Makefile.in
index 175e06bf0..bf950b6a7 100644
--- a/src/ccapi/test/Makefile.in
+++ b/src/ccapi/test/Makefile.in
@@ -6,7 +6,7 @@ CCAPI=$(BUILDTOP)$(S)CCAPI
KFWINC= /I$(BUILDTOP)\..\..\krbcc\include
!endif
-# Because all the sources are in .,
+# Because all the sources are in .,
# the only includes we need are to directories outside of ccapi.
LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$(S)krb5 $(KFWINC) \
-I$(BUILDTOP)$(S)util$(S)et /I. -I$(CCAPI)$(S)COMMON -I$(CCAPI)$(S)LIB
@@ -21,7 +21,6 @@ LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$
##DOS## ccs_reply.h \
##DOS## ccs_request.h \
##DOS## ccs_request_c.c \
-##DOS## cci_stream.h \
##DOS## cci_types.h \
##DOS## win-utils.h
@@ -29,6 +28,7 @@ LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$
##DOS## ccapi_ccache_iterator.c \
##DOS## ccapi_context.c \
##DOS## ccapi_context_change_time.c \
+##DOS## ccapi_err.c \
##DOS## ccapi_ipc.c \
##DOS## ccapi_credentials.c \
##DOS## ccapi_credentials_iterator.c \
@@ -37,8 +37,7 @@ LOCALINCLUDES = /I$(BUILDTOP) /I$(BUILDTOP)$(S)include /I$(BUILDTOP)$(S)include$
##DOS##COMSRC=cci_cred_union.c \
##DOS## cci_identifier.c \
-##DOS## cci_message.c \
-##DOS## cci_stream.c
+##DOS## cci_message.c
##DOS##COWSRC=cci_os_identifier.c
@@ -65,6 +64,7 @@ PINGOBJS = $(OUTPRE)ccapi_ccache.$(OBJEXT) \
$(OUTPRE)ccapi_ccache_iterator.$(OBJEXT) \
$(OUTPRE)ccapi_context.$(OBJEXT) \
$(OUTPRE)ccapi_context_change_time.$(OBJEXT) \
+ $(OUTPRE)ccapi_err.$(OBJEXT) \
$(OUTPRE)ccapi_ipc.$(OBJEXT) \
$(OUTPRE)ccapi_credentials.$(OBJEXT) \
$(OUTPRE)ccapi_credentials_iterator.$(OBJEXT) \
@@ -74,7 +74,6 @@ PINGOBJS = $(OUTPRE)ccapi_ccache.$(OBJEXT) \
$(OUTPRE)cci_identifier.$(OBJEXT) \
$(OUTPRE)cci_os_identifier.$(OBJEXT) \
$(OUTPRE)cci_message.$(OBJEXT) \
- $(OUTPRE)cci_stream.$(OBJEXT) \
$(OUTPRE)ccs_request_c.$(OBJEXT) \
$(OUTPRE)pingtest.$(OBJEXT) \
$(OBJECTS)
@@ -86,7 +85,7 @@ TEST_NAMES = test_cc_ccache_iterator_next \
test_constants \
test_cc_initialize \
test_cc_credentials_iterator_next
-
+
MORE_TESTS = test_cc_context_release \
test_cc_context_get_change_time \
test_cc_context_get_default_ccache_name \
@@ -136,7 +135,7 @@ MORE_TESTS = test_cc_context_release \
##### Linker
LINK = link
LIBS = -lkrb5
-##DOS##LIBS = advapi32.lib rpcrt4.lib user32.lib ws2_32.lib ccapi.lib
+##DOS##LIBS = $(CLIB) $(SLIB) advapi32.lib rpcrt4.lib user32.lib ws2_32.lib ccapi.lib
LFLAGS = /nologo $(LOPTS)
all-mac:: setup-test-dir pingtest simple_lock_test build-base build-tests link-tests copy-script success-message
@@ -149,14 +148,14 @@ build-base: $(PINGOBJS)
# compile each test
build-tests: $(TEST_NAMES)
@echo build-tests complete.
-
-$(TEST_NAMES):
- @echo DBG: $@
+
+$(TEST_NAMES):
+ @echo DBG: $@
$(CC) $(ALL_CFLAGS) -Fe$(TESTDIR)$(S)$@.exe -Fd$(OBJDIR)$(S)$@.obj $@.c $(OBJECTS) $(LIBS)
# Clean .obj from .:
$(RM) $@.$(OBJEXT)
##-- These two rules build each element of the list.
-
+
# Make a build directory
setup-test-dir:
@echo "Removing old destination directory... $(DSTDIR)"
@@ -164,13 +163,13 @@ setup-test-dir:
mkdir -p "$(TESTDIR)"
if [ -d "$(OBJDIR)" ]; then chmod -R u+w "$(OBJDIR)" && rm -rf "$(OBJDIR)"; fi
mkdir -p "$(OBJDIR)"
-
+
## The same trick as used in TEST_NAMES to run an action on each element ofthe list WINH:
setup-windows: $(WINH) $(LIBSRC) $(COMSRC) $(COWSRC)
if NOT exist $(TESTDIR) mkdir $(TESTDIR)
if NOT exist $(OBJDIR) mkdir $(OBJDIR)
set LINK = link
-
+
# This rule assumes that nmake in ..\lib\win has already run.
# That is how ..\Makefile.in is set up.
$(WINH):
@@ -187,8 +186,8 @@ $(COWSRC):
# This rule assumes that nmake in ..\lib\win\ has already run.
$(OUTPRE)pingtest.exe: $(OBJECTS) $(PINGOBJS)
-# There doesn't appear to be any way to examine a variable and return a value
-# indicating whether a string is present in it. We use a perl script to
+# There doesn't appear to be any way to examine a variable and return a value
+# indicating whether a string is present in it. We use a perl script to
# check the LIB variable. If the path to ccapi.lib isn't present, the script
# deletes a.tmp and the following nmake actions correct LIB.
echo %%PATH%% > a.tmp
@@ -197,8 +196,8 @@ $(OUTPRE)pingtest.exe: $(OBJECTS) $(PINGOBJS)
@echo Adding ..\lib\win\srctmp to LIB
set LIB=%%LIB%%;..\lib\win\srctmp
)
- $(LINK) $(linkdebug) /map:$(@B)1.map -out:$(*B)1.exe $(conflags) $(PINGOBJS) $(LIBS)
- $(LINK) $(LFLAGS) /map:$(@B)2.map /out:$(*B)2.exe $(conflags) $(PINGOBJS) $(LIBS) $(conlibsdll)
+ $(LINK) $(linkdebug) /map:$(@B)1.map -out:$(*B)1.exe $(conflags) $(PINGOBJS) $(LIBS)
+ $(LINK) $(LFLAGS) /map:$(@B)2.map /out:$(*B)2.exe $(conflags) $(PINGOBJS) $(LIBS) $(conlibsdll)
link-tests: $(TEST_NAMES)
@@ -212,10 +211,7 @@ simple_lock_test:
$(CC) -o $(TESTDIR)/simple_lock_test simple_lock_test.c $(LIBS)
copy-script:
- echo Copy script ...
- cd
- dir ccapi_test
- cp $(SCRIPT_NAME) $(DSTDIR)$(S)$(SCRIPT_NAME)
+ $(CP) $(SCRIPT_NAME) $(DSTDIR)$(S)$(SCRIPT_NAME)
success-message:
@echo
diff --git a/src/ccapi/test/pingtest.c b/src/ccapi/test/pingtest.c
index d64db2e4b..d44839f71 100644
--- a/src/ccapi/test/pingtest.c
+++ b/src/ccapi/test/pingtest.c
@@ -9,7 +9,6 @@
#include "cci_debugging.h"
#include "CredentialsCache.h"
-#include "cci_stream.h"
#include "win-utils.h"
#include "ccs_request.h"
@@ -18,9 +17,9 @@
extern cc_int32 cci_os_ipc_thread_init (void);
extern cc_int32 cci_os_ipc_msg( cc_int32 in_launch_server,
- cci_stream_t in_request_stream,
+ k5_ipc_stream in_request_stream,
cc_int32 in_msg,
- cci_stream_t* out_reply_stream);
+ k5_ipc_stream* out_reply_stream);
static DWORD dwTlsIndex;
@@ -68,8 +67,8 @@ RPC_STATUS send_test(char* endpoint) {
int main( int argc, char *argv[]) {
cc_int32 err = 0;
cc_context_t context = NULL;
- cci_stream_t send_stream = NULL;
- cci_stream_t reply_stream = NULL;
+ k5_ipc_stream send_stream = NULL;
+ k5_ipc_stream reply_stream = NULL;
char* message = "Hello, RPC!";
@@ -85,8 +84,9 @@ int main( int argc, char *argv[]) {
err = cci_os_ipc_thread_init();
}
if (!err) {
- err = cci_stream_new (&send_stream);
- err = cci_stream_write(send_stream, message, 1+strlen(message));
+ err = krb5int_ipc_stream_new (&send_stream);
+ err = krb5int_ipc_stream_write(send_stream, message,
+ 1+strlen(message));
}
if (!err) {