~lastrosade/jsthttpd

4137ce3e0e3b6cc574f7c9214dd90b5127e070be — Anthony G. Basile 9 years ago 24ccbc0
configure.ac: remove strerror and check hstrerror
2 files changed, 2 insertions(+), 46 deletions(-)

M configure.ac
D src/strerror.c
M configure.ac => configure.ac +2 -6
@@ 1,5 1,5 @@
AC_PREREQ([2.68])
AC_INIT([sthttpd], [2.26], [httpd://bugs.gentoo.org])
AC_INIT([sthttpd], [2.26], [http://opensource.dyc.edu/bugzilla3])
AC_CONFIG_SRCDIR([src/thttpd.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11 foreign])


@@ 11,6 11,7 @@ AC_PROG_INSTALL
# Checks for libraries.
AC_CHECK_LIB(crypt, crypt)
AC_CHECK_LIB(rt, clock_gettime)
AC_CHECK_LIB(hstrerror, resolv)

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h fcntl.h grp.h memory.h netdb.h netinet/in.h osreldate.h paths.h poll.h stdlib.h string.h sys/devpoll.h sys/event.h sys/param.h sys/poll.h sys/socket.h sys/time.h syslog.h unistd.h])


@@ 44,8 45,3 @@ AC_CONFIG_FILES([Makefile
                 www/cgi-bin/Makefile])

AC_OUTPUT

dnl AC_CHECK_FUNC(hstrerror, , AC_CHECK_LIB(resolv, hstrerror, V_NETLIBS="-lresolv $V_NETLIBS"))
dnl AC_SUBST(V_NETLIBS)
dnl AC_REPLACE_FUNCS(strerror)


D src/strerror.c => src/strerror.c +0 -40
@@ 1,40 0,0 @@
/*
 * Copyright (c) 1988 Regents of the University of California.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms are permitted
 * provided that the above copyright notice and this paragraph are
 * duplicated in all such forms and that any documentation,
 * advertising materials, and other materials related to such
 * distribution and use acknowledge that the software was developed
 * by the University of California, Berkeley.  The name of the
 * University may not be used to endorse or promote products derived
 * from this software without specific prior written permission.
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include <config.h>

#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strerror.c  5.1 (Berkeley) 4/9/89";
#endif /* LIBC_SCCS and not lint */

//system libraries
#include <stdio.h>
#include <sys/types.h>

char *
strerror(errnum)
	int errnum;
{
	extern int sys_nerr;
	extern char *sys_errlist[];
	static char ebuf[20];

	if ((unsigned int)errnum < sys_nerr)
		return(sys_errlist[errnum]);
	(void)sprintf(ebuf, "Unknown error: %d", errnum);
	return(ebuf);
}