Commit Graph

558 Commits

Author SHA1 Message Date
iphydf
72ef08597e
Allow unauthenticated wine packages in the Windows build. 2019-01-03 10:49:37 +00:00
Maxim Biro
5530e41742
Increase NOFILE limit for tox-bootstrapd
tox-bootstrapd can use around 600 TCP sockets during TCP server's normal
functioning. Many systems default to having a soft limit of 1024 open file
descriptors, which we are close to reaching, so it was suggested we bump that
limit to a higher number. iphy suggested increasing it to 32768.
2018-11-04 20:10:09 -05:00
Maxim Biro
b6dde3c76f
Use cmake to build toxcore in tox-boostrapd's Dockerfile 2018-10-17 14:45:44 -04:00
Maxim Biro
9b98ac1342
tox-bootstrapd's Dockerfile shouldn't use master branch 2018-10-17 14:45:36 -04:00
Maxim Biro
f45bf686ae
Don't warn about macro expansion in run-clang 2018-10-16 21:35:44 -04:00
Maxim Biro
1cbc9609a7
Make tox-bootstrapd free memory on SIGINT and SIGTERM
Useful for using memory analyzing tools.
2018-10-16 21:35:27 -04:00
iphydf
700accb3c7
Use bool for IPv6 flag in test programs and DHT_bootstrap. 2018-10-16 22:11:53 +00:00
iphydf
77e025fae4
Remove Alpine Linux bootstrap daemon dockerfile.
We can add it back when there is a test for it. For now, we don't know
whether it works and don't have tests to make sure it keeps working.
2018-10-08 23:00:35 +00:00
iphydf
15d64221f1
Add LAN_discovery to the list of apidsl-generated files.
So it gets regenerated when the .api.h file changes.
2018-10-08 22:38:26 +00:00
Maxim Biro
56432a44c6
Make sure logger levels stay in sync across files 2018-10-07 15:16:00 -04:00
yangfl
d3d5b701cb
Fix typos 2018-09-19 18:16:13 +00:00
iphydf
49bb43f662
Standardise header guards.
Using the full path including the repo name.
2018-09-14 19:09:10 +00:00
iphydf
93cc178cfe
Add tool to find directly recursive calls in toxcore.
We should avoid recursion, as it makes reasoning about stack growth
harder. This tool shows (currently) 4 (non-tail) recursive functions, at
least 2 of which are easy to fix.
2018-09-08 22:08:34 +00:00
Maxim Biro
2e4cae692e
Use our own logging facility to log toxcore's logs 2018-08-30 22:44:18 +00:00
cotox
deb82006e5
Feature bootstrap trace/debug log output
Don't know why codes with macro dosen't work.
As it's only a few expensive, just code it without macro for now.

\#if (MIN_LOGGER_LEVEL == LOG_TRACE) || (MIN_LOGGER_LEVEL == LOG_DEBUG)
    fprintf(stderr, "[%s] %s:%d(%s) %s\n", strlevel, file, line, func, message);
\#endif
2018-08-30 22:44:18 +00:00
iphydf
acc19a202f
Format crypto_core.c.
Changes:
* 100 columns maximum (not strict, can be a bit more sometimes).
* No space after cast.
2018-08-26 19:15:44 +00:00
iphydf
473cde24d8
Update copyright to 2018. 2018-08-26 18:57:29 +00:00
iphydf
a1035cf814
Add some tests for ping_array.
No timeout test here yet, because we don't yet have the ability to
manipulate time at will, so we would have to actually sleep.
2018-08-26 17:32:19 +00:00
iphydf
7aa57afeba
Avoid redefining macros from different files. 2018-08-19 23:15:01 +00:00
iphydf
248902ffd4
Fix const cast in save-generator. 2018-08-19 11:51:00 +00:00
endoffile78
30960dcc7e
Add save file generator, save compatibility test, and generate a save file 2018-08-19 10:38:51 +00:00
iphydf
d6d305feeb
Use per-instance Mono_Time for Messenger and onion. 2018-08-16 21:01:43 +00:00
iphydf
54066f338f
Reduce the number of times unix_time_update is called.
Reduced by, e.g.:
* `file_transfer_test`: 33% of the `clock_gettime` calls.
* `tox_many_test`: 53% of the `clock_gettime` calls.

Other tests will see similar improvements. Real world applications will
be closer to 40-50% improvement, since tox_many_test has 100 nodes, while
file_transfer_test has 2 nodes.
2018-08-16 21:01:38 +00:00
iphydf
d92c96e783
Fix a few warnings from clang.
Also remove the use of a VLA in a context where there can be unbounded
memory allocations.
2018-08-12 14:09:59 +00:00
iphydf
064ffe5875
Make a separate struct Tox containing the Messenger.
This allows Tox to contain additional data on top of Messenger, making
Messenger not necessarily the most top-level object. E.g. groups are
built on Messenger and currently awkwardly void-pointered into it to
pretend there is no cyclic dependency.
2018-08-04 09:29:15 +00:00
iphydf
f627a26a7b
Run Clang global static analysis on Travis.
This uses a single .cc file containing almost all the code in the
repository to perform whole program analysis.
2018-07-22 02:34:30 +00:00
iphydf
7245ac11ef
Avoid implementations in .h files or #including .c files.
Also, avoid the need for putting `_XOPEN_SOURCE` in every test file.
2018-07-21 20:44:26 +00:00
Maxim Biro
c0b4cd156f
Simplify Travis-CI FreeBSD build 2018-07-15 18:37:10 -04:00
iphydf
abc17b0f89
Factor out time keeping code into its own module: mono_time.c.
It turns out, `unix_time` is also monotonic, and is used as such, so I've
renamed the new functions to `mono_time_*`.

2018-07-08:
```
00:01 <@irungentoo> the idea used to be that the unix_time() function
  could go backward in time but I think I might have started using it like
  if it could not after I changed it so that it would never go back in time
```
2018-07-09 21:04:50 +00:00
iphydf
c8697ccc20
Move load_state and its helper functions to their own module. 2018-07-09 20:36:39 +00:00
iphydf
8739f7fccb
Make tox.c unambiguously parseable.
Rules:
1. Constants are uppercase names: THE_CONSTANT.
2. SUE[1] types start with an uppercase letter and have at least one
   lowercase letter in it: The_Type, THE_Type.
3. Function types end in "_cb": tox_friend_connection_cb.
4. Variable and function names are all lowercase: the_function.

This makes it easier for humans reading the code to determine what an
identifier means. I'm not convinced by the enum type name change, but I
don't know a better rule. Currently, a lot of enum types are spelled like
constants, which is confusing.

[1] struct/union/enum
2018-07-05 23:09:28 +00:00
iphydf
1a54be06cd
Simplify Travis CI builds.
Have one script per build. This means more duplication between the
scripts, but it's much easier to understand and to run locally.
2018-07-01 08:35:44 +00:00
iphydf
9b7d828f83
Only run astyle if the astyle binary exists. 2018-06-25 20:35:16 +00:00
iphydf
d22332dd50
Remove the format test.
It's annoying to have a test touch every source file. It causes a
recompile of everything after every test run.
2018-06-25 19:48:11 +00:00
Maxim Biro
7684b5ae3e
Make bootstrap daemon use toxcore's version 2018-06-25 00:29:16 -04:00
cotox
2d0a21adb3
Fix bootstrap logger
TODO: need a meanful log output
2018-05-22 01:01:18 +08:00
iphydf
4f6ab0708c
Add empty logger to DHT bootstrap daemons.
These should register a proper logging callback so the messages don't go
devnull, but this at least ensures a logger is available.
2018-05-20 16:15:49 +00:00
iphydf
be797d4b03
Move system header includes from network.h to network.c 2018-05-20 15:42:42 +00:00
Anthony Bilinski
291a849a5a
fix DHT_bootstrap key loading
Introduced by 643eea60bb
2018-05-10 18:06:13 +02:00
Maxim Biro
e9629977ad
Fix FreeBSD build on Travis 2018-05-10 03:45:43 -04:00
iphydf
571b10149d
Fix coveralls reporting.
The new clang version makes gcov segfault. Also, coveralls needs another
package that it doesn't install the right version of by default.
2018-03-17 05:02:33 +00:00
iphydf
aa05095419
Remove the use of the 'hh' format specifier.
It's not supported in mingw.

See https://github.com/TokTok/c-toxcore/issues/786.
2018-03-16 01:57:26 +00:00
iphydf
d3b286cb43
Fix a bunch of compiler warnings and remove suppressions. 2018-02-24 22:20:22 +00:00
iphydf
b2a2a0bbc7
Link all tests to the android cpufeatures library if available.
This is needed for libvpx to work on android.

This also means that we can upload our test binaries to an android device
and actually run them, now that libcheck is no longer a blocker.
2018-02-23 01:05:00 +00:00
iphydf
d7471482d1
Add an option that allows us to specify that we require toxav. 2018-02-22 13:56:55 +00:00
iphydf
414b8f7425
Fix OSX tests: find(1) doesn't work like on Linux. 2018-02-21 15:45:31 +00:00
iphydf
95c03e0e85
Make the "persistent conference" callback changes new functions.
We can now revert the changes to the callbacks and keep supporting them
until clients have moved off them.
2018-02-20 21:36:05 +00:00
iphydf
c4a734e304
Remove apidsl from the build.
apidsl is in feature freeze. We can rely on the web service, instead.
2018-02-19 21:00:19 +00:00
iphydf
9d58e0aa0a
Run all tests in parallel on Travis.
The first round some tests will fail and others will segfault. The second
round, still some will fail, but the third round it might pass. At some
point, tests will pass.

The reason for this is that tests assume a lot about which ports they are
given, and also toxcore's default port range has too few ports to run all
tests in parallel. These issues will be fixed in future PRs.
2018-02-18 21:44:58 +00:00
Maxim Biro
ef172adebe Use Wine Devel instead of Wine Staging
Wine Staging is not maintained
https://wine-staging.com/news/2018-02-17-future-wine-staging.html
2018-02-18 17:13:59 +00:00
iphydf
2e74db5447
Improve gtest finding, support local checkout.
Also fix library dependency order for monolith test.
2018-02-11 12:20:36 +00:00
iphydf
6cd4fcdec4
Remove libcheck from the dependencies.
We're not gaining much from this library, and it's a burden, especially
for windows development.
2018-02-09 20:51:39 +00:00
iphydf
f2857932d2
Use the markdown GPLv3 license in the c-toxcore repo. 2018-02-08 16:08:09 +00:00
iphydf
8a0e98bab8
Fix LAN discovery on FreeBSD.
Also, add an auto-test for bootstrap and for LAN discovery.

Bootstrap is never tested otherwise, and LAN discovery is a prerequisite
for everything else. Having these two tests lets us rule out or identify
LAN discovery as a possible cause for test failures.
2018-02-08 14:57:34 +00:00
iphydf
36ba80aacb
Remove csrc from the RTPHeader struct.
This is not used by anything in the code, so we shouldn't have it in the
header.
2018-02-08 13:20:40 +00:00
iphydf
835b9fbdc9
Improve stability of crypto_memcmp test.
Also reduce number of people in conference to 5, because on Circle CI the
test times out trying to connect more than 6 or 7 people. The persistent
conferences PR will improve this so we can set it much higher then.
2018-02-06 20:21:27 +00:00
iphydf
feaefbcbb3
Format .cpp files with format-source. 2018-02-06 13:44:03 +00:00
sudden6
9f2582d699
use official debian domain 2018-02-05 14:23:31 +01:00
iphydf
f41c11c34e
Use more ubuntu packages; remove hstox for now.
Since trusty has more up-to-date packages, we can remove some of the
custom install code. Also, we're not using hstox at the moment, so there
is no need to slow down the builds for now.
2018-02-04 00:36:31 +00:00
iphydf
92ffad1a72
Use nullptr as NULL pointer constant instead of NULL or 0.
This changes only code, no string literals or comments.
2018-01-30 23:35:50 +00:00
iphydf
6e0ac337c9
Avoid clashes with "build" directories on case-insensitive file systems. 2018-01-28 15:17:34 +00:00
Maxim Biro
2a5941c9f9 Use Wine Staging for running Windows tests 2018-01-25 17:27:26 -05:00
Maxim Biro
6df9e05da2 Make Travis test Windows Dockerfile 2018-01-25 17:27:26 -05:00
Maxim Biro
e672b6f092 Add Dockerfile for Windows cross-compilation 2018-01-25 16:04:54 -05:00
iphydf
8f1bbcf83e
Use <stdlib.h> for alloca on FreeBSD.
https://www.freebsd.org/cgi/man.cgi?alloca

If stdlib.h does not define alloca, and we're using GCC (or Clang), we
define the macro ourselves in terms of a GCC builtin.
2018-01-22 21:05:30 +00:00
iphydf
e6c04ef028
Use self-built portaudio instead of system-provided. 2018-01-22 00:44:19 +00:00
iphydf
52778aed93
Make BUILD files more finely-grained.
This allows us to precisely see which libraries depend on which and lets
us split them up more, if necessary.
2018-01-21 19:44:09 +00:00
iphydf
1cecb6c87a
Add BUILD files for all the little tools in the repo.
Also, fix av_test.c, since I broke it last time.
2018-01-21 01:31:11 +00:00
iphydf
d7583a719a
Remove nTox from the repo.
It's a maintenance burden nobody uses. Let's make toxic the official
console client, instead.
2018-01-20 19:05:53 +00:00
iphydf
18a33169b8
Add bazel build scripts for c-toxcore.
This allows us and users to reproducibly build verified versions of the
library with checksums. It will power the toktok-stack continuous build
with checked-in checksums at specific git revisions.
2018-01-18 16:11:52 +00:00
iphydf
643eea60bb
Make DHT a module-private type. 2018-01-16 20:06:07 +00:00
iphydf
0b13936ce8
Use apidsl to generate LAN_discovery.h. 2018-01-16 14:17:05 +00:00
romik-g
6fc0be5142
Add Alpine Linux Dockerfile 2018-01-16 10:17:16 +00:00
iphydf
ae6250c7af
Sort monolith.h according to ls(1): uppercase first. 2018-01-16 09:50:01 +00:00
Smoked Cheese
402664f58d
update rpm spec and use variables in cmake instead of hardcoded paths (#624) 2018-01-15 14:23:33 +03:00
iphydf
1eea3f0ab6
Fix some memory or file descriptor leaks in test code.
Also some missing return value checks for `fopen`.
2018-01-14 19:15:28 +00:00
Yuri
1e1efec34a
pkg-config .pc files: added .private versions of Libs and Required
To prevent top-level linking of all libraries.

Problem: ```pkg-config --libs toxcore``` returns all libraries that are
required by all libtox*.so libraries. This is wrong because for a
dynamically linked executable only top-level libraries need to be
supplied. ```pkg-config --libs --static toxcore``` should return all
libraries for the statically linked executable.

For example, the ToxBot https://github.com/JFreegman/ToxBot executable
uses pkg-config and is linked with the opus library, which is wrong.

Based on #533.
2018-01-13 23:04:23 +00:00
iphydf
2fbed5b4c5
Move Networking_Core struct into the .c file.
To make it an abstract type everywhere except in network.c.
2018-01-11 11:59:14 +00:00
iphydf
c84daff541
Increase test retries to 10 (basically infinite).
This basically means: try until you run out of time (50 minutes on
Travis). On Linux, we really want the tests to pass, so there is no point
in limiting the number of retries. On windows, we don't retry, on FreeBSD
it's limited to 1.
2018-01-10 18:57:42 +00:00
iphydf
54ec162558
Fix formatting in some C files.
Also replace &(x) with &x for consistency.
2018-01-10 18:57:37 +00:00
iphydf
6c523f9f48
Disable asan, since it seems to break on travis.
But enable it on circle ci, so at least we have one asan build.
2018-01-10 18:39:09 +00:00
iphydf
d6047692a5
Bump toxcore version to 0.2.0.
We're not releasing yet, but projects preparing for the release will want
to build against this version in master.
2018-01-08 19:36:00 +00:00
iphydf
2c8fb05f6e Remove deprecated ToxDNS
Based on #331.

Fixes #42.
2017-12-29 00:32:18 +00:00
iphydf
f2b6090eca Generate only one large library "libtoxcore".
This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.
2017-12-28 23:01:41 +00:00
Maxim Biro
57115f0e75 Test tox-bootstrapd Docker container on Travis 2017-12-16 14:41:01 -05:00
Maxim Biro
418a304c0e Update tox-bootstrapd Dockerfile 2017-12-16 03:14:23 -05:00
Maxim Biro
92c4108dba Separate FreeBSD Travis build in 2 stages 2017-12-12 20:20:52 -05:00
Robin Lindén
de276762a9
Lift libconfig to v1.7.1 2017-12-12 22:15:56 +01:00
Diadlo
b39cc55d37
Add support of IPv6 disabling 2017-11-15 15:22:19 +03:00
Robin Lindén
c49a6e7f5b
Fix OS X Travis. 2017-10-25 23:05:02 +02:00
Maxim Biro
8f19c926c0 Run tests only once on FreeBSD due to Travis timeout 2017-08-22 04:10:45 -04:00
Maxim Biro
346d80207f Fix FreeBSD failing on Travis after update 2017-08-22 04:10:45 -04:00
Maxim Biro
7837659eda Update FreeBSD version on Travis to 11.1 2017-08-22 04:10:45 -04:00
Maxim Biro
1aa75e1705 Update FreeBSD image on new tag
Instead of updating it in every Travis build.
2017-08-22 04:10:45 -04:00
Maxim Biro
e4b74b0f3e Allow FreeBSD tests to fail 2017-08-22 04:08:22 -04:00
Maxim Biro
f495cf1a8d Test toxcore on FreeBSD on Travis 2017-08-22 04:08:22 -04:00
iphydf
8479b82431
Fold hstox tests into the general linux test.
We can run the spectest from within cmake, so we should exercise that.
2017-06-05 19:55:32 +00:00
Maxim Biro
b0aec02225 Split daemon's logging backends in separate modules 2017-06-04 16:07:03 -04:00
iphydf
1e8fa85aad
Add a monolith_test that includes all toxcore sources.
This requires that every symbol, even if static (file-scope), is unique.
The idea is that we can easily run "whole" program static analysis on
programs that include monolith.h ("whole" is in quotes, as we don't
include dependencies like libsodium in this static analysis).
2017-06-04 17:48:23 +00:00
iphydf
b782ef5d8e
Fix formatting and spelling in version-sync script.
Also some minor reformatting and fixes to the hstox sut driver.
2017-06-04 12:07:43 +00:00
iphydf
d4be41a3ad
Use new encoding of Maybe in msgpack results.
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
2017-06-03 23:32:46 +00:00
Maxim Biro
f6285d7a60 Fix markdown formatting 2017-04-19 20:22:28 -04:00
iphydf
c780d25e3e
Retry autotools tests the same way as cmake tests. 2017-03-26 19:03:43 +00:00
iphydf
9ff60ceb31
Reduce ctest timeout to 2 minutes from 5 minutes.
Fixes #411.
2017-03-26 19:03:25 +00:00
Diadlo
50c526e1a5
Move c_sleep to helpers.h and misc_tools.h
Also fix a mistake with forgotten braces around parameter
2017-03-25 20:40:34 +03:00
Maxim Biro
10deb2ab5f Fix Travis always succeeding despite tests failing 2017-03-12 08:34:53 -04:00
Maxim Biro
aaca8251c8 Remove dependency on strings.h 2017-03-01 20:43:30 -05:00
Diadlo
b19a9e5464
Add part of platform-independent network API implementation
socket      -> net_socket
htons       -> net_htons
htonl       -> net_htonl
connect     -> net_connect
sendto      -> net_sendto_ip4
getaddrinfo -> net_getipport
sa_family_t -> Family
2017-02-26 23:16:16 +03:00
iphydf
6ae33c16cf
Add VLA compatibility macro for C89-ish compilers. 2017-01-28 20:49:12 +00:00
iphydf
f58dbe2503
Limit number of retries to 3. 2017-01-19 15:58:03 +00:00
iphydf
a74ab7cd1a
Make Travis tests slightly more robust by re-running them. 2017-01-19 12:35:22 +00:00
iphydf
8f96ca6d86
Update license headers and remove redundant file name comment.
"All rights reserved" was incorrect. The project was licensed under GPL3,
which means a lot of rights are licensed to everybody in the world, i.e.
not reserved to the "Tox Project".
2017-01-19 00:01:44 +00:00
iphydf
6d6a4e1e3a
Add tutorial and "danger: experimental" banner to README. 2017-01-18 18:13:31 +00:00
iphydf
a22f5e7c6f
Clarify how the autotools build is done on Travis. 2017-01-18 10:56:16 +00:00
Carsten Brandt
86e67f805a decouple version-sync script from cmake 2017-01-18 11:20:07 +01:00
Carsten Brandt
3520eee05d SO versions for cmake and libtool
this updates the version-sync script to generate proper SO versions
which will be used by cmake and libtool to create version symlinks
on the system when a library is installed as well as setting the SO
version in the binary.

To see what this does, you have to configure tox with a prefix:

    ./configure --prefix=/tmp/tox-with-libtool
    mkdir cbuild && cd cbuild && cmake -DCMAKE_INSTALL_PREFIX=/tmp/tox-with-cmake ..

Then run `make && make install`.

in both instances you should see the following installed in `lib/`:

    libtoxcore.so -> libtoxcore.so.1.4.0
    libtoxcore.so.1 -> libtoxcore.so.1.4.0
    libtoxcore.so.1.4.0

inside the binary the soname should be the one with .1 and it should not
contain the full version:

    $ objdump -p libtoxcore.so.1.4.0 | grep SONAME
      SONAME               libtoxcore.so.1
2017-01-18 11:20:07 +01:00
iphydf
20be9a8c5b
Fix NaCl build: tar was called incorrectly.
tar -jxf expects a file.
2017-01-08 16:37:56 +00:00
iphydf
8f1dbaa2c5
Set up autotools build to build against vanilla NaCl.
Fixes #363.
2017-01-08 15:27:26 +00:00
iphydf
bec03de2ba
Run windows tests but ignore their failures.
This way we can at least see what fails in which way.
2017-01-07 22:59:25 +00:00
David Zero
8ef1f35ca7 Revert "Revert "Portability fixes""
This reverts commit 59e2a844f0, and
defines _DARWIN_C_SOURCE in toxcore/network.c
2017-01-06 04:20:00 -08:00
iphydf
08cd61387e
Add an OSX build that doesn't run tests.
This one is not allowed to fail and ensures that toxcore can at least be
built for OSX.
2017-01-06 00:40:29 +00:00
endoffile78
59e2a844f0 Revert "Portability fixes"
This reverts commit f3469070fe.
2017-01-05 15:16:56 -06:00
iphydf
0a61d11085
Test a few cmake option combinations before the build.
This takes a few seconds but allows us to cover cases that aren't checked
often.
2017-01-05 12:34:52 +00:00
David Zero
f3469070fe Portability fixes
- CFLAG gnu99 was changed to c99.
- CXXFLAG c++98 was changed to c++11.
- CFLAG -pedantic-errors was added so that non-ISO C now throws errors.
- _XOPEN_SOURCE feature test macro added and set to 600 to expose SUSv3
  and c99 definitions in modules that required them.
- Fixed tests (and bootstrap daemon logging) that were failing due to
  the altered build flags.
- Avoid string suffix misinterpretation; explicit narrowing conversion.
- Misc. additions to .gitignore to make sure build artifacts don't wind
  up in version control.
2017-01-04 13:44:39 -08:00
Sergey 'Jin' Bostandzhyan
4c9ed8f5a0
Add a separate configure switch for DHT_bootstrap
closes #319
2017-01-03 20:42:07 +00:00
iphydf
4e731bb435
Fix SSL verification in coveralls. 2017-01-02 23:43:42 +00:00
iphydf
ce29c8e7ec
Wrap all sodium/nacl functions in crypto_core.c. 2016-12-22 10:26:59 +00:00
iphydf
bbdd798256
Fix unresolved reference in toxencryptsave API.
Also, make sure this won't happen again by checking for it in
format-source.
2016-12-14 11:35:43 +00:00
iphydf
b14b8d07fa
Add compatibility pkg-config modules: libtoxcore, libtoxav.
These were generated by the autotools build. Some clients may depend on
these files instead of the newer split pkg-config files. New clients
should be using the toxcore, toxav, toxencryptsave, and toxdns modules.
2016-12-13 20:58:32 +00:00
iphydf
4cf69996cc
Add apidsl file for toxencryptsave.
This breaks the toxencryptsave API. It hides the Tox_Pass_Key struct
definition.
2016-12-13 14:24:40 +00:00
iphydf
2dc2ac52b9
Fix --enable-logging flag in autotools configure script.
We also never really tested this, because we run make distcheck, which
does another configure with default flags instead of the ones we passed.

Fixes #317.
2016-12-13 00:52:58 +00:00
GDR!
c684499375 Move -ltoxcore to be the first linked library 2016-12-12 14:09:34 +01:00
iphydf
d8ae726d0a Don't build nTox by default.
Build it on Travis. It won't be built on the windows builds regardless
of having it enabled globally.

Fixes #292.
2016-12-05 22:02:30 +00:00
Maxim Biro
f0f53dbd55 Don't error on warnings by default
Having -Werror set by default causes users' builds to fail because
toxcore is not warning-free. Failing on errors is appropriate for the
development phase, e.g. when building it in a CI enviroment, but it
doesn't make much sense to fail builds for users and let them figure out
that they need to pass -DWARNINGS=OFF to make the library build.
2016-11-28 15:13:01 -05:00
Gregory Mullen (grayhatter)
ad517eb1df
add NAT hole punching level to Tox API 2016-11-24 17:38:34 -08:00
iphydf
8bbde23f48
Use apidsl for the crypto_core API.
This allows us to use apidsl features like namespaces to enforce a
naming standard.
2016-11-12 11:55:40 +00:00
iphydf
b2dd50f9fc
Work around Travis issue that causes build failures.
Travis seems to no longer set $TERM, which breaks opam. We now manually
set it to some hopefully sane value.
2016-11-10 23:45:48 +00:00
endoffile78
3f53090c1d
Remove assoc 2016-11-06 09:14:53 -06:00
iphydf
7b6b47a610
Enable address sanitizer on the cmake build. 2016-11-06 12:19:34 +00:00
iphydf
96c672aef5
Compile as C++ for windows builds.
Compiling as C++ changes nothing semantically, but ensures that we don't
break C++ compatibility while also retaining C compatibility.

C++ compatibility is useful for tooling and additional diagnostics and
analyses.
2016-11-02 18:50:41 +00:00
iphydf
de966cdf90
Error if format_test can't be executed.
This ensures that on Travis, format_test will always be executed, or the
build fails.
2016-10-26 13:34:29 +01:00
iphydf
0fb79c54b8
Set log level for DEBUG=ON to LOG_DEBUG.
We use TRACE=ON (cmake flag) to enable LOG_TRACE. This way, a regular
build can enable DEBUG while not paying the price of TRACE. This is
particularly important for FFI bindings (especially Python), where
invoking callbacks can be an expensive operation.
2016-10-06 15:15:42 +01:00
Maxim Biro
02e9cd38f1 Add option to build tox-bootstrapd
When cross-compiling to <target> from Linux, cmake might find native Linux
libconfig and decide to build tox-bootstrapd. If the target is Windows, this
will fail, as tox-bootstrapd can't be built for Windows in the first place. If
the target is Linux of some other architecture, then using host native
libconfig will fail too. Thus an option is needed to guard against this.
2016-10-05 23:47:39 -04:00
Maxim Biro
90123c803a Align things nicer 2016-10-04 15:44:46 -04:00
Maxim Biro
bf42872bb3 Use TEST_TIMEOUT_SECONDS cmake flag on Travis 2016-10-04 15:32:38 -04:00
iphydf
b8b9789a69
Rebuild apidsl'd headers in cmake.
- Moved apidsl headers next to their generated versions. In the future,
  perhaps all (or most) headers will be apidsl-generated, so the sources
  should stay together.
- Try to find apidsl/apigen binary and astyle binary and use it for the
  format test. Don't run the format test if these can't be found.
2016-10-02 23:54:03 +01:00
iphydf
6d2b85ed06
Minor documentation fixes.
- Fixed incorrect parameter names (documented name didn't match code
  name).
- Removed `@return` from functions that return `void`.
- Make sure every parameter is documented. This required moving the
  planes and strides documentation to the function docs.
2016-10-01 11:17:57 +01:00
iphydf
c037100747
Import the hstox SUT interface from hstox.
We'll maintain it in the c-toxcore repo, where it belongs.
2016-10-01 02:13:34 +01:00
iphydf
1977d56caa
Remove return after no-return situation (and other cleanups).
Cleanups:
- Fix header guards to not use reserved names.
- Avoid name shadowing.
- Removed an unused variable found by avoiding name shadowing.
2016-09-30 19:06:44 +01:00
iphydf
30e86c5eb0
Merge branch 'master' of https://github.com/irungentoo/toxcore 2016-09-29 09:54:53 +01:00