You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ma...@apache.org on 2007/05/25 08:24:22 UTC

svn commit: r541565 - in /webservices/axis2/scratch/c/neethi/axis2c: ./ samples/server/echo/ util/ util/include/platforms/unix/ util/src/ util/src/platforms/unix/

Author: manjula
Date: Thu May 24 23:24:21 2007
New Revision: 541565

URL: http://svn.apache.org/viewvc?view=rev&rev=541565
Log:
Committing the latest merge.

Modified:
    webservices/axis2/scratch/c/neethi/axis2c/   (props changed)
    webservices/axis2/scratch/c/neethi/axis2c/samples/server/echo/echo.c
    webservices/axis2/scratch/c/neethi/axis2c/util/configure.ac
    webservices/axis2/scratch/c/neethi/axis2c/util/include/platforms/unix/axutil_unix.h
    webservices/axis2/scratch/c/neethi/axis2c/util/src/dir_handler.c
    webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/thread_unix.c
    webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/uuid_gen_unix.c

Propchange: webservices/axis2/scratch/c/neethi/axis2c/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 24 23:24:21 2007
@@ -1 +1 @@
-/webservices/axis2/trunk/c:1-539277
+/webservices/axis2/trunk/c:1-541560

Modified: webservices/axis2/scratch/c/neethi/axis2c/samples/server/echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/samples/server/echo/echo.c?view=diff&rev=541565&r1=541564&r2=541565
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/samples/server/echo/echo.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/samples/server/echo/echo.c Thu May 24 23:24:21 2007
@@ -43,10 +43,10 @@
     }
 
     text_parent_node = axiom_node_get_first_element(node, env);
-    if (!text_parent_node) /* 'text' node */
+    if (!text_parent_node) 
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
-        printf("Echo client ERROR: invalid XML in request\n");
+        printf("Echo client ERROR 1: invalid XML in request\n");
         return NULL;
     }
 
@@ -54,7 +54,7 @@
     if (!text_node) /* actual text to echo */
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
-        printf("Echo client ERROR: invalid XML in request\n");
+        printf("Echo client ERROR 2: invalid XML in request\n");
         return NULL;
     }
 
@@ -71,7 +71,7 @@
     else
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_SVC_SKEL_INVALID_XML_FORMAT_IN_REQUEST, AXIS2_FAILURE);
-        printf("Echo client ERROR: invalid XML in request\n");
+        printf("Echo client ERROR 3: invalid XML in request\n");
         return NULL;
     }
 

Modified: webservices/axis2/scratch/c/neethi/axis2c/util/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/util/configure.ac?view=diff&rev=541565&r1=541564&r2=541565
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/util/configure.ac (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/util/configure.ac Thu May 24 23:24:21 2007
@@ -100,6 +100,55 @@
 AC_FUNC_REALLOC
 #AC_CHECK_FUNCS([memmove])
 
+# System-dependent adjustments.
+cygwin=no
+darwin=no
+solaris=no
+no_undefined=no
+
+case "${host_cpu}" in
+alpha*)
+  if test x"$GCC" = xyes
+  then
+    CFLAGS="$CFLAGS -mfp-rounding-mode=d -mieee"
+    CXXFLAGS="$CXXFLAGS -mfp-rounding-mode=d -mieee"
+  else
+    CFLAGS="$CFLAGS -fprm d -ieee -underflow_to_zero"
+    CXXFLAGS="$CXXFLAGS -fprm d -ieee -underflow_to_zero"
+  fi
+  ;;
+*)
+  ;;
+esac
+
+case "${host_os}" in
+cygwin)
+  cygwin=yes
+  no_undefined=yes
+  ;;
+darwin*)
+  darwin=yes
+  if test x"$GCC" = xyes
+  then
+    CFLAGS="$CFLAGS -Wno-long-double"
+    CXXFLAGS="$CXXFLAGS -Wno-long-double"
+  fi
+  ;;
+solaris*)
+  solaris=yes
+  AC_DEFINE(AXIS2_SOLARIS,1,[I is solaris])
+  
+  ;;
+*)
+  ;;
+esac
+
+AM_CONDITIONAL(HOST_OS_CYGWIN, test x$cygwin = xyes)
+AM_CONDITIONAL(HOST_OS_DARWIN, test x$darwin = xyes)
+AM_CONDITIONAL(HOST_OS_SOLARIS, test x$solaris = xyes)
+AM_CONDITIONAL(NO_UNDEFINED, test x$no_undefined = xyes)
+
+
 AC_MSG_CHECKING(whether to build guththila xml parser library)
 AC_ARG_ENABLE(guththila, [  --enable-guththila    build guththila xml parser library wrapper. default=no],
 [ case "${enableval}" in

Modified: webservices/axis2/scratch/c/neethi/axis2c/util/include/platforms/unix/axutil_unix.h
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/util/include/platforms/unix/axutil_unix.h?view=diff&rev=541565&r1=541564&r2=541565
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/util/include/platforms/unix/axutil_unix.h (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/util/include/platforms/unix/axutil_unix.h Thu May 24 23:24:21 2007
@@ -133,6 +133,7 @@
 
 
 /* dir handling */
+#include <sys/types.h>
 #include <dirent.h>
 
 #define AXIS2_STRRCHR(x, y) (strrchr(x, y))

Modified: webservices/axis2/scratch/c/neethi/axis2c/util/src/dir_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/util/src/dir_handler.c?view=diff&rev=541565&r1=541564&r2=541565
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/util/src/dir_handler.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/util/src/dir_handler.c Thu May 24 23:24:21 2007
@@ -27,7 +27,7 @@
 
 extern int AXIS2_ALPHASORT();
 
-int dir_select(struct dirent *entry);
+int dir_select(const struct dirent *entry);
 
 
 /**
@@ -314,7 +314,7 @@
         return(AXIS2_FALSE);
 }
 
-int dir_select(struct dirent *entry)
+int dir_select(const struct dirent *entry)
 
 {
     struct stat stat_p;

Modified: webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/thread_unix.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/thread_unix.c?view=diff&rev=541565&r1=541564&r2=541565
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/thread_unix.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/thread_unix.c Thu May 24 23:24:21 2007
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 
+#include <config.h>
 #include "axutil_thread_unix.h"
 
 
@@ -242,7 +243,11 @@
 AXIS2_EXTERN axutil_thread_once_t* AXIS2_CALL
 axutil_thread_once_init(axutil_allocator_t* allocator)
 {
+#ifdef AXIS2_SOLARIS
+    static const pthread_once_t once_init = {PTHREAD_ONCE_INIT};
+#else
     static const pthread_once_t once_init = PTHREAD_ONCE_INIT;
+#endif
     axutil_thread_once_t *control = AXIS2_MALLOC(allocator,
             sizeof(axutil_thread_once_t));
     if (!control)

Modified: webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/uuid_gen_unix.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/uuid_gen_unix.c?view=diff&rev=541565&r1=541564&r2=541565
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/uuid_gen_unix.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/util/src/platforms/unix/uuid_gen_unix.c Thu May 24 23:24:21 2007
@@ -236,7 +236,65 @@
 }
 
 #else
-# ifdef HAVE_STRUCT_LIFREQ  // Solaris-ish
+
+#ifdef IS_MACOSX  /* Darwin */
+
+#ifndef max
+# define        max(a,b)        ((a) > (b) ? (a) : (b))
+#endif /* !max */
+
+char * AXIS2_CALL
+axutil_uuid_get_mac_addr()
+{
+    struct ifconf ifc;
+    struct ifreq *ifr;
+    int sockfd;
+    char buffer[512], *cp, *cplim;
+
+    sockfd = socket(AF_INET, SOCK_DGRAM, 0);
+    if (sockfd < 0)
+    {
+        perror("socket failed");
+        return NULL;
+    }
+
+    ifc.ifc_len = 512;
+    ifc.ifc_buf = buffer;
+
+    if (ioctl(sockfd, SIOCGIFCONF, (char *)&ifc) < 0)
+    {
+        perror("ioctl error");
+        close(sockfd);
+        return NULL;
+    }
+
+    ifr = ifc.ifc_req;
+
+    cplim = buffer + ifc.ifc_len;
+
+    char * macaddr = NULL;
+
+    for (cp = buffer; cp < cplim && macaddr == NULL;)
+    {
+        ifr = (struct ifreq *)cp;
+        if (ifr->ifr_addr.sa_family == AF_LINK)
+        {
+            struct sockaddr_dl *sdl = (struct sockaddr_dl *) & ifr->ifr_addr;
+
+            /* just take the ethernet adapters */
+            if (sdl->sdl_type == IFT_ETHER)
+            {
+                macaddr = (char *)ether_ntoa(LLADDR(sdl));
+            }
+        }
+        cp += sizeof(ifr->ifr_name) + max(sizeof(ifr->ifr_addr), ifr->ifr_addr.sa_len);
+
+    }
+
+    close(sockfd);
+    return macaddr;
+}
+# else /* Solaris-ish */
 
 /* code modified from that posted on:
 * http://forum.sun.com/jive/thread.jspa?threadID=84804&tstart=30
@@ -244,7 +302,6 @@
 char * AXIS2_CALL
 axutil_uuid_get_mac_addr()
 {
-    unsigned char eth_addr[6];
     int sock;
     int i;
     struct lifconf lic;
@@ -304,64 +361,6 @@
     close(sock);
     free(lifrs);
     return NULL;
-}
-
-# else    // Darwin
-
-#ifndef max
-# define        max(a,b)        ((a) > (b) ? (a) : (b))
-#endif /* !max */
-
-char * AXIS2_CALL
-axutil_uuid_get_mac_addr()
-{
-    struct ifconf ifc;
-    struct ifreq *ifr;
-    int sockfd;
-    char buffer[512], *cp, *cplim;
-
-    sockfd = socket(AF_INET, SOCK_DGRAM, 0);
-    if (sockfd < 0)
-    {
-        perror("socket failed");
-        return NULL;
-    }
-
-    ifc.ifc_len = 512;
-    ifc.ifc_buf = buffer;
-
-    if (ioctl(sockfd, SIOCGIFCONF, (char *)&ifc) < 0)
-    {
-        perror("ioctl error");
-        close(sockfd);
-        return NULL;
-    }
-
-    ifr = ifc.ifc_req;
-
-    cplim = buffer + ifc.ifc_len;
-
-    char * macaddr = NULL;
-
-    for (cp = buffer; cp < cplim && macaddr == NULL;)
-    {
-        ifr = (struct ifreq *)cp;
-        if (ifr->ifr_addr.sa_family == AF_LINK)
-        {
-            struct sockaddr_dl *sdl = (struct sockaddr_dl *) & ifr->ifr_addr;
-
-            /* just take the ethernet adapters */
-            if (sdl->sdl_type == IFT_ETHER)
-            {
-                macaddr = (char *)ether_ntoa(LLADDR(sdl));
-            }
-        }
-        cp += sizeof(ifr->ifr_name) + max(sizeof(ifr->ifr_addr), ifr->ifr_addr.sa_len);
-
-    }
-
-    close(sockfd);
-    return macaddr;
 }
 # endif
 #endif



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org