- Use AM_PROG_AR to locate AR (debian complains about AC_PATH_PROG)
- Added a fallback for automake < 1.12
- Moved LT_INIT because it depends on AM_* macro
See also http://stackoverflow.com/questions/25390720/va-arg-gives-something-strange-in-cygwin-x64
Program received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0 0x00007ffff7b7c8f1 in __strlen_sse2_pminub () from /lib64/libc.so.6
#1 0x0000000000425d29 in asn1c_make_identifier (flags=flags@entry=(AMI_MASK_ONLY_SPACES | AMI_NODELIMITER), expr=expr@entry=0x0) at asn1c_misc.c:73
#2 0x00000000004263ec in asn1c_type_name (arg=arg@entry=0x7fffffffe000, expr=expr@entry=0x6757c0, _format=<optimized out>,
_format@entry=TNF_INCLUDE) at asn1c_misc.c:268
#3 0x00000000004226fc in asn1c_lang_C_type_SIMPLE_TYPE (arg=arg@entry=0x7fffffffe000) at asn1c_C.c:1119
#4 0x00000000004232c1 in asn1c_lang_C_type_common_INTEGER (arg=0x7fffffffe000) at asn1c_C.c:251
#5 0x0000000000419c75 in asn1c_compile_expr (arg=arg@entry=0x7fffffffe000) at asn1compiler.c:100
#6 0x0000000000419f33 in asn1_compile (asn=asn@entry=0x671e10, datadir=datadir@entry=0x426730 "/home/vasko/usr/share/asn1c",
flags=flags@entry=A1C_NO_C99, argc=2, optc=0, argv=0x7fffffffe268) at asn1compiler.c:44
#7 0x0000000000401f13 in main (ac=1, av=0x7fffffffe270) at asn1c.c:328
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first
This issue was fixed by using the software "Coccinelle 1.0.4".
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
The following functions return immediately if a null pointer was passed.
* asn1p_constraint_free
* asn1p_paramlist_free
* asn1p_ref_free
* asn1p_value_free
* asn1p_wsyntx_free
It is therefore not needed that a function caller repeats a corresponding check.
This issue was fixed by using the software "Coccinelle 1.0.4".
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>