Blame include/bswap.h

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