sndio/bsd-compat/bsd-compat.h

25 lines
585 B
C
Raw Normal View History

2011-05-06 06:40:39 -05:00
#ifndef __packed
2010-08-19 16:00:06 -05:00
#define __packed __attribute__((packed))
#endif
#ifdef COMPAT_LETOH
#include <byteswap.h>
#include <endian.h>
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htole16(x) (x)
#define htole32(x) (x)
2011-05-06 06:40:39 -05:00
#define letoh16(x) (x)
#define letoh32(x) (x)
2010-08-19 16:00:06 -05:00
#else
#define htole16(x) bswap_16(x)
#define htole32(x) bswap_32(x)
2011-05-06 06:40:39 -05:00
#define letoh16(x) bswap_16(x)
#define letoh32(x) bswap_32(x)
2010-08-19 16:00:06 -05:00
#endif
#endif
int issetugid(void);
2011-05-06 06:40:39 -05:00
size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
long long strtonum(const char *, long long, long long, const char **);