* Fix sequence to "static const"
Using "static const" instead of "const static" makes this
declaration use the same sequence as all other "static"
declarations in libexif, and also avoids the occasional
gcc warning about that sequence:
warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration]
* Fix signed/unsigned comparison: use size_t instead of int
sizeof() returns a size_t, and an array index is a size_t as well,
so we can use a size_t as the for loop variable in the first place.
The gcc warning this fixes is
warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
* Add explicit /* fall through */ comments to avoid warnings
gcc recognizes a /* fall through */ comment (without any
additional words) as a hint that falling through is intended.
Otherwise, gcc generates
warning: this statement may fall through [-Wimplicit-fallthrough=]`
* Pseudo-use unused parameter to avoid warning about unused param
The gcc warning this fixes is
warning: unused parameter ‘ed’ [-Wunused-parameter]
* Cast to (void *) for %p in format to avoid warning
The gcc warning this fixes is
warning: format ‘%p’ expects argument of type ‘void *’, but argument 2 has type ‘ExifContent *’ {aka ‘struct _ExifContent *’} [-Wformat=]
* consistently use *.h #ifndef and #endif macros
Consistently name and use the macros wrapping include files:
/* file foo-bar.h */
#ifndef __FOO_BAR_H__
#define __FOO_BAR_H__
...
#endif /* __FOO_BAR_H__ */
This fixes wrong comments after the #endif, and macro names
which were diverging too much from the include file name.
* configure: pseudo use variables to make checks succeed even with -Werror
Pseudo-using the result variables makes the configure compilations
work even if CFLAGS happens to contain -Werror.
Otherwise, the unused variable will trigger a warning which will be
treated like an error, which is the wrong result when trying to
find out whether compiling/linking works.
Note that AM_CFLAGS and AM_CXXFLAGS are *NOT* AC_SUBST()ed
at this time, so they are not used.
This just fixes the typo, it does change the actual behaviour.
If available, use localtime_s() instead of localtime().
As localtime_s() is part of the Windows API, the compile
check with localtime_s() should only work for those systems.
Note we are not using AC_CANONICAL_HOST and then checking the
$host_os here. Either localtime_s() is available, then we
can use it. Or localtime_s() is not available, then we cannot
use it.
All of that is independent of what exactly the $host_os value
actually is, and whether we have listed all appropriate values
in the list of matches.
Closes: https://github.com/libexif/libexif/issues/57
Closes: https://github.com/libexif/libexif/pull/66
Before actually running diff, check that diff is actually
available. And when it is possible, even use "diff -u".
And if diff is not available at all, fall back to cmp.
cmp does not produce nice verbose output, but it has
the same exit values as diff.
Oh, and we try to avoid "if ! condition" in the shell script,
as there allegedly are some corner cases where that is
problematic.
gettext 0.18.3 is from 2013-06, which is still earlier than the
2013-12 release date of our other requirement automake 1.14.1.
gettext post-0.17 now would e.g. allow us to use --from-code
with AM_XGETTEXT_OPTION to let UTF-8 strings be translated.
https://repology.org/project/gettext/versions suggests
that gettext version later than 0.18.3 are usual on most
systems today and have been for a few operating system
releases.
Add the URL of the libexif homepage to the AC_INIT invocation.
The resulting AC_PACKAGE_URL m4 macro and PACKAGE_URL sh var
is not used anywhere yet, but it might be useful for
documentation purposes.
The AC_INIT URL parameter is supported since at least
Autoconf version 2.69 which we AC_PREREQ.
Update the use of autotools:
* update autoconf and automake version requirements to 2.69 and 1.14.1,
respectively
* use LT_INIT instead of obsolete AM_PROG_LIBTOOL
* generate xz archive when running make dist(check)
* remove obsolete autoconf macros: AC_C_CONST and AM_PROG_CC_C_O
* Rename 'binary' directory to 'binary-dist'
Debian invokes a 'binary' target in its build process. The presence of
the 'binary' directory breaks the automated build, as 'make' thinks the
target has already been invoked.
* Use substitution variable for 'mkdir -p' instead of hard-coding the command
This requires Failmalloc, a library that can be used along with glibc to
cause malloc calls to fail in a defined way. Configure will search for
libfailmalloc.so.0 in the usual places by default, or in a
user-specified location. The tests are skipped if it's not available.
Enable Failmalloc on the Travis coverage build.
po/be.po: Added Belarusian translation by Iryna Nikanchuk
po/en_GB.po: Added English (United Kingdom) translation by Bruce Cowan
po/it.po: Added Italian translation by Sergio Zanchetta
po/ja.po: Added Japanese translation by Shushi Kurose
po/pt.po: Added Portuguese translation by nglnx
po/sq.po: Added Albanian translation by Vilson Gjeci
po/zh_CN.po: Added Chinese (simplified) translation by Tao Wei