evpobr
6830c42189
CMake: Win32 fixes
...
* Fix linking with shared library (DEF file was not used)
* Version script was not used
* Use the same version script for Autotools and CMake
* Give proper name to shared library import lib
* Public headers were not installed on static library only build
Closes: https://github.com/erikd/libsndfile/issues/249
2017-04-29 15:33:35 +10:00
evpobr
f614de1fbe
CMake: Fix missing libsndfile-1.def
...
Closes: https://github.com/erikd/libsndfile/issues/249
2017-04-29 09:14:43 +10:00
evpobr
5c6129fce6
Autotools: Implement symbols visibility control
...
* Use symbol file under Win32 with MinGW only
* Use unified visibility control for other platforms
* Add recommended win32-dll option to LT_INIT macro
Closes: https://github.com/erikd/libsndfile/issues/213
2017-04-28 18:01:09 +10:00
evpobr
54dc330215
CMake: fix importing with add_subdirectory command
2017-04-26 16:02:11 +10:00
evpobr
9ebb96ca72
More CMake polishing
...
* Add win32_ordinal_test to test suite
* Add examples targets
* Add sndfile-regtest target
* Improve compatibility with MSVC
* Check direct.h header
* Add define to enable math constants
* Don't use CTest if tests are disabled
* Make packaging configurable
* Suppress annoying MSVC warnings
* Add ENABLE_BOW_DOCS option
* Add ENABLE_STATIC_RUNTIME option
* Add package config support
* Tune large files support messages
* Don't build tests when static libs disabled
* Use VS solution folders feature
* Fix option value set twice
* Rename sndfile target to sndfile-shared
* Mark M_LIBRARY variable as advanced
* Fix config packages installation directory
* Rename ENABLE_PACKAGING option for clarity
* CPack fixes
* Add CMake modules to Makefile.am
* Update documentation
Closes: https://github.com/erikd/libsndfile/issues/71
2017-04-25 19:21:40 +10:00
Anonymous Maarten
560cefe607
CMake: Use CMakeAutoGen as CMake AutoGen implementation
...
* By removing the GNU AutoGen dependency of the cmake,
libsndfile can be built using only cmake and a compiler toolchain
* Fix non-matching FOR and ENDFOR of template src/test_endswap.tpl
* Add pcm_test to test suite
Related: https://github.com/erikd/libsndfile/issues/71
Closes: https://github.com/erikd/libsndfile/issues/154
2017-04-25 19:21:40 +10:00
Anonymous Maarten
d7efb3bfc6
CMake: Allow parallel out-of-tree build
...
This allows parallel builds of different LibSndFile configurations
- results of configure_file and AutoGen are saved in CMAKE_BINARY_DIR
- the directory ${CMAKE_BINARY_DIR}/src is make a public include directory
- remove generated files in source tree prior to generation + fix install
Related: https://github.com/erikd/libsndfile/issues/71
2017-04-25 19:21:40 +10:00
Erik de Castro Lopo
cecc9a7498
RF64 tweaks
...
* Comments.
* Improve the `rf64_long_file_downgrade_test` test.
2017-04-18 20:07:10 +10:00
Erik de Castro Lopo
ff26310437
tests/Makefile.am: Switch away from GNU make rules
...
Avoid `'%'-style pattern rules are a GNU make extension` warnings.
2017-04-16 19:58:15 +10:00
Erik de Castro Lopo
df7e76fbe6
CONTRIBUTING.md: Add submitting issues section
2017-04-16 19:32:18 +10:00
Erik de Castro Lopo
9d470ee557
src/rf64.c: Fix varargs related bug
...
C's <stargs.h> functionality isn't type checked so that passing an
`sf_count_t` (64 bits) by mistake in place of a `unit32_t` can cause
errors. This would be fine if it was an error on every architecture
and platform, but its not. This particular problem only manifested
on armhf and some other Arm architectures. It was not an issue on
32 bit x86.
I have now fixed variants of this same bug several times.
Closes: https://github.com/erikd/libsndfile/issues/229
2017-04-16 19:11:45 +10:00
Erik de Castro Lopo
bf83b95fd9
RF64: Fix an RF64_AUTO_DOWNGRADE bug
...
Also add a test for this. The test is disabled by default because it
needs to write a 4 Gig file.
Closes: https://github.com/erikd/libsndfile/issues/238
2017-04-16 19:11:45 +10:00
evpobr
a3287d88eb
tests: Fix typos in fixes for MSVC
...
* src/test_main.c: Fix typo in HAVE_SYS_TYPES_H definition
* tests/win32_ordinal_test.c: Use correct "direct.h" header instead of "dirent.h"
Related: https://github.com/erikd/libsndfile/issues/154 , https://github.com/erikd/libsndfile/pull/234
2017-04-15 07:45:45 +10:00
Erik de Castro Lopo
197ceb315b
tests/Makefile.am: Another fix for autogen file rules
...
For Make to do its stuff, there needs to be a rule to make both the
`*.h` file and the `*.c` file.
2017-04-14 17:30:37 +10:00
Erik de Castro Lopo
7f7fc24dc3
Fix 'make distcheck'
...
* tests/pedantic-header-test.sh.in:
Commit 58737ceb48
started using "sfconfig.h" in the test files,
which made this test script fail.
* .travis.yaml:
Add `distcheck` that so PRs are checked.
2017-04-14 16:10:45 +10:00
Erik de Castro Lopo
ef1dbb2df1
src/flac.c: Fix a buffer read overflow
...
A file (generated by a fuzzer) which increased the number of channels
from one frame to the next could cause a read beyond the end of the
buffer provided by libFLAC. Only option is to abort the read.
Closes: https://github.com/erikd/libsndfile/issues/231
2017-04-14 15:29:38 +10:00
evpobr
58737ceb48
tests: Fixes for MSVC
...
* src/test_main.c: Fix undeclared off_t type with MSVC
* tests/misc_test.c: Fix undefined S_ISCHR & S_ISBLK with MSVC
* tests/stdin_test.c: Fix undefined STDIN_FILENO with MSVC
* tests/win32_ordinal_test.c: Fix undeclared getcwd() with MSVC
* Fix missing unistd.h under Win32
Related: https://github.com/erikd/libsndfile/issues/154
2017-04-14 13:03:27 +10:00
Erik de Castro Lopo
261a0dd489
tests/Makefile.am : Fix rules for autogen-ed files
...
Previously, the `*.c` file was only being rebuilt if the `*.def`
file was changed and not if the `*.tpl` file was changed.
2017-04-14 11:23:44 +10:00
Erik de Castro Lopo
cd7da8dbf6
src/flac.c: Fix another memory leak
...
When the FLAC decoder was passed a malformed file, the associated
`FLAC__StreamDecoder` object was not getting released.
Closes: https://github.com/erikd/libsndfile/issues/233
2017-04-12 20:19:38 +10:00
Erik de Castro Lopo
fd0484aba8
FLAC: Fix a buffer read overrun
...
Buffer read overrun occurs when reading a FLAC file that switches
from 2 channels to one channel mid-stream. Only option is to
abort the read.
Closes: https://github.com/erikd/libsndfile/issues/230
2017-04-12 20:00:37 +10:00
Erik de Castro Lopo
5206a9b65e
src/flac.c: Fix a memory leak
...
The pflac->rbuffer pointer array was being allocated in two
places, but only one of them (the one that was kept) was checking
to ensure the pointers were NULL before allocation.
Leak was found by fuzzing the sndfile-resample binary compiled
with ASAN.
2017-04-12 18:45:23 +10:00
evpobr
c2be6fc289
doc/Makefile.am: Add missing print.css
...
Closes: https://github.com/erikd/libsndfile/issues/201
2017-04-10 06:24:45 +10:00
evpobr
b1194240ea
CMake: Add BUILD_PROGRAMS option
...
ON by default, set to OFF to disable building of programs.
Related: Related: https://github.com/erikd/libsndfile/issues/71
2017-04-10 06:22:53 +10:00
evpobr
bbbb48f076
CMake: Fix programs installation
...
Related: https://github.com/erikd/libsndfile/issues/71
Closes: https://github.com/erikd/libsndfile/issues/219
2017-04-10 06:22:53 +10:00
evpobr
5c286b274d
CMake: Simplify sndfile_play configuring
...
* Remove sndfile_play_beos target, use single sndfile_play under all platforms
* Remove HAIKU variable check, found no information found about it.
Related: https://github.com/erikd/libsndfile/issues/71
2017-04-10 06:22:53 +10:00
evpobr
3fad82658b
CMake: Fix docs installation path
...
Related: https://github.com/erikd/libsndfile/issues/71
Closes: https://github.com/erikd/libsndfile/issues/220
2017-04-09 20:15:13 +10:00
evpobr
5d267da941
CMake: bump version up to 1.0.29pre1
...
Issue: https://github.com/erikd/libsndfile/issues/71
2017-04-09 16:26:10 +10:00
Erik de Castro Lopo
e6474576e5
Scripts/cmake-build.sh: Build out of tree
...
By default CMake dumps all the build artifact in the root directory
of the project. The script now builds everything in `_Build`.
2017-04-09 15:41:40 +10:00
Erik de Castro Lopo
7c402ad94b
Fix 'make distcheck'
2017-04-06 19:29:22 +10:00
Erik de Castro Lopo
1c0ea87cc3
Rework CMake build system
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-04-05 19:38:36 +10:00
evpobr
356a8c8fe3
configure.ac: Remove useless LIBTOOL_DEPS
macro
...
It is not required when using libtool with automake, as we do.
Proof: http://tinf2.vub.ac.be/~dvermeir/manual/autobook/autobook-1.2/autobook_87.html
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-04-05 19:35:27 +10:00
evpobr
57c4abe4ae
src/sndfile.c: Fix typo in error message
...
Closes: https://github.com/erikd/libsndfile/issues/216
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-04-05 18:36:40 +10:00
Erik de Castro Lopo
6b94dc5847
Honor pkg-config CFLAGS for Xiph libs
...
With the addition of `libsndfile_la_CFLAGS`, the `AM_CPPFLAGS` were
ignored meaning that flags discovered via `pkg-config` were ignored.
Closes: https://github.com/erikd/libsndfile/issues/215
2017-04-04 18:52:53 +10:00
evpobr
e427dd8674
Add .editorconfig
...
EditorConfig (http://editorconfig.org/ ) helps developers define and
maintain consistent coding styles between different editors and IDEs.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/173
2017-04-03 20:23:49 +10:00
Erik de Castro Lopo
5bcfd5ff0a
Include sfconfig.h as needed
2017-04-03 18:54:49 +10:00
Erik de Castro Lopo
170a10ab8d
configure.ac: Test if -Wvla is supported before adding it
2017-04-03 18:48:38 +10:00
Erik de Castro Lopo
1d928bffdb
Version 1.0.28
2017-04-02 18:52:51 +10:00
Erik de Castro Lopo
5a9256e541
doc/development.html: Tweaks
2017-04-02 18:52:02 +10:00
Erik de Castro Lopo
f457b7b5ec
src/id3.c : Improve error handling
2017-04-02 18:13:30 +10:00
Erik de Castro Lopo
60b234301a
src/flac.c: Improve error handling
...
Especially when dealing with corrupt or malicious files.
2017-04-02 18:13:30 +10:00
Erik de Castro Lopo
febad4673f
src/rf64.c: Remove debug
...
Write it to the log rather than stdout.
2017-04-02 17:43:22 +10:00
Erik de Castro Lopo
798c285506
tests/write_read_test.tpl: Fix function name
2017-04-02 17:43:22 +10:00
Erik de Castro Lopo
4627d78918
caf: Fix generation of malformed files
...
On 64 bit Windows, passing an `sf_count_t` as an `int` was resulting
in malformed files. Fix this using `made_size_t`.
2017-04-02 15:38:53 +10:00
Erik de Castro Lopo
6c401c63de
Switch back to create_symbols_file.py
2017-03-26 20:43:32 +11:00
Erik de Castro Lopo
6bbd5a9caf
tests: Don't use /tmp for temporary files
...
When the program is run under American Fuzzy Lop, writing to
/tmp/ fails.
2017-03-26 13:04:51 +11:00
Erik de Castro Lopo
94df5b91af
Scripts/static-deps-build.mk: Update Vorbis and FLAC versions
2017-03-26 11:50:49 +11:00
Erik de Castro Lopo
8dc7478ee7
tests/error_test.c: Fix uninitialized value error
...
The `SF_INFO` struct was not initialized before being passed to
`sf_open`.
Closes: https://github.com/erikd/libsndfile/issues/209
2017-03-21 18:35:12 +11:00
evpobr
1bff04b3ae
Add API exported functions visibility control
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-03-15 06:13:19 +11:00
Erik de Castro Lopo
cfff3b5554
src/Makefile.am: Fix EXTRA_DIST
...
The correct file to distribute is `create_symbols_file.c`, not
the binary.
2017-03-15 06:09:04 +11:00
evpobr
41d1430606
Add CONTRIBUTING.md, closes #202
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/erikd/libsndfile/pull/204
2017-03-14 19:40:21 +11:00