Fix the problem that windows xp does not have inet_ntop and inet_pton. Do not use the system provided functions on Windows Vista and above.
This commit was SVN r25111.
Этот коммит содержится в:
родитель
9d5afc58c6
Коммит
4dc832e65f
@ -31,7 +31,7 @@
|
||||
* 0 if the address wasn't valid (`dst' is untouched in this case)
|
||||
* -1 if some other error occurred (`dst' is untouched in this case, too)
|
||||
*/
|
||||
int inet_pton(int af, const char *src, void *dst)
|
||||
int ompi_inet_pton(int af, const char *src, void *dst)
|
||||
{
|
||||
int addr_len;
|
||||
struct sockaddr sa;
|
||||
@ -77,7 +77,7 @@ int inet_pton(int af, const char *src, void *dst)
|
||||
* return:
|
||||
* pointer to presentation format address (`dst'), or NULL.
|
||||
*/
|
||||
const char *inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
const char *ompi_inet_ntop(int af, const void *src, char *dst, size_t size)
|
||||
{
|
||||
int addr_len;
|
||||
struct sockaddr sa;
|
||||
|
@ -27,9 +27,9 @@
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
OPAL_DECLSPEC int inet_pton(int af, const char *src, void *dst);
|
||||
OPAL_DECLSPEC int ompi_inet_pton(int af, const char *src, void *dst);
|
||||
|
||||
OPAL_DECLSPEC const char *inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
OPAL_DECLSPEC const char *ompi_inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
|
@ -150,6 +150,8 @@ typedef unsigned int uint;
|
||||
#define lrand48 rand
|
||||
#define usleep(t) Sleep(t/1000)
|
||||
#define posix_memalign(p, a, s) *p=_aligned_malloc(s,a)
|
||||
#define inet_ntop ompi_inet_ntop
|
||||
#define inet_pton ompi_inet_pton
|
||||
|
||||
#else
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user