From 648e82f05d8bce097f9f81b78d9df40f647f6170 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 26 Apr 2004 07:20:11 +0000 Subject: Major hostip.c cleanup and split into multiple files and easier #ifdef usage. --- lib/inet_ntop.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/inet_ntop.h (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h new file mode 100644 index 000000000..5948a120b --- /dev/null +++ b/lib/inet_ntop.h @@ -0,0 +1,37 @@ +#ifndef __INET_NTOP_H +#define __INET_NTOP_H +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * + * This software is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at http://curl.haxx.se/docs/copyright.html. + * + * You may opt to use, copy, modify, merge, publish, distribute and/or sell + * copies of the Software, and permit persons to whom the Software is + * furnished to do so, under the terms of the COPYING file. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + * $Id$ + ***************************************************************************/ + +#include "setup.h" + +#ifdef HAVE_INET_NTOP +#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,size) +#ifdef HAVE_ARPA_INET_H +#include +#endif +#else +const char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); +#endif + +#endif /* __INET_NTOP_H */ -- cgit v1.2.1 From bf87d13f5b94aed8876d2c950faeadf7e6636128 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 16 Mar 2005 02:25:12 +0000 Subject: Fixed some compiler warnings I should have noticed before. --- lib/inet_ntop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 5948a120b..eb66ae7fb 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -31,7 +31,7 @@ #include #endif #else -const char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); +char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); #endif #endif /* __INET_NTOP_H */ -- cgit v1.2.1 From ab4086bc244bf3267976e9f0193e5ed4430190d8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 31 Mar 2005 07:02:02 +0000 Subject: Updated the copyright year since changes have been this year. --- lib/inet_ntop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index eb66ae7fb..12165cd1b 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From 01cbf08064ff11486df847aea4548abb828841fb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 25 Nov 2005 22:20:02 +0000 Subject: Yang Tse: fixes the use of Curl_inet_ntop and Curl_inet_pton with no prototypes on some platforms, ie IRIX 6.2 MIPS C 6.2 --- lib/inet_ntop.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 12165cd1b..54d64bd19 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -25,13 +25,13 @@ #include "setup.h" +char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); + #ifdef HAVE_INET_NTOP -#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,size) #ifdef HAVE_ARPA_INET_H #include #endif -#else -char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); +#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,size) #endif #endif /* __INET_NTOP_H */ -- cgit v1.2.1 From 4650732f4a8590c8f6a00566510f9cdd656397a7 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 18 May 2009 12:25:45 +0000 Subject: Update copyright year, to force CVS to update the $Id date string format --- lib/inet_ntop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 54d64bd19..1bfc82b65 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2009, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms -- cgit v1.2.1 From 2cad095425e348c5115a1f747b9121742dea5474 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Thu, 6 Aug 2009 11:10:30 +0000 Subject: cast to fix 64bit build warnings. From manpage: POSIX.1-2001. Note that RFC 2553 defines a prototype where the last parameter cnt is of type size_t. Many systems follow RFC 2553. Glibc 2.0 and 2.1 have size_t, but 2.2 has socklen_t. --- lib/inet_ntop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 1bfc82b65..360ef3ae7 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -31,7 +31,7 @@ char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); #ifdef HAVE_ARPA_INET_H #include #endif -#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,size) +#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,(size_t)size) #endif #endif /* __INET_NTOP_H */ -- cgit v1.2.1 From 97c8bc975749dc9675ac6fc6278a617315d7ecaf Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Thu, 6 Aug 2009 12:02:00 +0000 Subject: fixed cast added with last commit. --- lib/inet_ntop.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 360ef3ae7..3d9f1dc76 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -31,7 +31,7 @@ char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); #ifdef HAVE_ARPA_INET_H #include #endif -#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,(size_t)size) +#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,(socklen_t)size) #endif #endif /* __INET_NTOP_H */ -- cgit v1.2.1 From 1cb921b7f38daebf1d21c8525735e6be58552607 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Fri, 7 Aug 2009 23:32:38 +0000 Subject: fix cast for some systems which are broken due to absense of socklen_t, therefore now use curl_socklen_t. --- lib/inet_ntop.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 3d9f1dc76..152bd7de8 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -31,7 +31,8 @@ char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); #ifdef HAVE_ARPA_INET_H #include #endif -#define Curl_inet_ntop(af,addr,buf,size) inet_ntop(af,addr,buf,(socklen_t)size) +#define Curl_inet_ntop(af,addr,buf,size) \ + inet_ntop(af,addr,buf,(curl_socklen_t)size) #endif #endif /* __INET_NTOP_H */ -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- lib/inet_ntop.h | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/inet_ntop.h') diff --git a/lib/inet_ntop.h b/lib/inet_ntop.h index 152bd7de8..8db9775c8 100644 --- a/lib/inet_ntop.h +++ b/lib/inet_ntop.h @@ -20,7 +20,6 @@ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * - * $Id$ ***************************************************************************/ #include "setup.h" -- cgit v1.2.1