Export swtich_inet_ntop so modules can use it

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13738 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Mathieu Rene 2009-06-10 00:04:29 +00:00
parent a7a726a887
commit 374997f2c1
2 changed files with 7 additions and 4 deletions

View File

@ -577,6 +577,12 @@ int switch_inet_pton(int af, const char *src, void *dst);
#endif #endif
#endif #endif
#ifndef _MSC_VER
#define switch_inet_ntop inet_ntop
#else
SWITCH_DECLARE(const char *) switch_inet_ntop(int af, void const *src, char *dst, size_t size);
SWITCH_END_EXTERN_C SWITCH_END_EXTERN_C
#endif #endif
/* For Emacs: /* For Emacs:

View File

@ -1080,9 +1080,6 @@ SWITCH_DECLARE(const char *) switch_priority_name(switch_priority_t priority)
static char RFC2833_CHARS[] = "0123456789*#ABCDF"; static char RFC2833_CHARS[] = "0123456789*#ABCDF";
#ifndef _MSC_VER
#define switch_inet_ntop inet_ntop
#else
/* Copyright (c) 1996 by Internet Software Consortium. /* Copyright (c) 1996 by Internet Software Consortium.
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
@ -1125,7 +1122,7 @@ static const char *switch_inet_ntop6(const unsigned char *src, char *dst, size_t
* author: * author:
* Paul Vixie, 1996. * Paul Vixie, 1996.
*/ */
const char *switch_inet_ntop(int af, void const *src, char *dst, size_t size) SWITCH_DECLARE(const char *) switch_inet_ntop(int af, void const *src, char *dst, size_t size)
{ {
switch (af) { switch (af) {