~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to libatalk/compat/inet_aton.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: inet_aton.c,v 1.3 2001/06/29 14:14:46 rufustfirefly Exp $
 
3
 */
 
4
 
 
5
#ifdef HAVE_CONFIG_H
 
6
#include "config.h"
 
7
#endif /* HAVE_CONFIG_H */
 
8
 
 
9
#include <sys/types.h>
 
10
#include <netinet/in.h>
 
11
#include <arpa/inet.h>
 
12
 
 
13
static int _inet_aton_dummy;
 
14
 
 
15
#if defined(ultrix) || (defined(sun) && defined(__svr4__))
 
16
#ifndef INADDR_NONE
 
17
#define INADDR_NONE ((unsigned) 0xffffffff)
 
18
#endif /* ! INADDR_NONE */
 
19
 
 
20
int inet_aton(const char *name, struct in_addr *addr)
 
21
{
 
22
  if ((addr->s_addr = inet_addr(name)) == htonl(INADDR_NONE))
 
23
    return 0;
 
24
 
 
25
  return 1;
 
26
}
 
27
#endif /* ultrix || ( sun && __svr4__ ) */