axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From damitha kumarage <dami...@opensource.lk>
Subject Axis C++ Solaris port
Date Wed, 08 Sep 2004 09:50:57 GMT
Hi Valentine

> Dear Axis developers,
> I successfully ported Axis to Solaris and verified
> that my client code is working properly similar to
> Linux. I've spent some time to figure out appropriate
> options for Solaris platform which will allow Axis to
> compile. I used Solaris 2.8, with native CC/cc C++/c
> compilers. The compiler options was choosen to allow
> global instantiation of templates.
>
> Here they are:
> CXXFLAGS=" -KPIC -xildoff -pta -instances=global "
> CFLAGS="-DENABLE_AXIS_EXCEPTION -DENABLE_AXISTRACE"
> CPPFLAGS="-DENABLE_AXIS_EXCEPTION -DENABLE_AXISTRACE"
> LDFLAGS = "-Qoption ld -zmuldefs"
> and need to be setup in configure.ac

Is it OK if i add a comiler option to support different platforms.
eg: configure --with-solaris etc

>
> I used libtool-1.5.8, autoconf-2.59, automake-1.9.1
>
> All patches done wrt axis-c-src-1-2-linux (sorry I
> just don't have time to test development release).
> I also created SolarisDefs.hpp file similar to
> LinuxDefs.hpp. I just copied content of endian.h and
> LinuxDefs.hpp into SolarisDefs.hpp and it works (on
> Solaris there is no endian.h).
> Finally, I was need to rebuild libaxis_expat.so and
> add there StartElement.o, Event.o, Element.o.

LinuxDefs.hpp is related to xercesc. so I guess SolarisDefs.hpp is
not needed if you use expat

 It was
> necessary to plug Axis into our 700+ package framework
> (which is based on shared libraries). I did it
> manually and need to verify if changes would be
> necessary for Axis Makefile.am.
>
> I hope you will accept my changes and include them in
> CVS tree as well as in forthcoming release. I'll be
> happy to test Axis in a future on Solaris when new
> release will come.
>
> Valentin.
> P.S. The way we use Axis is to access Web Service
> through our framework and legacy C++ application. No
> tests done on the server side.
>
>
>
> __________________________________
> Do you Yahoo!?
> Read only the mail you want - Yahoo! Mail SpamGuard.
> http://promotions.yahoo.com/new_mail


----------------------------------------------------------------------------
----


> --- original/axis-c-src-1-2-linux/src/common/AxisTime.cpp 2004-07-09
03:22:04.000000000 -0400
> +++ solaris/axis-c-src-1-2-linux/src/common/AxisTime.cpp 2004-08-20
13:03:08.000000000 -0400
> @@ -18,7 +18,7 @@
>   * @author Damitha Kumarage (damitha@opensource.lk,
damitha@jkcsworld.com)
>   *
>   */
> -
> +#include <math.h>
>  #include <stdio.h>
>  #include <axis/server/AxisTime.h>
>  #include "AxisUtils.h"
> @@ -250,18 +250,18 @@
>              m_TM.tm_year -= 1900;
>              m_TM.tm_mon--;
>              m_TM.tm_isdst = -1;
> -#if !defined(WIN32) && !defined(AIX)
> +#if !defined(WIN32) && !defined(AIX) && !defined(__sun)
>              m_TM.tm_zone = NULL;
>              m_TM.tm_gmtoff = -1;
>  #endif
> -            cTemp2 = strpbrk (m_sValue.c_str (), "T");
> +            cTemp2 = const_cast<char*>(strpbrk (m_sValue.c_str (),
"T"));
>              cTemp3 = strrchr (cTemp2, ':');
>              cTemp3[0] = '\0';
>              intLen = strlen (cTemp2);
>              cTemp3[0] = ':';
>
>              /*if the timezone is represented adding 'Z' at the end */
> -            if ((cTemp = strpbrk (m_sValue.c_str (), "Z")) != NULL)
> +            if ((cTemp = const_cast<char*>(strpbrk (m_sValue.c_str
(),
"Z"))) != NULL)
>              {
>                  time_t temp = mktime (&m_TM);
>                  if (temp == -1)
> @@ -296,7 +296,7 @@
>                  time_t t = mktime (&m_TM);
>                  if (t == -1)
>                      return AXIS_FAIL;
> -                t = abs (t - d);
> +                t = fabs (t - d);
>                  pTm = gmtime (&t);
>                  memcpy (&m_TMUTC, pTm, sizeof (tm));
>              }
> @@ -329,14 +329,14 @@
>              m_TM.tm_min = 0;
>              m_TM.tm_sec = 0;
>              m_TM.tm_isdst = -1;
> -#if !defined(WIN32) && !defined(AIX)
> +#if !defined(WIN32) && !defined(AIX) && !defined(__sun)
>              m_TM.tm_zone = NULL;
>              m_TM.tm_gmtoff = -1;
>  #endif
> -            cTemp3 = strpbrk (m_sValue.c_str (), ":");
> +            cTemp3 = const_cast<char*>(strpbrk (m_sValue.c_str (),
":"));
>
>              /* if the timezone is represented adding 'Z' at the end
*/
> -            if ((cTemp = strpbrk (m_sValue.c_str (), "Z")) != NULL)
> +            if ((cTemp = const_cast<char*>(strpbrk (m_sValue.c_str
(),
"Z"))) != NULL)
>              {
>                  time_t timeInSecs = mktime (&m_TM);
>                  if (timeInSecs == -1)
> @@ -346,9 +346,9 @@
>              }
>              else if (cTemp3 != NULL)
>              {
> -                cUtc = strrchr (m_sValue.c_str (), '+');
> +                cUtc = const_cast<char*>(strrchr (m_sValue.c_str (),
'+'));
>                  if (cUtc == NULL)
> -                    cUtc = strrchr (m_sValue.c_str (), '-');
> +                    cUtc = const_cast<char*>(strrchr (m_sValue.c_str
(),
'-'));
>                  time_t timeInSecs = mktime (&m_TM);
>                  if (timeInSecs == -1)
>                      return AXIS_FAIL;
> @@ -368,7 +368,7 @@
>                  time_t t = mktime (&m_TM);
>                  if (t == -1)
>                      return AXIS_FAIL;
> -                t = abs (t - d);
> +                t = fabs (t - d);
>                  pTm = gmtime (&t);
>                  memcpy (&m_TMUTC, pTm, sizeof (tm));
>              }
> @@ -399,7 +399,7 @@
>              m_TM.tm_mon = 0;
>              m_TM.tm_mday = 1;     /* Day of month (1 - 31) */
>              m_TM.tm_isdst = -1;
> -#if !defined(WIN32) && !defined(AIX)
> +#if !defined(WIN32) && !defined(AIX) && !defined(__sun)
>              m_TM.tm_zone = NULL;
>              m_TM.tm_gmtoff = -1;
>  #endif
> @@ -417,7 +417,7 @@
>              cTemp3[0] = ':';
>
>              /* if the timezone is represented adding 'Z' at the end
*/
> -            if ((cTemp = strpbrk (m_sValue.c_str (), "Z")) != NULL)
> +            if ((cTemp = const_cast<char*>(strpbrk (m_sValue.c_str
(),
"Z"))) != NULL)
>              {
>                  time_t temp = mktime (&m_TM);
>                  if (temp == -1)
> @@ -452,7 +452,7 @@
>                  time_t t = mktime (&m_TM);
>                  if (t == -1)
>                      return AXIS_FAIL;
> -                t = abs (t - d);
> +                t = fabs (t - d);
>                  pTm = gmtime (&t);
>                  memcpy (&m_TMUTC, pTm, sizeof (tm));
>              }
>


----------------------------------------------------------------------------
----


> --- original/axis-c-src-1-2-linux/src/common/TypeMapping.cpp
2004-07-09
03:22:04.000000000 -0400
> +++ solaris/axis-c-src-1-2-linux/src/common/TypeMapping.cpp 2004-08-23
12:20:51.000000000 -0400
> @@ -24,11 +24,10 @@
>  #include "AxisUtils.h"
>  #define __TRC(X) AxisUtils::Convert(X)
>
> -#ifndef AIX
> -map < const AxisXMLString, XSDTYPE >
> -    TypeMapping::m_sTypeMap;
> -#else
> +#if (defined(AIX) || (defined(_MSC_VER) && _MSC_VER >= 1300) ||
defined(__sun))
>  map < AxisXMLString, XSDTYPE > TypeMapping::m_sTypeMap;
> +#else
> +map < const AxisXMLString, XSDTYPE > TypeMapping::m_sTypeMap;
>  #endif
>  volatile bool TypeMapping::m_bInit = false;
>
>


----------------------------------------------------------------------------
----


> --- original/axis-c-src-1-2-linux/include/axis/server/TypeMapping.h
2004-07-09 03:22:03.000000000 -0400
> +++ solaris/axis-c-src-1-2-linux/include/axis/server/TypeMapping.h
2004-08-20 11:15:58.000000000 -0400
> @@ -59,7 +59,7 @@
>      static XSDTYPE map(const AxisXMLCh* sType);
>      static void initialize();
>
> -#if (defined(AIX) || (defined(_MSC_VER) && _MSC_VER >= 1300))
> +#if (defined(AIX) || (defined(_MSC_VER) && _MSC_VER >= 1300) ||
defined(__sun))
>      static std::map<AxisXMLString, XSDTYPE> m_sTypeMap;
>  #else
>      static std::map<const AxisXMLString, XSDTYPE> m_sTypeMap;
>


----------------------------------------------------------------------------
----


> --- original/axis-c-src-1-2-linux/include/axis/server/HandlerChain.h
2004-07-09 03:22:03.000000000 -0400
> +++ solaris/axis-c-src-1-2-linux/include/axis/server/HandlerChain.h
2004-08-24 10:09:46.000000000 -0400
> @@ -19,6 +19,7 @@
>  #define _HANDLERCHAIN_H____OF_AXIS_INCLUDED_
>
>  #include "Handler.h"
> +#include <vector>
>
>  /*
>   *  @class HandlerChain
> @@ -48,8 +49,13 @@
>      /* this is never called */
>
>  private:
> -    list<ChainItem> m_HandlerList;
> -    list<ChainItem>::iterator m_itCurrHandler;
> +//    list<ChainItem> m_HandlerList;
> +//    list<ChainItem>::iterator m_itCurrHandler;
> +    // On Solaris platform when autoinstantiation is done
> +    // list doesn't support (ChainItem==const ChainItem),
> +    // switched to vector to avoid this problem.
> +    std::vector<ChainItem> m_HandlerList;
> +    std::vector<ChainItem>::iterator m_itCurrHandler;
>  };
>
>  #endif
>


----------------------------------------------------------------------------
----


> /*
>  * The Apache Software License, Version 1.1
>  *
>  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
>  * reserved.
>  *
>  * Redistribution and use in source and binary forms, with or without
>  * modification, are permitted provided that the following conditions
>  * are met:
>  *
>  * 1. Redistributions of source code must retain the above copyright
>  *    notice, this list of conditions and the following disclaimer.
>  *
>  * 2. Redistributions in binary form must reproduce the above
copyright
>  *    notice, this list of conditions and the following disclaimer in
>  *    the documentation and/or other materials provided with the
>  *    distribution.
>  *
>  * 3. The end-user documentation included with the redistribution,
>  *    if any, must include the following acknowledgment:
>  *       "This product includes software developed by the
>  *        Apache Software Foundation (http://www.apache.org/)."
>  *    Alternately, this acknowledgment may appear in the software
itself,
>  *    if and wherever such third-party acknowledgments normally
appear.
>  *
>  * 4. The names "Xerces" and "Apache Software Foundation" must
>  *    not be used to endorse or promote products derived from this
>  *    software without prior written permission. For written
>  *    permission, please contact apache\@apache.org.
>  *
>  * 5. Products derived from this software may not be called "Apache",
>  *    nor may "Apache" appear in their name, without prior written
>  *    permission of the Apache Software Foundation.
>  *
>  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
>  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
>  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
>  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
>  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
>  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
>  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>  * SUCH DAMAGE.
>  *
====================================================================
>  *
>  * This software consists of voluntary contributions made by many
>  * individuals on behalf of the Apache Software Foundation, and was
>  * originally based on software copyright (c) 1999, International
>  * Business Machines, Inc., http://www.ibm.com .  For more information
>  * on the Apache Software Foundation, please see
>  * <http://www.apache.org/>.
>  */
>
> /*
>  * $Log: LinuxDefs.hpp,v $
>  * Revision 1.3  2002/11/19 18:19:41  tng
>  * [Bug 13487] Linux runs on many non-i386 platforms.
>  *
>  * Revision 1.2  2002/10/29 18:58:14  tng
>  * Support for Linux/390 which is big endian
>  *
>  * Revision 1.1.1.1  2002/02/01 22:22:24  peiyongz
>  * sane_include
>  *
>  * Revision 1.3  2000/03/02 19:55:24  roddey
>  * This checkin includes many changes done while waiting for the
>  * 1.1.0 code to be finished. I can't list them all here, but a list
is
>  * available elsewhere.
>  *
>  * Revision 1.2  2000/02/06 07:48:28  rahulj
>  * Year 2K copyright swat.
>  *
>  * Revision 1.1.1.1  1999/11/09 01:07:00  twl
>  * Initial checkin
>  *
>  * Revision 1.2  1999/11/08 20:45:30  rahul
>  * Swat for adding in Product name and CVS comment log variable.
>  *
>  */
>
>
>
//
-------------------------------------------------------------------------
--
> //  Detect endian mode
>
//
-------------------------------------------------------------------------
--
>
> #define __LITTLE_ENDIAN 1234
> #define __BIG_ENDIAN    4321
> #define __PDP_ENDIAN    3412
>
>
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> # define __LONG_LONG_PAIR(HI, LO) LO, HI
> #elif __BYTE_ORDER == __BIG_ENDIAN
> # define __LONG_LONG_PAIR(HI, LO) HI, LO
> #endif
>
>
> #ifdef __BYTE_ORDER
>     #if __BYTE_ORDER == __LITTLE_ENDIAN
>         #define ENDIANMODE_LITTLE
>     #else
>         #if __BYTE_ORDER == __BIG_ENDIAN
>             #define ENDIANMODE_BIG
>         #else
>             #error: unknown byte order!
>         #endif
>     #endif
> #endif /* __BYTE_ORDER */
>
> typedef void* FileHandle;
>
> #ifndef LINUX
> #define LINUX
> #endif
>


Mime
View raw message