From b782ef5d8e2da0443f90edf3f14649402bb4a6fa Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 4 Jun 2017 12:07:43 +0000 Subject: [PATCH] Fix formatting and spelling in version-sync script. Also some minor reformatting and fixes to the hstox sut driver. --- CMakeLists.txt | 12 ++++-------- other/version-sync | 28 ++++++++++++++-------------- testing/hstox/byteswap.h | 2 ++ testing/hstox/driver.c | 3 +-- testing/hstox/util.h | 3 +-- 5 files changed, 22 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63ad0961..30cc0fed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,8 +175,7 @@ set(toxcore_PKGCONFIG_LIBS) # LAYER 1: Crypto core # -------------------- -apidsl( - toxcore/crypto_core.api.h) +apidsl(toxcore/crypto_core.api.h) add_module(toxcrypto toxcore/ccompat.h toxcore/crypto_core.c @@ -272,8 +271,7 @@ target_link_modules(toxgroup toxmessenger) # LAYER 8: Public API # ------------------- -apidsl( - toxcore/tox.api.h) +apidsl(toxcore/tox.api.h) add_module(toxcore toxcore/tox_api.c toxcore/tox.c @@ -287,8 +285,7 @@ target_link_modules(toxcore toxgroup) ################################################################################ if(BUILD_TOXAV) - apidsl( - toxav/toxav.api.h) + apidsl(toxav/toxav.api.h) add_module(toxav toxav/audio.c toxav/audio.h @@ -320,8 +317,7 @@ add_module(toxdns toxdns/toxdns.c) target_link_modules(toxdns toxcore) -apidsl( - toxencryptsave/toxencryptsave.api.h) +apidsl(toxencryptsave/toxencryptsave.api.h) add_module(toxencryptsave toxencryptsave/toxencryptsave.c toxencryptsave/toxencryptsave.h) diff --git a/other/version-sync b/other/version-sync index fa408c2d..0f60a038 100755 --- a/other/version-sync +++ b/other/version-sync @@ -36,7 +36,7 @@ update 'CMakeLists.txt' 's/\(PROJECT_VERSION_PATCH "\).*"/\1'$PATCH'"/' # # calculating the SO version # -# The SO version reflects changes in the ABI compatibility of the libary [1]. +# The SO version reflects changes in the ABI compatibility of the library [1]. # The general convention on this is that the SO version is a monotonically # increasing number. The major version reflects breaking changes and the minor # number reflect non-breaking updates [2]. @@ -65,14 +65,14 @@ update 'CMakeLists.txt' 's/\(PROJECT_VERSION_PATCH "\).*"/\1'$PATCH'"/' LAST_SOMAJOR=1 if [ $MAJOR -eq 0 ]; then - SOMAJOR=$MINOR - SOMINOR=$PATCH + SOMAJOR=$MINOR + SOMINOR=$PATCH - # update lastmajor above - update 'other/version-sync' 's/^\(LAST_SOMAJOR=\).*/\1'$SOMAJOR'/' + # update lastmajor above + update 'other/version-sync' 's/^\(LAST_SOMAJOR=\).*/\1'$SOMAJOR'/' else - SOMAJOR=$(expr $MAJOR + $LAST_SOMAJOR) - SOMINOR=$MINOR + SOMAJOR=$(expr $MAJOR + $LAST_SOMAJOR) + SOMINOR=$MINOR fi # @@ -93,7 +93,7 @@ fi # https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info # # Passing such a version string to libtool will generate the following version number -# on the libary binary file on GNU/Linux: +# on the library binary file on GNU/Linux: # # (current - age).(age).(revision) # @@ -116,13 +116,13 @@ fi # if [ $MAJOR -eq 0 ]; then - LIBTOOL_CURRENT=$(expr $SOMAJOR + $SOMINOR) - LIBTOOL_AGE=$SOMINOR - LIBTOOL_REVISION=0 + LIBTOOL_CURRENT=$(expr $SOMAJOR + $SOMINOR) + LIBTOOL_AGE=$SOMINOR + LIBTOOL_REVISION=0 else - LIBTOOL_CURRENT=$(expr $SOMAJOR + $SOMINOR) - LIBTOOL_AGE=$SOMINOR - LIBTOOL_REVISION=$PATCH + LIBTOOL_CURRENT=$(expr $SOMAJOR + $SOMINOR) + LIBTOOL_AGE=$SOMINOR + LIBTOOL_REVISION=$PATCH fi update 'so.version' 's/^\(CURRENT=\).*/\1'$LIBTOOL_CURRENT'/' diff --git a/testing/hstox/byteswap.h b/testing/hstox/byteswap.h index b5a58f66..fef55886 100644 --- a/testing/hstox/byteswap.h +++ b/testing/hstox/byteswap.h @@ -3,4 +3,6 @@ #define htobe64(x) OSSwapHostToBigInt64(x) #define be64toh(x) OSSwapBigToHostInt64(x) +#else +#include #endif diff --git a/testing/hstox/driver.c b/testing/hstox/driver.c index 2ae68f1b..a0fdfbd4 100644 --- a/testing/hstox/driver.c +++ b/testing/hstox/driver.c @@ -1,5 +1,4 @@ -#define _XOPEN_SOURCE 600 - +#define _POSIX_C_SOURCE 200809L #include #include #include diff --git a/testing/hstox/util.h b/testing/hstox/util.h index c4095994..af096eb9 100644 --- a/testing/hstox/util.h +++ b/testing/hstox/util.h @@ -1,8 +1,7 @@ #pragma once -#include - #include +#include #define check_return(err, expr) \ __extension__({ \