view compat/pws-compat.h @ 13:2bb1bbac1d0a default tip

Added tag version-1.0.0 for changeset 1926dfc9feb0
author Guido Berhoerster <guido+libpws@berhoerster.name>
date Sun, 04 Aug 2019 21:37:56 +0200
parents 97097b4b6bfb
children
line wrap: on
line source

/*
 * Copyright (C) 2015 Guido Berhoerster <guido+libpws@berhoerster.name>
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

#ifndef	PWS_COMPAT_H
#define	PWS_COMPAT_H

#if	!defined(HAVE_ENDIAN_H) && !defined(HAVE_SYS_ENDIAN_H)
#define	le16toh		pws_compat_le16toh
#define	htole16		pws_compat_htole16
#define	le32toh		pws_compat_le32toh
#define	htole32		pws_compat_htole32
#define	be16toh		pws_compat_be16toh
#define	htobe16		pws_compat_htobe16
#define	be32toh		pws_compat_be32toh
#define	htobe32		pws_compat_htobe32
#endif /* !defined(HAVE_ENDIAN_H) && !defined(HAVE_SYS_ENDIAN_H) */

#ifndef	HAVE_ERR_H
#define	err		pws_compat_err
#define	errx		pws_compat_errx
#define	warn		pws_compat_warn
#define	warnx		pws_compat_warnx
#define	verr		pws_compat_verr
#define	verrx		pws_compat_verrx
#define	vwarn		pws_compat_vwarn
#define	vwarnx		pws_compat_vwarnx
#endif /* !HAVE_ERR_H */

#ifndef	HAVE_GETENTROPY
#define	getentropy	pws_compat_getentropy
#endif /* !HAVE_GETENTROPY */

#ifndef	HAVE_GETLINE
#define	getline		pws_compat_getline
#define	getdelim	pws_compat_getdelim
#endif /* !HAVE_GETLINE */

#ifndef	HAVE_READPASSPHRASE_H
#define	readpassphrase	pws_compat_readpassphrase
#endif /* !HAVE_READPASSPHRASE_H */

#ifndef	HAVE_SETPROGNAME
#define	setprogname	pws_compat_setprogname
#define	getprogname	pws_compat_getprogname
#endif /* !HAVE_SETPROGNAME */

#ifndef	HAVE_VIS_H
#define	vis		pws_compat_vis
#define	strvis		pws_compat_strvis
#define	stravis		pws_compat_stravis
#define	strnvis		pws_compat_strnvis
#define	strvisx		pws_compat_strvisx
#define	strunvis	pws_compat_strunvis
#define	unvis		pws_compat_unvis
#define	strnunvis	pws_compat_strnunvis
#endif /* !HAVE_VIS_H */

#endif /* PWS_COMPAT_H */