Commit Graph

12 Commits

Author SHA1 Message Date
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
iphydf
37d4a0b2ca
Avoid the use of rand() in tests.
We control the random functions in crypto_core, so we can make them
deterministic more easily. This will help test reproducibility in the
future.
2018-04-03 17:43:22 +00:00
iphydf
d3b286cb43
Fix a bunch of compiler warnings and remove suppressions. 2018-02-24 22:20:22 +00:00
iphydf
3dc8cf6df8
Disable lan discovery in most tests. 2018-02-18 21:32:28 +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
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
iphydf
6ae33c16cf
Add VLA compatibility macro for C89-ish compilers. 2017-01-28 20:49:12 +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
endoffile78
59e2a844f0 Revert "Portability fixes"
This reverts commit f3469070fe.
2017-01-05 15:16:56 -06: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
iphydf
db71602731
Use tox_options_set_* instead of direct member access.
Also added a `tox_options_copy` function for cloning an options object.
This can be useful when creating several Tox instances with slightly
varying options.
2016-12-22 10:53:39 +00:00
Robin Lindén
029c4fb83f Fix padding in SAVED_FRIEND struct and add test.
Test covers saving and loading of a Tox instance with a friend added.
2016-12-13 01:36:28 +01:00