From f9368f65b108264889d54855e687334f7e84f092 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 29 Jul 2012 14:56:52 +0000 Subject: [PATCH] win32.c: rb_w32_inet_ntop should be const * win32/win32.c (rb_w32_inet_ntop): type should be const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/socket/option.c | 2 +- include/ruby/win32.h | 2 +- win32/win32.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b9353d7e2..b78236750a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Jul 29 23:56:49 2012 Nobuyoshi Nakada + + * win32/win32.c (rb_w32_inet_ntop): type should be const. + Sun Jul 29 14:20:34 2012 Kazuki Tsujimoto * thread.c (Init_Thread): does not need to set klass diff --git a/ext/socket/option.c b/ext/socket/option.c index 4cef1c81c4..37315629f2 100644 --- a/ext/socket/option.c +++ b/ext/socket/option.c @@ -437,7 +437,7 @@ inspect_timeval_as_interval(int level, int optname, VALUE data, VALUE ret) */ #ifndef HAVE_INET_NTOP -static char * +static const char * inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) { #ifdef HAVE_INET_NTOA diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 7cbdb884df..718da1376c 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -266,7 +266,7 @@ extern int rb_w32_urename(const char *, const char *); extern char **rb_w32_get_environ(void); extern void rb_w32_free_environ(char **); extern int rb_w32_map_errno(DWORD); -extern char * WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t); +extern const char *WSAAPI rb_w32_inet_ntop(int,const void *,char *,size_t); extern DWORD rb_w32_osver(void); extern int chown(const char *, int, int); diff --git a/win32/win32.c b/win32/win32.c index 979b90e15c..458b613756 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -6532,7 +6532,7 @@ signbit(double x) #endif /* License: Ruby's */ -char * WSAAPI +const char * WSAAPI rb_w32_inet_ntop(int af, const void *addr, char *numaddr, size_t numaddr_len) { typedef char *(WSAAPI inet_ntop_t)(int, void *, char *, size_t);