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/03 13:01:25 UTC

svn commit: r374644 - in /webservices/axis2/trunk/c: include/ modules/core/engine/ modules/platforms/windows/ modules/util/

Author: nandika
Date: Fri Feb  3 04:01:00 2006
New Revision: 374644

URL: http://svn.apache.org/viewcvs?rev=374644&view=rev
Log:
changes done to compile for win32 

Modified:
    webservices/axis2/trunk/c/include/axis2_dir_handler.h
    webservices/axis2/trunk/c/include/axis2_log.h
    webservices/axis2/trunk/c/include/axis2_network_handler.h
    webservices/axis2/trunk/c/modules/core/engine/conf.c
    webservices/axis2/trunk/c/modules/platforms/windows/axis2_dir_windows.h
    webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h
    webservices/axis2/trunk/c/modules/platforms/windows/dir_windows.c
    webservices/axis2/trunk/c/modules/util/log.c
    webservices/axis2/trunk/c/modules/util/network_handler.c
    webservices/axis2/trunk/c/modules/util/stream.c

Modified: webservices/axis2/trunk/c/include/axis2_dir_handler.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_dir_handler.h?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_dir_handler.h (original)
+++ webservices/axis2/trunk/c/include/axis2_dir_handler.h Fri Feb  3 04:01:00 2006
@@ -50,7 +50,7 @@
      * @param pathname path  your modules or services folder
      * @return array list of contents of services or modules folder
      */
-    axis2_array_list_t *AXIS2_CALL
+    AXIS2_DECLARE(axis2_array_list_t *)
     axis2_dir_handler_list_service_or_module_dirs(axis2_env_t **env,
                                 axis2_char_t *pathname);
                                 

Modified: webservices/axis2/trunk/c/include/axis2_log.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_log.h?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_log.h (original)
+++ webservices/axis2/trunk/c/include/axis2_log.h Fri Feb  3 04:01:00 2006
@@ -96,12 +96,13 @@
         * @return satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE
         */
         axis2_status_t (AXIS2_CALL *write) (axis2_log_t *log, const axis2_char_t *buffer, axis2_log_levels_t level,const axis2_char_t *file,const int line);
-
-		axis2_status_t (AXIS2_CALL *log_critical) (axis2_log_t *log,const char *filename,const int linenumber,axis2_char_t *format,...);
-		axis2_status_t (AXIS2_CALL *log_error) (axis2_log_t *log,const char *filename,const int linenumber,axis2_char_t *format,...);
-		axis2_status_t (AXIS2_CALL *log_warning) (axis2_log_t *log,const char *filename,const int linenumber,axis2_char_t *format,...);
-		axis2_status_t (AXIS2_CALL *log_info) (axis2_log_t *log, axis2_char_t *format, ...);
-		axis2_status_t (AXIS2_CALL *log_debug) (axis2_log_t *log,const char *filename,const int linenumber,axis2_char_t *format,...);
+        /*
+		axis2_status_t (AXIS2_CALL *log_critical) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
+		axis2_status_t (AXIS2_CALL *log_error) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
+		axis2_status_t (AXIS2_CALL *log_warning) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
+		axis2_status_t (AXIS2_CALL *log_info) (struct axis2_log *log, axis2_char_t *format, ...);
+		axis2_status_t (AXIS2_CALL *log_debug) (struct axis2_log *log,const char *filename,const int linenumber,axis2_char_t *format,...);
+        */
     };
 
   /** 
@@ -122,15 +123,15 @@
 
     };
 
-axis2_status_t AXIS2_CALL axis2_log_impl_log_critical(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
+AXIS2_DECLARE(axis2_status_t) axis2_log_impl_log_critical(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
 
-axis2_status_t AXIS2_CALL axis2_log_impl_log_error(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
+AXIS2_DECLARE(axis2_status_t) axis2_log_impl_log_error(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
 
-axis2_status_t AXIS2_CALL axis2_log_impl_log_warning(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
+AXIS2_DECLARE(axis2_status_t) axis2_log_impl_log_warning(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
 
-axis2_status_t AXIS2_CALL axis2_log_impl_log_info(axis2_log_t *log, const axis2_char_t *format,...);
+AXIS2_DECLARE(axis2_status_t) axis2_log_impl_log_info(axis2_log_t *log, const axis2_char_t *format,...);
 
-axis2_status_t AXIS2_CALL axis2_log_impl_log_debug(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
+AXIS2_DECLARE(axis2_status_t) axis2_log_impl_log_debug(axis2_log_t *log,const axis2_char_t *filename,const int linenumber,const axis2_char_t *format,...);
 
 
 #define AXIS2_LOG_FREE(allocator, log) ((log->ops)->free(allocator, log))

Modified: webservices/axis2/trunk/c/include/axis2_network_handler.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2_network_handler.h?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2_network_handler.h (original)
+++ webservices/axis2/trunk/c/include/axis2_network_handler.h Fri Feb  3 04:01:00 2006
@@ -21,7 +21,6 @@
 #include <axis2_defines.h>
 #include <axis2_env.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 
 
 

Modified: webservices/axis2/trunk/c/modules/core/engine/conf.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/core/engine/conf.c?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/core/engine/conf.c (original)
+++ webservices/axis2/trunk/c/modules/core/engine/conf.c Fri Feb  3 04:01:00 2006
@@ -283,6 +283,8 @@
 axis2_conf_create (axis2_env_t **env)
 {
     axis2_conf_impl_t *config_impl = NULL;
+    axis2_status_t status = AXIS2_FAILURE;
+    axis2_phase_t *phase = NULL;
     AXIS2_ENV_CHECK(env, NULL);
     
 	config_impl = (axis2_conf_impl_t *) AXIS2_MALLOC ((*env)->allocator
@@ -299,7 +301,7 @@
     config_impl->modules = NULL;
     config_impl->engaged_modules = NULL;
     config_impl->in_phases_upto_and_including_post_dispatch = NULL;
-    axis2_phase_t *phase = NULL;
+   
     config_impl->out_phases = NULL;
     config_impl->in_faultphases = NULL;
     config_impl->out_faultphases = NULL;
@@ -310,7 +312,6 @@
     config_impl->faulty_modules = NULL;
     config_impl->axis2_repos = NULL;
     config_impl->conf.ops = NULL;
-    axis2_status_t status = AXIS2_FAILURE;
     
     config_impl->conf.param_container = (axis2_param_container_t *) 
         axis2_param_container_create(env);		

Modified: webservices/axis2/trunk/c/modules/platforms/windows/axis2_dir_windows.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/axis2_dir_windows.h?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/axis2_dir_windows.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/axis2_dir_windows.h Fri Feb  3 04:01:00 2006
@@ -87,6 +87,6 @@
 /**
   * Compare two `struct dirent's alphabetically
   */
-AXIS2_IMPORT int alphasort(const struct dirent **__d1, const struct dirent **__d2);
+AXIS2_DECLARE_DATA int alphasort(const struct dirent **__d1, const struct dirent **__d2);
 
 #endif /* READDIR_H */

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=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/axis2_windows.h Fri Feb  3 04:01:00 2006
@@ -168,6 +168,7 @@
   * network specific functions and defs
   */
 #define axis2_socket_t						SOCKET
+
 #define AXIS2_INVALID_SOCKET				INVALID_SOCKET
 #define AXIS2_INADDR_NONE					INADDR_NONE
 #define axis2_unsigned_short_t				u_short
@@ -175,9 +176,16 @@
 #define AXIS2_CLOSE_SOCKET_ON_EXIT(sock)	
 #define axis2_socket_len_t					int
 
+/**
+ * Platform specific environment variable access method
+ */
+#define AXIS2_GETENV(_env_var_name) getenv(_env_var_name)
+
 /**
   * handling variable number of arguments (for log.c)
   */
+  
+  
 #define AXIS2_VSNPRINTF		_vsnprintf
 
 /** @} */

Modified: webservices/axis2/trunk/c/modules/platforms/windows/dir_windows.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/platforms/windows/dir_windows.c?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/platforms/windows/dir_windows.c (original)
+++ webservices/axis2/trunk/c/modules/platforms/windows/dir_windows.c Fri Feb  3 04:01:00 2006
@@ -158,7 +158,7 @@
 	return 0;
 }
 
-int alphasort(const struct dirent **__d1, const struct dirent **__d2)
+AXIS2_DECLARE_DATA int alphasort(const struct dirent **__d1, const struct dirent **__d2)
 {
 	return strcoll((*__d1)->d_name,(*__d2)->d_name);
 }

Modified: webservices/axis2/trunk/c/modules/util/log.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/log.c?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/log.c (original)
+++ webservices/axis2/trunk/c/modules/util/log.c Fri Feb  3 04:01:00 2006
@@ -49,7 +49,7 @@
 	   	const axis2_char_t *buffer, axis2_log_levels_t level,
 	   	const axis2_char_t *file, const int line);
 
-axis2_status_t AXIS2_CALL axis2_log_impl_write_to_file(FILE *fd,
+AXIS2_DECLARE(axis2_status_t) axis2_log_impl_write_to_file(FILE *fd,
 	   	axis2_log_levels_t level, const axis2_char_t * file, const int line,
 	   	const axis2_char_t * value);
 
@@ -74,9 +74,12 @@
 	}
 	else
 	{
-		axis2_char_t *path = AXIS2_GETENV("AXIS2C_HOME");
-		axis2_char_t *filename = "/log/axis2.log";
-		int len = axis2_strlen(path) + axis2_strlen(filename)+1;
+	    axis2_char_t *filename = NULL;
+		axis2_char_t *path = NULL;
+		int len = 0;
+		path = AXIS2_GETENV("AXIS2C_HOME");
+		filename = "/log/axis2.log";
+		len = axis2_strlen(path) + axis2_strlen(filename)+1;
 		log_file_name = (axis2_char_t*)AXIS2_MALLOC(allocator,
                     len*sizeof(axis2_char_t));
     	memcpy(log_file_name, path, axis2_strlen(path)*sizeof(axis2_char_t));
@@ -104,12 +107,13 @@
         }
         log_impl->log.ops->free = axis2_log_impl_free;
         log_impl->log.ops->write = axis2_log_impl_write;
+		/*
 		log_impl->log.ops->log_critical = axis2_log_impl_log_critical;
 		log_impl->log.ops->log_error = axis2_log_impl_log_error;
 		log_impl->log.ops->log_warning = axis2_log_impl_log_warning;
 		log_impl->log.ops->log_info = axis2_log_impl_log_info;
 		log_impl->log.ops->log_debug = axis2_log_impl_log_debug;
-
+        */
     }
 
     return &(log_impl->log);
@@ -150,15 +154,17 @@
 }
 
 
-axis2_status_t AXIS2_CALL axis2_log_impl_write_to_file(FILE *fd, axis2_log_levels_t level,
+AXIS2_DECLARE(axis2_status_t)
+axis2_log_impl_write_to_file(FILE *fd, axis2_log_levels_t level,
 	   	const axis2_char_t *file, const int line, const axis2_char_t *value)
 {
+    char *level_str = "";
 	if (!fd)
 		return -1;
 	/**
       * print all critical and error logs irrespective of log->level setting
 	  */
-    char *level_str = "";
+    
     switch (level)
     {
     	case AXIS2_LOG_LEVEL_CRITICAL:
@@ -184,7 +190,7 @@
 	return 0;
 }
 
-axis2_status_t AXIS2_CALL 
+AXIS2_DECLARE(axis2_status_t)
 axis2_log_impl_log_debug(axis2_log_t *log, const axis2_char_t *filename,
 	   	const int linenumber, const axis2_char_t *format,...)
 {
@@ -212,7 +218,7 @@
 	return 0;
 }
 
-axis2_status_t AXIS2_CALL 
+AXIS2_DECLARE(axis2_status_t)
 axis2_log_impl_log_info(axis2_log_t *log, const axis2_char_t *format,...)
 {
 	FILE *fd = NULL;
@@ -237,7 +243,7 @@
 	return 0;
 }
 
-axis2_status_t AXIS2_CALL 
+AXIS2_DECLARE(axis2_status_t) 
 axis2_log_impl_log_warning(axis2_log_t *log, const axis2_char_t *filename,
 	   	const int linenumber, const axis2_char_t *format,...)
 {
@@ -265,12 +271,14 @@
 }
 
 
-axis2_status_t AXIS2_CALL 
+AXIS2_DECLARE(axis2_status_t)
 axis2_log_impl_log_error(axis2_log_t *log, const axis2_char_t *filename,
 	   	const int linenumber, const axis2_char_t *format,...)
 {
 	FILE *fd = NULL;
-	
+	char value[AXIS2_LEN_VALUE+1];
+   	va_list ap;
+   	
 	if (!log || !format)
 		return -1;
 	
@@ -279,8 +287,7 @@
 	if (NULL == (fd = AXIS2_INTF_TO_IMPL(log)->stream))
 		return -1;
 	
-	char value[AXIS2_LEN_VALUE+1];
-   	va_list ap;
+	
    	va_start(ap, format);
   	AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
    	va_end(ap);
@@ -289,12 +296,13 @@
 	return 0;
 }
 	
-axis2_status_t AXIS2_CALL 
+AXIS2_DECLARE(axis2_status_t) 
 axis2_log_impl_log_critical(axis2_log_t *log, const axis2_char_t *filename,
 	   	const int linenumber, const axis2_char_t *format,...)
 {
 	FILE *fd = NULL;
-	
+	char value[AXIS2_LEN_VALUE+1];
+   	va_list ap;
 	if (!log || !format)
 		return -1;
 	
@@ -303,8 +311,7 @@
 	if (NULL == (fd = AXIS2_INTF_TO_IMPL(log)->stream))
 		return -1;
 	
-	char value[AXIS2_LEN_VALUE+1];
-   	va_list ap;
+	
    	va_start(ap, format);
    	AXIS2_VSNPRINTF(value, AXIS2_LEN_VALUE, format, ap);
    	va_end(ap);

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=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/network_handler.c (original)
+++ webservices/axis2/trunk/c/modules/util/network_handler.c Fri Feb  3 04:01:00 2006
@@ -22,7 +22,7 @@
 #include <axis2_platform_auto_sense.h>
 
 
-axis2_socket_t AXIS2_CALL
+AXIS2_DECLARE( axis2_socket_t )
 axis2_network_handler_open_socket(axis2_env_t **env, char *server, int port)
 {
 	axis2_socket_t sock = AXIS2_INVALID_SOCKET;
@@ -79,7 +79,7 @@
 	return sock;
 }
 
-axis2_socket_t AXIS2_CALL
+AXIS2_DECLARE( axis2_socket_t )
 axis2_network_handler_create_server_socket(axis2_env_t **env, int port)
 {
 	axis2_socket_t sock = AXIS2_INVALID_SOCKET;

Modified: webservices/axis2/trunk/c/modules/util/stream.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/stream.c?rev=374644&r1=374643&r2=374644&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/stream.c (original)
+++ webservices/axis2/trunk/c/modules/util/stream.c Fri Feb  3 04:01:00 2006
@@ -625,6 +625,7 @@
 	/*len = fwrite(buffer, sizeof(axis2_char_t), count, fp);*/
     len = write(AXIS2_INTF_TO_IMPL(stream)->socket, buffer, count);
 	return len;
+	
 }