You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-commits@axis.apache.org by na...@apache.org on 2010/06/01 18:36:08 UTC
svn commit: r950151 - in /axis/axis2/c/core/trunk/util:
include/platforms/os400/axutil_os400.h include/platforms/unix/axutil_unix.h
include/platforms/windows/axutil_windows.h src/network_handler.c
Author: nadiramra
Date: Tue Jun 1 16:36:08 2010
New Revision: 950151
URL: http://svn.apache.org/viewvc?rev=950151&view=rev
Log:
AXIS2C-1467 Dangerous macros defs in axutil_unix.h and axutil_windows.h
Modified:
axis/axis2/c/core/trunk/util/include/platforms/os400/axutil_os400.h
axis/axis2/c/core/trunk/util/include/platforms/unix/axutil_unix.h
axis/axis2/c/core/trunk/util/include/platforms/windows/axutil_windows.h
axis/axis2/c/core/trunk/util/src/network_handler.c
Modified: axis/axis2/c/core/trunk/util/include/platforms/os400/axutil_os400.h
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/include/platforms/os400/axutil_os400.h?rev=950151&r1=950150&r2=950151&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/include/platforms/os400/axutil_os400.h (original)
+++ axis/axis2/c/core/trunk/util/include/platforms/os400/axutil_os400.h Tue Jun 1 16:36:08 2010
@@ -140,7 +140,7 @@ extern char AXIS2_PLATFORM_XML_ENTITY_RE
#define AXIS2_STRRCHR(x, y) (strrchr(x, y))
-#define AXIS2_PLATFORM_SLEEP(x) sleep(0);
+#define AXIS2_PLATFORM_SLEEP(x) sleep(0)
/** sleep function abstraction */
#define AXIS2_SLEEP sleep
@@ -249,7 +249,7 @@ static int os400_ftime(struct os400_time
#define AXIS2_INADDR_NONE (in_addr_t)-1
#define axis2_unsigned_short_t uint16_t
#define AXIS2_CLOSE_SOCKET(sock) close(sock)
-#define AXIS2_CLOSE_SOCKET_ON_EXIT(sock) fcntl(sock,F_SETFD, FD_CLOEXEC);
+#define AXIS2_CLOSE_SOCKET_ON_EXIT(sock) fcntl(sock,F_SETFD, FD_CLOEXEC)
#define axis2_socket_len_t socklen_t
#define AXIS2_SHUT_WR SHUT_WR
@@ -258,7 +258,7 @@ static int os400_ftime(struct os400_time
/** minizip functions */
#define axis2_fill_win32_filefunc(ffunc)
-#define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+#define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
/**
* handling variable number of arguments (for log.c)
Modified: axis/axis2/c/core/trunk/util/include/platforms/unix/axutil_unix.h
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/include/platforms/unix/axutil_unix.h?rev=950151&r1=950150&r2=950151&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/include/platforms/unix/axutil_unix.h (original)
+++ axis/axis2/c/core/trunk/util/include/platforms/unix/axutil_unix.h Tue Jun 1 16:36:08 2010
@@ -141,7 +141,7 @@ extern "C"
#define AXIS2_STRRCHR(x, y) (strrchr(x, y))
-#define AXIS2_PLATFORM_SLEEP(x) sleep(0);
+#define AXIS2_PLATFORM_SLEEP(x) sleep(0)
/** sleep function abstraction */
#define AXIS2_SLEEP sleep
@@ -253,7 +253,7 @@ extern "C"
#define AXIS2_INADDR_NONE (in_addr_t)-1
#define axis2_unsigned_short_t uint16_t
#define AXIS2_CLOSE_SOCKET(sock) close(sock)
-#define AXIS2_CLOSE_SOCKET_ON_EXIT(sock) fcntl(sock,F_SETFD, FD_CLOEXEC);
+#define AXIS2_CLOSE_SOCKET_ON_EXIT(sock) fcntl(sock,F_SETFD, FD_CLOEXEC)
#define axis2_socket_len_t socklen_t
#define AXIS2_SHUT_WR SHUT_WR
@@ -262,7 +262,7 @@ extern "C"
/** minizip functions */
#define axis2_fill_win32_filefunc(ffunc)
-#define AXIS2_UNZOPEN2(zipfilename,ffunc) unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc));
+#define AXIS2_UNZOPEN2(zipfilename,ffunc) do { unzOpen2(zipfilename,NULL); memset(&ffunc, 0, sizeof(ffunc)); } while (0)
/**
* handling variable number of arguments (for log.c)
Modified: axis/axis2/c/core/trunk/util/include/platforms/windows/axutil_windows.h
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/include/platforms/windows/axutil_windows.h?rev=950151&r1=950150&r2=950151&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/include/platforms/windows/axutil_windows.h (original)
+++ axis/axis2/c/core/trunk/util/include/platforms/windows/axutil_windows.h Tue Jun 1 16:36:08 2010
@@ -149,10 +149,10 @@ extern "C"
#define AXIS2_STRRCHR(x, y) (strrchr(x, y))
-#define AXIS2_PLATFORM_SLEEP(x) Sleep(0);
+#define AXIS2_PLATFORM_SLEEP(x) Sleep(0)
#define AXIS2_SLEEP(x) Sleep((x)*1000)
-#define AXIS2_USLEEP(x) Sleep((x)/1000);
+#define AXIS2_USLEEP(x) Sleep((x)/1000)
/**
* Get the last error code from the system.
@@ -160,7 +160,7 @@ extern "C"
* and that it returns a long
* @return long the last error message for this thread
*/
-#define AXIS2_GETLASTERROR GetLastError();
+#define AXIS2_GETLASTERROR GetLastError()
/**
* From the last error number get a sensible std::string representing it
Modified: axis/axis2/c/core/trunk/util/src/network_handler.c
URL: http://svn.apache.org/viewvc/axis/axis2/c/core/trunk/util/src/network_handler.c?rev=950151&r1=950150&r2=950151&view=diff
==============================================================================
--- axis/axis2/c/core/trunk/util/src/network_handler.c (original)
+++ axis/axis2/c/core/trunk/util/src/network_handler.c Tue Jun 1 16:36:08 2010
@@ -160,7 +160,8 @@ axutil_network_handler_create_server_soc
#endif
/* Exec behaviour */
- AXIS2_CLOSE_SOCKET_ON_EXIT(sock) memset(&sock_addr, 0, sizeof(sock_addr));
+ AXIS2_CLOSE_SOCKET_ON_EXIT(sock);
+ memset(&sock_addr, 0, sizeof(sock_addr));
sock_addr.sin_family = AF_INET;
sock_addr.sin_addr.s_addr = htonl(INADDR_ANY);
@@ -369,7 +370,8 @@ axutil_network_handler_create_dgram_svr_
}
#endif
/* Exec behaviour */
- AXIS2_CLOSE_SOCKET_ON_EXIT(sock) memset(&sock_addr, 0, sizeof(sock_addr));
+ AXIS2_CLOSE_SOCKET_ON_EXIT(sock);
+ memset(&sock_addr, 0, sizeof(sock_addr));
sock_addr.sin_family = AF_INET;
sock_addr.sin_addr.s_addr = htonl(INADDR_ANY);
@@ -607,7 +609,8 @@ axutil_network_hadler_create_multicast_s
#endif
/* Exec behaviour */
- AXIS2_CLOSE_SOCKET_ON_EXIT(sock) memset(&sock_addr, 0, sizeof(sock_addr));
+ AXIS2_CLOSE_SOCKET_ON_EXIT(sock);
+ memset(&sock_addr, 0, sizeof(sock_addr));
sock_addr.sin_family = AF_INET;
sock_addr.sin_addr.s_addr = htonl(INADDR_ANY);