You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by wh...@apache.org on 2005/01/13 13:37:53 UTC
cvs commit: ws-axis/c/src/cbindings AxisC.cpp
whitlock 2005/01/13 04:37:53
Modified: c/build buildTools.xml
c/include/axis GDefine.h
c/src/common AxisTrace.cpp AxisTrace.h
c/tools/org/apache/axis/tools/cbindings
CBindingGenerator.java
Added: c/src/cbindings AxisC.cpp
Log:
Build the C bindings
Revision Changes Path
1.3 +72 -1 ws-axis/c/build/buildTools.xml
Index: buildTools.xml
===================================================================
RCS file: /home/cvs/ws-axis/c/build/buildTools.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- buildTools.xml 7 Jan 2005 12:05:40 -0000 1.2
+++ buildTools.xml 13 Jan 2005 12:37:53 -0000 1.3
@@ -42,7 +42,10 @@
<!--
Compile, package and run the C binding generator
-->
- <target name="generateCBindings" depends="buildTools"
+ <target name="buildCBindings" depends="generateCHeaders, compileCBindings"
+ description="Generate the C bindings and compile and link the C bindings client library"/>
+
+ <target name="generateCHeaders" depends="buildTools"
description="Run the C binding generator tool">
<path id ="cbindcp">
<fileset dir="${dir.classes}" includes="buildtools.jar"/>
@@ -58,4 +61,72 @@
</java>
</target>
+ <!--
+ Compile the Axis C Bindings Client Library
+ -->
+ <target name="compileCBindings">
+ <mkdir dir="${dir.objects}"/>
+ <mkdir dir="${dir.bin}"/>
+ <if>
+ <not>
+ <isset property="aix"/>
+ </not>
+ <then>
+ <cc outfile="${dir.bin}/${clientLibraryName}C" objdir="${dir.objects}"
+ exceptions="true" outtype="shared" multithreaded="true">
+ <!-- Compilers -->
+ <compiler refid="SolarisCC"/>
+ <compiler refid="Linuxgcc"/>
+ <compiler extends="VisualC++">
+ <defineset>
+ <define name="AXISCLIENTCDLL_EXPORTS"/>
+ </defineset>
+ </compiler>
+ <compiler refid="OS400icc"/>
+ <!-- Additional compiler flag for Client library on all platforms -->
+ <defineset>
+ <define name="AXIS_CLIENTC_LIB"/>
+ <define name="ENABLE_AXISTRACE" if="trace"/>
+ </defineset>
+ <includepath path="${dir.include}${path.separator}${dir.obj}/include"/>
+ <!-- Linkers -->
+ <linker refid="SolarisLinker"/>
+ <linker refid="LinuxLinker"/>
+ <linker refid="VisualC++Linker"/>
+ <linker extends="OS400Linker">
+ <linkerarg value="-qDUPPROC"/>
+ <linkerarg value="-qDUPVAR"/>
+ <linkerarg location="end" value="${dir.bin}/lib/${clientLibraryName}.so"/>
+ </linker>
+ <!-- Additional library of the Axis Client Library -->
+ <libset dir="${dir.bin}" libs="${clientLibraryName}" unless="os400"/>
+ <!-- Files to be compiled -->
+ <fileset dir="${dir.src}">
+ <include name="cbindings/*.cpp"/>
+ </fileset>
+ </cc>
+ </then>
+ <else>
+ <cc outfile="${dir.bin}/${libraryPrefix}${clientLibraryName}C${librarySuffix}"
+ objdir="${dir.objects}" exceptions="true" multithreaded="true">
+ <!-- Compilers -->
+ <compiler refid="AIXxlc"/>
+ <!-- Additional compiler flag for Client library on all platforms -->
+ <defineset>
+ <define name="AXIS_CLIENT_LIB"/>
+ <define name="ENABLE_AXISTRACE" if="trace"/>
+ </defineset>
+ <includepath path="${dir.include}${path.separator}${dir.obj}/include"/>
+ <!-- Linkers -->
+ <linker refid="AIXLinker"/>
+ <!-- Additional library of the Axis Client Library -->
+ <libset dir="${dir.bin}/lib" libs="${clientLibraryName}"/>
+ <!-- Files to be compiled -->
+ <fileset dir="${dir.src}">
+ <include name="cbindings/*.cpp"/>
+ </fileset>
+ </cc>
+ </else>
+ </if>
+ </target>
</project>
1.2 +1 -1 ws-axis/c/include/axis/GDefine.h
Index: GDefine.h
===================================================================
RCS file: /home/cvs/ws-axis/c/include/axis/GDefine.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GDefine.h 7 Jan 2005 16:35:20 -0000 1.1
+++ GDefine.h 13 Jan 2005 12:37:53 -0000 1.2
@@ -79,7 +79,7 @@
#endif
#endif
-typedef int bool;
+typedef int AxiscBool;
typedef void* AXISCHANDLE;
#endif
1.51 +12 -0 ws-axis/c/src/common/AxisTrace.cpp
Index: AxisTrace.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- AxisTrace.cpp 12 Jan 2005 15:52:06 -0000 1.50
+++ AxisTrace.cpp 13 Jan 2005 12:37:53 -0000 1.51
@@ -65,6 +65,18 @@
return AXIS_SUCCESS;
}
+void AxisTrace::terminate()
+{
+ m_bLoggingOn = false;
+ delete m_fileTrace;
+ m_fileTrace = NULL;
+}
+
+bool AxisTrace::isTraceOn()
+{
+ return m_bLoggingOn;
+}
+
int AxisTrace::logaxis (const char* sLog1, const char* sLog2, int level,
char* arg3, int arg4)
{
1.24 +8 -4 ws-axis/c/src/common/AxisTrace.h
Index: AxisTrace.h
===================================================================
RCS file: /home/cvs/ws-axis/c/src/common/AxisTrace.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- AxisTrace.h 12 Jan 2005 15:52:06 -0000 1.23
+++ AxisTrace.h 13 Jan 2005 12:37:53 -0000 1.24
@@ -95,7 +95,11 @@
AxisTraceEntrypoints *g_traceEntrypoints = NULL;
#endif
-class AxisTrace
+#ifdef WIN32
+#pragma warning (disable : 4251)
+#endif
+
+class STORAGE_CLASS_INFO AxisTrace
{
public:
AxisTrace() {};
@@ -175,7 +179,7 @@
#ifdef AXISTRACE_LIBRARY
static inline bool isTraceOn() { return g_traceEntrypoints->m_traceOn; }
#else
- static inline bool isTraceOn() { return m_bLoggingOn; }
+ static bool isTraceOn();
#endif
/**
@@ -245,7 +249,7 @@
/**
* Closes the trace file
*/
- static void terminate() { m_bLoggingOn = false; delete m_fileTrace; m_fileTrace = NULL; };
+ static void terminate();
/**
* Returns the trace entrypoints to pass to a dynamically loaded library.
@@ -260,7 +264,7 @@
entrypoints.m_traceEntry = traceEntryInternal;
entrypoints.m_traceExit = traceExitInternal;
entrypoints.m_traceCatch = traceCatchInternal;
- entrypoints.m_traceOn = m_bLoggingOn;
+ entrypoints.m_traceOn = isTraceOn();
}
#endif
1.3 +2 -0 ws-axis/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java
Index: CBindingGenerator.java
===================================================================
RCS file: /home/cvs/ws-axis/c/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CBindingGenerator.java 6 Jan 2005 16:21:28 -0000 1.2
+++ CBindingGenerator.java 13 Jan 2005 12:37:53 -0000 1.3
@@ -354,6 +354,8 @@
return "AXISCHANDLE";
} else if ("AnyType".equals(tok)) {
type += "AxiscAnyType";
+ } else if ("bool".equals(tok)) {
+ type += "AxiscBool";
} else {
type += changeAxisToAxisc(tok);
}
1.1 ws-axis/c/src/cbindings/AxisC.cpp
Index: AxisC.cpp
===================================================================
/*
* Copyright 2003-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
//include <axis/Axis.h>
#include <axis/Axis.hpp>
AXIS_CPP_NAMESPACE_USE
extern "C" STORAGE_CLASS_INFO void axiscInitializeAxis(bool bIsServer) {
Axis::initialize(bIsServer);
}
extern "C" STORAGE_CLASS_INFO void axiscTerminate() {
Axis::terminate();
}