/* $NetBSD: nbcompat.h,v 1.37 2004/08/16 17:24:56 jlam Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if !HAVE_POLL # undef HAVE_POLL_H # undef HAVE_SYS_POLL_H # include #endif #if HAVE_DIRENT_H # include #else # define dirent direct # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif #if HAVE_NBCOMPAT_FTS # if HAVE_FTS_H # undef HAVE_FTS_H # endif # include #endif #if HAVE_ASSERT_H # include #endif #if HAVE_ERR_H # include #else # include #endif #if HAVE_NBCOMPAT_GLOB # if HAVE_GLOB_H # undef HAVE_GLOB_H # endif # include #endif #if HAVE_NBCOMPAT_REGEX # if HAVE_REGEX_H # undef HAVE_REGEX_H # endif # include #endif #if HAVE_SYS_MKDEV_H # include # if !defined(makedev) && defined(mkdev) # define makedev mkdev # endif #endif #if HAVE_TERMCAP_H # include #else int tgetent(char *, const char *); char *tgetstr(const char *, char **); int tgetflag(const char *); int tgetnum(const char *); char *tgoto(const char *, int, int); void tputs(const char *, int, int (*)(int)); #endif #if HAVE_NBCOMPAT_MD5INIT # if HAVE_MD5_H # undef HAVE_MD5_H # endif #endif #if HAVE_NBCOMPAT_MD5 # if HAVE_MD5_H # undef HAVE_MD5_H # endif # include #endif #if HAVE_NBCOMPAT_RMD160 # if HAVE_RMD160_H # undef HAVE_RMD160_H # endif # include #endif #if HAVE_NBCOMPAT_SHA1 # if HAVE_SHA1_H # undef HAVE_SHA1_H # endif # include #endif #if HAVE_NBCOMPAT_VIS # if HAVE_VIS_H # undef HAVE_VIS_H # endif # include #endif #if HAVE_NBCOMPAT_GETOPT_LONG # if HAVE_GETOPT_H # undef HAVE_GETOPT_H # endif # include #endif #if !HAVE_D_NAMLEN # ifndef DIRENT_MISSING_D_NAMLEN # define DIRENT_MISSING_D_NAMLEN # endif #endif #if !HAVE_ISBLANK int isblank(int); #endif #if HAVE_GETPASSPHRASE # ifndef getpass # define getpass getpassphrase # endif #endif #if !defined(MIN) # define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif #if !defined(MAX) # define MAX(a, b) ((a) < (b) ? (b) : (a)) #endif