diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-29 17:14:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-29 17:14:29 +0000 |
commit | b062f051ec5678a1f056656601715c9d047e6fc2 (patch) | |
tree | 71c7f38a076d8fe0249b4df681c3dbf493d499e9 /resolv/tst-aton.c | |
parent | d079f32126a4d1005a646dd907b4c791df7b0934 (diff) | |
download | glibc-b062f051ec5678a1f056656601715c9d047e6fc2.tar glibc-b062f051ec5678a1f056656601715c9d047e6fc2.tar.gz glibc-b062f051ec5678a1f056656601715c9d047e6fc2.tar.bz2 glibc-b062f051ec5678a1f056656601715c9d047e6fc2.zip |
Update.
1998-04-23 07:31 H.J. Lu <hjl@gnu.org>
* resolv/inet_addr.c (inet_aton): Use __strtoul_internal to
check overflow.
* resolv/Makefile (tests): New, add tst-aton.
* resolv/tst-aton.c: New file.
1998-04-29 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/sparc/sparc32/dl-machine.h (WEAKADDR): Add missing
semicolon.
* sysdeps/unix/sysv/linux/alpha/bits/signum.h: Add SIGCLD definition.
Diffstat (limited to 'resolv/tst-aton.c')
-rw-r--r-- | resolv/tst-aton.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/resolv/tst-aton.c b/resolv/tst-aton.c new file mode 100644 index 0000000000..818f9ed61b --- /dev/null +++ b/resolv/tst-aton.c @@ -0,0 +1,22 @@ +#include <stdio.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> + +enum { buf_size = 16 }; +static char buf[buf_size] = "323543357756889"; + +int +main (int argc, char *argv[]) +{ + struct in_addr addr; + int result = 0; + + if (inet_aton (buf, &addr) != 0) + { + printf ("%s is seen as a valid IP address\n", buf); + result = 1; + } + + return result; +} |