3 Commits
1.5.0 ... 1.5.1

Author SHA1 Message Date
1d03da324c Release 1.5.1 2020-11-21 11:05:56 +01:00
30b7f44ead Include endian.h or sys/endian.h depending on the platform 2020-11-14 20:27:08 +01:00
b8c8be453f Include headers for mkstemps
Linux requires <stdlib.h>, but FreeBSD requires <unistd.h>.
2020-11-14 18:18:42 +01:00
5 changed files with 24 additions and 1 deletions

View File

@ -1,6 +1,11 @@
opustags changelog
==================
1.5.1 - 2020-11-21
------------------
- Improve BSD support.
1.5.0 - 2020-11-08
------------------

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.9)
project(
opustags
VERSION 1.5.0
VERSION 1.5.1
LANGUAGES CXX
)
@ -21,6 +21,11 @@ link_directories(${OGG_LIBRARY_DIRS})
include(FindIconv)
# We need endian.h on Linux, and sys/endian.h on BSD.
include(CheckIncludeFileCXX)
check_include_file_cxx(endian.h HAVE_ENDIAN_H)
check_include_file_cxx(sys/endian.h HAVE_SYS_ENDIAN_H)
configure_file(src/config.h.in config.h @ONLY)
include_directories(BEFORE src "${CMAKE_BINARY_DIR}" ${OGG_INCLUDE_DIRS} ${Iconv_INCLUDE_DIRS})

View File

@ -12,8 +12,10 @@
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
using namespace std::literals::string_literals;

View File

@ -1,2 +1,5 @@
#cmakedefine PROJECT_NAME "@PROJECT_NAME@"
#cmakedefine PROJECT_VERSION "@PROJECT_VERSION@"
#cmakedefine HAVE_ENDIAN_H @HAVE_ENDIAN_H@
#cmakedefine HAVE_SYS_ENDIAN_H @HAVE_SYS_ENDIAN_H@

View File

@ -25,6 +25,14 @@
#include <string.h>
#ifdef HAVE_ENDIAN_H
# include <endian.h>
#endif
#ifdef HAVE_SYS_ENDIAN_H
# include <sys/endian.h>
#endif
#ifdef __APPLE__
#include <libkern/OSByteOrder.h>
#define htole32(x) OSSwapHostToLittleInt32(x)