Blame include/bswap.h

Packit Service db8eaa
/*
Packit Service db8eaa
 *  ALSA lib - compatibility header for providing byte swapping macros
Packit Service db8eaa
 *  Copyright (c) 2016 by  Thomas Klausner <wiz@NetBSD.org>
Packit Service db8eaa
 *
Packit Service db8eaa
 *
Packit Service db8eaa
 *   This library is free software; you can redistribute it and/or modify
Packit Service db8eaa
 *   it under the terms of the GNU Lesser General Public License as
Packit Service db8eaa
 *   published by the Free Software Foundation; either version 2.1 of
Packit Service db8eaa
 *   the License, or (at your option) any later version.
Packit Service db8eaa
 *
Packit Service db8eaa
 *   This program is distributed in the hope that it will be useful,
Packit Service db8eaa
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service db8eaa
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service db8eaa
 *   GNU Lesser General Public License for more details.
Packit Service db8eaa
 *
Packit Service db8eaa
 *   You should have received a copy of the GNU Lesser General Public
Packit Service db8eaa
 *   License along with this library; if not, write to the Free Software
Packit Service db8eaa
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
Packit Service db8eaa
 *
Packit Service db8eaa
 */
Packit Service db8eaa
Packit Service db8eaa
#ifndef __BSWAP_H
Packit Service db8eaa
#define __BSWAP_H
Packit Service db8eaa
Packit Service db8eaa
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__)
Packit Service db8eaa
#include <sys/endian.h>
Packit Service db8eaa
#define bswap_16 bswap16
Packit Service db8eaa
#define bswap_32 bswap32
Packit Service db8eaa
#define bswap_64 bswap64
Packit Service db8eaa
#elif defined (__sun)
Packit Service db8eaa
#include <sys/byteorder.h>
Packit Service db8eaa
#define bswap_16 BSWAP_16
Packit Service db8eaa
#define bswap_32 BSWAP_32
Packit Service db8eaa
#define bswap_64 BSWAP_64
Packit Service db8eaa
#else
Packit Service db8eaa
#include <byteswap.h>
Packit Service db8eaa
#endif
Packit Service db8eaa
Packit Service db8eaa
#endif