Code cleanup

This commit is contained in:
llsth 2015-03-19 09:46:23 +01:00
parent 242bece882
commit 0c41dc4f20
2 changed files with 2 additions and 43 deletions

View File

@ -41,8 +41,6 @@
* provided by system if the system supports IPv6. Otherwise, use this
* implementation.
*
* This program is intended to be used in combination with GNU Autoconf.
*
* This program also provides freeaddrinfo() and gai_strerror().
*
* Restriction:
@ -50,26 +48,10 @@
* safe, unless the cpp macro ENABLE_PTHREAD is defined.
*/
/*
* Add the following code to your configure.ac (or configure.in).
* AC_C_CONST
* AC_HEADER_STDC
* AC_CHECK_HEADERS(string.h memory.h stdlib.h)
* AC_CHECK_FUNCS(memcpy)
* AC_REPLACE_FUNCS(memset)
* AC_TYPE_SOCKLEN_T
* AC_TYPE_IN_PORT_T
* AC_DECL_H_ERRNO
*
* AC_CHECK_FUNCS(getaddrinfo getnameinfo)
* if test "$ac_cv_func_getaddrinfo$ac_cv_func_getnameinfo" != yesyes ; then
* LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
* fi
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <sys/types.h>
#include <sys/socket.h>
@ -80,15 +62,6 @@
#include "ntimed.h"
#include "agetaddrinfo.h"
#if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
#include <string.h>
#if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
#include <memory.h>
#endif /* not STDC_HEADERS and HAVE_MEMORY_H */
#else /* not STDC_HEADERS and not HAVE_STRING_H */
#include <strings.h>
#endif /* not STDC_HEADERS and not HAVE_STRING_H */
#ifdef ENABLE_PTHREAD
#include <pthread.h>
#endif
@ -97,21 +70,6 @@
#include <libintl.h>
#endif
#ifndef HAVE_MEMCPY
#define memcpy(d, s, n) bcopy((s), (d), (n))
#ifdef __STDC__
void *memchr(const void *, int, size_t);
int memcmp(const void *, const void *, size_t);
void *memmove(void *, const void *, size_t);
void *memset(void *, int, size_t);
#else /* not __STDC__ */
char *memchr();
int memcmp();
char *memmove();
char *memset();
#endif /* not __STDC__ */
#endif /* not HAVE_MEMCPY */
#ifdef ENABLE_NLS
#define _(string) gettext(string)
#ifdef gettext_noop

View File

@ -1,4 +1,5 @@
/*
* Copyright (c) 2015 Carsten Larsen
* Copyright (c) 2001, 02 Motoyuki Kasahara
*
* Redistribution and use in source and binary forms, with or without