mirror of https://github.com/ericonr/sndio.git
simplify compat bits
This commit is contained in:
parent
5f53917840
commit
0bba66304b
|
@ -14,9 +14,6 @@
|
|||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#ifdef COMPAT_STRTONUM
|
||||
#include "bsd-compat.h"
|
||||
#endif
|
||||
#include <sys/param.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -47,6 +44,9 @@
|
|||
#ifdef DEBUG
|
||||
#include "dbg.h"
|
||||
#endif
|
||||
#ifdef COMPAT_STRTONUM
|
||||
#include "bsd-compat.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* unprivileged user name
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifdef COMPAT_PACKED
|
||||
#ifndef __packed
|
||||
#define __packed __attribute__((packed))
|
||||
#endif
|
||||
|
||||
|
@ -6,29 +6,19 @@
|
|||
#include <byteswap.h>
|
||||
#include <endian.h>
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define letoh16(x) (x)
|
||||
#define letoh32(x) (x)
|
||||
#define htole16(x) (x)
|
||||
#define htole32(x) (x)
|
||||
#define ntohl(x) bswap_32(x)
|
||||
#define letoh16(x) (x)
|
||||
#define letoh32(x) (x)
|
||||
#else
|
||||
#define letoh16(x) bswap_16(x)
|
||||
#define letoh32(x) bswap_32(x)
|
||||
#define htole16(x) bswap_16(x)
|
||||
#define htole32(x) bswap_32(x)
|
||||
#define ntohl(x) (x)
|
||||
#define letoh16(x) bswap_16(x)
|
||||
#define letoh32(x) bswap_32(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* setgroups(2) is defined here, on linux
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <grp.h>
|
||||
|
||||
/*
|
||||
* prototypes of these don't hurt
|
||||
*/
|
||||
long long strtonum(const char *, long long, long long, const char **);
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
int issetugid(void);
|
||||
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 **);
|
||||
|
|
Loading…
Reference in New Issue