shishi-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS shishi/gl


From: shishi-commit
Subject: CVS shishi/gl
Date: Fri, 17 Sep 2004 13:34:43 +0200

Update of /home/cvs/shishi/gl
In directory dopio:/tmp/cvs-serv21044/gl

Modified Files:
        Makefile.am 
Added Files:
        inet_r.c inet_r.h xinet.c xinet.h 
Log Message:
Add.

--- /home/cvs/shishi/gl/Makefile.am     2004/09/02 19:43:29     1.41
+++ /home/cvs/shishi/gl/Makefile.am     2004/09/17 11:34:42     1.42
@@ -10,7 +10,7 @@
 # Generated by gnulib-tool.
 #
 # Invoked as: gnulib-tool --import
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl 
--m4-base=gl/m4 --libtool alloca allocsa error exit exitfail extensions getdate 
getdomainname gethostname getline getopt getpass getsubopt gettext gettime 
gettimeofday mktime progname readlink realloc restrict setenv stdbool strcase 
strchrnul strdup strndup strnlen timegm time_r timespec unlocked-io vasnprintf 
vasprintf xalloc xalloc-die xgetdomainname xgethostname xreadlink xsize xstrndup
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl 
--m4-base=gl/m4 --libtool alloca allocsa error exit exitfail extensions getdate 
getdomainname gethostname getline getopt getpass getsubopt gettext gettime 
gettimeofday inet_r mktime progname readlink realloc restrict setenv stdbool 
strcase strchrnul strdup strndup strnlen timegm time_r timespec unlocked-io 
vasnprintf vasprintf xalloc xalloc-die xgetdomainname xgethostname xinet 
xreadlink xsize xstrndup
 
 AUTOMAKE_OPTIONS = 1.8 gnits
 
@@ -75,6 +75,8 @@
 libgnu_la_SOURCES += gettime.c
 
 
+libgnu_la_SOURCES += inet_r.h inet_r.c
+
 
 libgnu_la_SOURCES += progname.h progname.c
 
@@ -123,6 +125,8 @@
 
 libgnu_la_SOURCES += xgethostname.h xgethostname.c
 
+libgnu_la_SOURCES += xinet.h xinet.c
+
 libgnu_la_SOURCES += xreadlink.h xreadlink.c
 
 libgnu_la_SOURCES += xsize.h

--- /home/cvs/shishi/gl/inet_r.c        2004/09/17 11:34:43     NONE
+++ /home/cvs/shishi/gl/inet_r.c        2004/09/17 11:34:43     1.1
/* inet_r.c -- Thread safe version of arpa/inet.h function inet_ntoa.
   Copyright (C) 2004 Free Software Foundation, Inc.
   Written by Simon Josefsson.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

/* Specification. */
#include "inet_r.h"

/* Convert the Internet host address IN given in network byte order to
   a string in standard numbers-and-dots notation.  The string is
   stored in the provided buffer BUF, which must have room for at
   least 16 bytes ("ddd.ddd.ddd.ddd\0").  A pointer to BUF is
   returned. */
char *
inet_ntoa_r (struct in_addr in, char *buf)
{
  unsigned char *p;

  p = (unsigned char *) &in.s_addr;
  snprintf (buf, 16, "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);

  return buf;
}
--- /home/cvs/shishi/gl/inet_r.h        2004/09/17 11:34:43     NONE
+++ /home/cvs/shishi/gl/inet_r.h        2004/09/17 11:34:43     1.1
/* inet_r.h -- Thread safe version of arpa/inet.h function inet_ntoa.
   Copyright (C) 2004 Free Software Foundation, Inc.
   Written by Simon Josefsson.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifndef INET_R_H
# define INET_R_H

/* Get struct in_addr. */
#include <arpa/inet.h>

/* Convert the Internet host address IN given in network byte order to
   a string in standard numbers-and-dots notation.  The string is
   stored in the provided buffer BUF, which must have room for at
   least 16 bytes ("ddd.ddd.ddd.ddd\0").  A pointer to BUF is
   returned. */
char *inet_ntoa_r (struct in_addr in, char *buf);

#endif /* INET_R_H */
--- /home/cvs/shishi/gl/xinet.c 2004/09/17 11:34:43     NONE
+++ /home/cvs/shishi/gl/xinet.c 2004/09/17 11:34:43     1.1
/* xinet.c -- arpa/inet.h function inet_ntoa that allocate output buffer.
   Copyright (C) 2004 Free Software Foundation, Inc.
   Written by Simon Josefsson.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

/* Specification. */
#include "xinet.h"

/* Get inet_ntoa_r. */
#include "inet_r.h"

/* Get xmalloc. */
#include "xalloc.h"

char *
xinet_ntoa (struct in_addr in)
{
  char *p = xmalloc (16);
  return inet_ntoa_r (in, p);
}
--- /home/cvs/shishi/gl/xinet.h 2004/09/17 11:34:43     NONE
+++ /home/cvs/shishi/gl/xinet.h 2004/09/17 11:34:43     1.1
/* xinet.h -- arpa/inet.h function inet_ntoa that allocate output buffer.
   Copyright (C) 2004 Free Software Foundation, Inc.
   Written by Simon Josefsson.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

#ifndef XINET_H
# define XINET_H

/* Get struct in_addr. */
#include <arpa/inet.h>

/* Convert the Internet host address IN given in network byte order to
   a string in standard numbers-and-dots notation.  The string is
   newly allocated, with error checking, and must be deallocate by the
   caller. */
char *xinet_ntoa (struct in_addr in);

#endif /* XINET_H */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]