~ chicken-core (chicken-5) 7e796865ce202e4f652eb051994d6d3d19e10435
commit 7e796865ce202e4f652eb051994d6d3d19e10435 Author: Oleg Kolosov <bazurbat@gmail.com> AuthorDate: Sun Oct 19 17:36:00 2014 +0400 Commit: Peter Bex <peter.bex@xs4all.nl> CommitDate: Sun Oct 19 16:05:41 2014 +0200 Add missing "C_" prefix to a snprintf calls in a tcp module A functions ##net#getsockname and ##net#getpeername of the tcp module called bare snprintf without using the "C_" prefix which caused build errors on Windows platform when using MSVC. Signed-off-by: Peter Bex <peter.bex@xs4all.nl> diff --git a/tcp.scm b/tcp.scm index 5389ed12..99745d0f 100644 --- a/tcp.scm +++ b/tcp.scm @@ -188,7 +188,7 @@ EOF "int len = sizeof(struct sockaddr_in);" "if(getsockname(s, (struct sockaddr *)&sa, (socklen_t *)&len) != 0) C_return(NULL);" "ptr = (unsigned char *)&sa.sin_addr;" - "snprintf(addr_buffer, sizeof(addr_buffer), \"%d.%d.%d.%d\", ptr[ 0 ], ptr[ 1 ], ptr[ 2 ], ptr[ 3 ]);" + "C_snprintf(addr_buffer, sizeof(addr_buffer), \"%d.%d.%d.%d\", ptr[ 0 ], ptr[ 1 ], ptr[ 2 ], ptr[ 3 ]);" "C_return(addr_buffer);") ) (define ##net#getsockport @@ -212,7 +212,7 @@ EOF "unsigned int len = sizeof(struct sockaddr_in);" "if(getpeername(s, (struct sockaddr *)&sa, ((socklen_t *)&len)) != 0) C_return(NULL);" "ptr = (unsigned char *)&sa.sin_addr;" - "snprintf(addr_buffer, sizeof(addr_buffer), \"%d.%d.%d.%d\", ptr[ 0 ], ptr[ 1 ], ptr[ 2 ], ptr[ 3 ]);" + "C_snprintf(addr_buffer, sizeof(addr_buffer), \"%d.%d.%d.%d\", ptr[ 0 ], ptr[ 1 ], ptr[ 2 ], ptr[ 3 ]);" "C_return(addr_buffer);") ) (define ##net#startupTrap