2
0
mirror of https://github.com/vasi/pixz synced 2024-10-30 15:21:41 +00:00

Make building clean on linux, use config.h

This commit is contained in:
Dave Vasilevsky 2020-04-25 19:41:03 -04:00
parent 49acde1e50
commit 29e57ec102
2 changed files with 10 additions and 2 deletions

View File

@ -71,13 +71,20 @@ AC_FUNC_STRTOD
AC_CHECK_FUNCS([memchr memmove memset strerror strtol])
AC_CHECK_HEADER([sys/endian.h],
[
AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <sys/endian.h>])
AC_CHECK_DECLS([htole64, le64toh], [], [], [
#define _GNU_SOURCE 1
#include <sys/endian.h>
]
)
],
[], [])
AC_CHECK_HEADER([endian.h],
[
AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <endian.h>])
AC_CHECK_DECLS([htole64, le64toh], [], [], [
#define _GNU_SOURCE 1
#include <endian.h>
])
],
[], [])

View File

@ -12,6 +12,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
#elif defined(__linux__) || defined(__FreeBSD__)
#include "config.h"
#include <stdint.h>
#include <string.h>
#ifdef __linux__