Skip to content

Commit

Permalink
Fix formatting and spelling in version-sync script.
Browse files Browse the repository at this point in the history
Also some minor reformatting and fixes to the hstox sut driver.
  • Loading branch information
iphydf committed Jun 4, 2017
1 parent cda770c commit b782ef5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
12 changes: 4 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions other/version-sync
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down Expand Up @@ -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

#
Expand All @@ -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)
#
Expand All @@ -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'/'
Expand Down
2 changes: 2 additions & 0 deletions testing/hstox/byteswap.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@

#define htobe64(x) OSSwapHostToBigInt64(x)
#define be64toh(x) OSSwapBigToHostInt64(x)
#else
#include <endian.h>
#endif
3 changes: 1 addition & 2 deletions testing/hstox/driver.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define _XOPEN_SOURCE 600

#define _POSIX_C_SOURCE 200809L
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
Expand Down
3 changes: 1 addition & 2 deletions testing/hstox/util.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#pragma once

#include <stdarg.h>

#include <msgpack.h>
#include <stdarg.h>

#define check_return(err, expr) \
__extension__({ \
Expand Down

0 comments on commit b782ef5

Please sign in to comment.