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 na...@apache.org on 2006/02/08 05:00:40 UTC

svn commit: r375842 - in /webservices/axis2/trunk/c/modules: core/transport/http/server/ platforms/windows/ util/

Author: nandika
Date: Tue Feb  7 20:00:38 2006
New Revision: 375842

URL: http://svn.apache.org/viewcvs?rev=375842&view=rev
Log:
modified for compiling on win32

Modified:
    webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
    webservices/axis2/trunk/c/modules/platforms/windows/axis2_getopt_windows.h
    webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h
    webservices/axis2/trunk/c/modules/platforms/windows/getopt_windows.c
    webservices/axis2/trunk/c/modules/util/class_loader.c
    webservices/axis2/trunk/c/modules/util/network_handler.c

Modified: webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c?rev=375842&r1=375841&r2=375842&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c (original)
+++ webservices/axis2/trunk/c/modules/core/transport/http/server/http_server_main.c Tue Feb  7 20:00:38 2006
@@ -16,6 +16,7 @@
  
 #include <axis2_http_server.h>
 #include <axis2_http_transport.h>
+#include <axis2_platform_auto_sense.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <axis2_error_default.h>
@@ -42,7 +43,7 @@
 	}
 	if(NULL != allocator)
 	{
-		free(allocator);
+	/*	axis2_allocator_free(allocator); */
 	}
 	_exit(status);
 }
@@ -54,7 +55,6 @@
 	axis2_transport_receiver_t *server = NULL;
     extern char *optarg;
     extern int optopt;
-	char tmp_str[512];
     int c;
 
     axis2_log_levels_t log_level = AXIS2_LOG_LEVEL_DEBUG;
@@ -62,7 +62,7 @@
     axis2_char_t *repo_path = "../";
 	axis2_http_socket_read_timeout = AXIS2_HTTP_DEFAULT_SO_TIMEOUT;
 
-    while ((c = getopt(argc, argv, ":p:r:ht:l:")) != -1)
+    while ((c = AXIS2_GETOPT(argc, argv, ":p:r:ht:l:")) != -1)
     {
         
         switch(c)

Modified: webservices/axis2/trunk/c/modules/platforms/windows/axis2_getopt_windows.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/axis2_getopt_windows.h?rev=375842&r1=375841&r2=375842&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/axis2_getopt_windows.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/axis2_getopt_windows.h Tue Feb  7 20:00:38 2006
@@ -1,6 +1,7 @@
 #ifndef _AXIS2_GETOPT_WINDOWS_H_
 #define _AXIS2_GETOPT_WINDOWS_H_
 
+#include <axis2_defines.h>
 /**
  * @file axis2_getopt_windows.h
  * @brief windows cutdown version of getopt function in unix
@@ -15,9 +16,9 @@
  * @{
  */
 
-extern int	opterr;
-extern int 	optopt;	
-extern char	*optarg;
+AXIS2_DECLARE_DATA  int	opterr;
+AXIS2_DECLARE_DATA  int 	optopt;	
+AXIS2_DECLARE_DATA  char	*optarg;
 
 /**
   * return and log error
@@ -35,7 +36,7 @@
   * @param __shortopts options
   * @return option char if successful, -1 if over, ':' or '?' if error
   */
-int axis2_getopt(int __argc, char * const *__argv, const char *__shortopts);
+AXIS2_DECLARE(int) axis2_getopt(int __argc, char * const *__argv, const char *__shortopts);
 
 /** @} */
 

Modified: webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h?rev=375842&r1=375841&r2=375842&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h Tue Feb  7 20:00:38 2006
@@ -160,7 +160,7 @@
 #define AXIS2_R_OK 04 /* test for read permission */
 #define AXIS2_W_OK 02 /* test for write permission */
 #define AXIS2_X_OK 00 /* test for execute or search permission */
-#define AXIS2_F_OK 01 /* test whether the directories leading to the file can be 
+#define AXIS2_F_OK 00 /* test whether the directories leading to the file can be 
                       searched and the file exists */
 /**
   * windows specific directory handling functions

Modified: webservices/axis2/trunk/c/modules/platforms/windows/getopt_windows.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/getopt_windows.c?rev=375842&r1=375841&r2=375842&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/getopt_windows.c (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/getopt_windows.c Tue Feb  7 20:00:38 2006
@@ -6,9 +6,10 @@
 
 int		opterr = 1; /*default - log error*/
 int		optind = 1;
+/*
 int		optopt;
 char	*optarg;
-
+*/
 #define AXIS2_OPT_ERR_NO_ARG			1
 #define	AXIS2_OPT_ERR_INVALID_OPTION	2
 #define AXIS2_OPT_ERR_BAD_ARG			3
@@ -36,7 +37,7 @@
 	return (int)'?';
 }
 
-int axis2_getopt(int __argc, char * const *__argv, const char *__shortopts)
+AXIS2_DECLARE(int) axis2_getopt(int __argc, char * const *__argv, const char *__shortopts)
 {
 	static char *pos = "";
 	char *olstindex;	

Modified: webservices/axis2/trunk/c/modules/util/class_loader.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/class_loader.c?rev=375842&r1=375841&r2=375842&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/class_loader.c (original)
+++ webservices/axis2/trunk/c/modules/util/class_loader.c Tue Feb  7 20:00:38 2006
@@ -232,10 +232,12 @@
     dl_handler = AXIS2_PLATFORM_LOADLIB(dll_name);
     if(NULL == dl_handler)
     {
+        /*
         axis2_char_t *errormsg = NULL;
-        /* Diagnose the encountered error. */
+       
         errormsg =  (axis2_char_t *) dlerror ();
         printf("errormsg:%s\n", errormsg);
+        */
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_DLL_LOADING_FAILED, 
             AXIS2_FAILURE);
         return AXIS2_FAILURE;

Modified: webservices/axis2/trunk/c/modules/util/network_handler.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/network_handler.c?rev=375842&r1=375841&r2=375842&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/network_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/network_handler.c Tue Feb  7 20:00:38 2006
@@ -85,9 +85,11 @@
 	axis2_socket_t sock = AXIS2_INVALID_SOCKET;
 	axis2_socket_t i = 0;
 	struct sockaddr_in sock_addr;
+	int err_code = 0;
 		
 	AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
 	sock = socket(AF_INET, SOCK_STREAM, 0);
+	err_code = WSAGetLastError();
 	if(sock < 0)
 	{
 		AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_SOCKET_ERROR, AXIS2_FAILURE);