apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject cvs commit: apr/network_io/unix sockaddr.c
Date Mon, 05 Jul 2004 08:35:49 GMT
martin      2004/07/05 01:35:49

  Modified:    network_io/unix sockaddr.c
  Log:
  [Comment change only]: Allright. The warning was based on FreeBSD's
  man pages, meant to make users aware of subtleties in the format
  of IP addresses on different platforms, but Joe Orton showed in the
  link http://www.opengroup.org/onlinepubs/009695399/functions/inet_ntop.html
  that FreeBSD is not right in that respect. Remove comment again.
  
  Revision  Changes    Path
  1.54      +0 -13     apr/network_io/unix/sockaddr.c
  
  Index: sockaddr.c
  ===================================================================
  RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -u -r1.53 -r1.54
  --- sockaddr.c	25 Jun 2004 13:51:46 -0000	1.53
  +++ sockaddr.c	5 Jul 2004 08:35:49 -0000	1.54
  @@ -767,19 +767,6 @@
           if (shift < 0) {
               return APR_EBADIP;
           }
  -/*@@@ WARNING: BEWARE:
  -The man page for inet_pton()/inet_aton() et.al. says:
  -     All numbers supplied as ``parts'' in a `.' notation may be decimal,
  -     octal, or hexadecimal, as specified in the C language (i.e., a leading 0x
  -     or 0X implies hexadecimal; otherwise, a leading 0 implies octal; other-
  -     wise, the number is interpreted as decimal).
  -OTOH, "man atoi" says:
  -     The atoi() function [...] is equivalent to:
  -           (int)strtol(nptr, (char **)NULL, 10);
  -which forces interpretation as _decimal_. As a result, this routine will
  -interpret a string 0177.0000.0000.0001 as 177.0.0.1, while inet_pton()
  -will interpret it as 127.0.0.1!
  -@@@*/
           octet = atoi(s);
           if (octet < 0 || octet > 255) {
               return APR_EBADIP;
  
  
  

Mime
View raw message