mpruett / audiofile

Audio File Library
https://audiofile.68k.org/
GNU Lesser General Public License v2.1
156 stars 43 forks source link

Remove the usage of PATH_MAX in tests. #17

Closed pinotree closed 11 years ago

pinotree commented 11 years ago

Replace the static PATH_MAX-sized buffers with dynamic allocation of the string containing the temporary file. The only drawback is the leak in some of the tests of the char* of the temporary file, in case of failure; considering that in such cases also other stuff is left "dirty" (like afCloseFile not called and the test file not removed), I deemed this leak negligible.

This helps with systems (such as GNU/Hurd) which do not provide PATH_MAX.

The test suite passes on both GNU/Hurd and GNU/Linux current Debian Wheezy system).

mpruett commented 11 years ago

Thanks Pino. I've pushed this change.