Portability fixes: don't declare library functions, include
appropriate headers. Also remove some unused declarations.
This commit is contained in:
parent
56dce5a8c4
commit
4ce5f988d0
13 changed files with 19 additions and 156 deletions
|
@ -33,8 +33,10 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef _WIN32
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netdb.h>
|
||||
|
@ -50,9 +52,6 @@ hostaddr(name, addr)
|
|||
s_char *name;
|
||||
struct sockaddr_in *addr;
|
||||
{
|
||||
#ifndef _WIN32
|
||||
extern u_long inet_addr();
|
||||
#endif
|
||||
struct hostent *hp;
|
||||
|
||||
if (name == 0 || *name == 0)
|
||||
|
@ -80,9 +79,6 @@ s_char *name;
|
|||
struct sockaddr_in *addr;
|
||||
{
|
||||
struct servent *sp;
|
||||
#ifndef _WIN32
|
||||
int atoi();
|
||||
#endif
|
||||
|
||||
if (name == 0 || *name == 0)
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue