Hello, Some comments... On 2014-05-16 02:33 +0200, Thomas Klausner wrote: > Hi Eric! > > On Wed, Apr 30, 2014 at 06:51:23PM -0600, Eric Blake wrote: > > On 04/30/2014 06:12 PM, Thomas Klausner wrote: [...] > > > I'd like to test for the difference int <-> size_t in a configure > > > script so I can get integer type/sign conversion-warnings free code on > > > all these operating systems. > > > > > > I'm however not sure how to do this. Does anyone have a suggestion? [...] > Here's what I came up with: > AC_CACHE_CHECK([parameter type for backtrace()], > [am_cv_proto_backtrace_type], The am_cv_ prefix is used by Automake so I suggest choosing a different one. > [AC_COMPILE_IFELSE( > [AC_LANG_PROGRAM( > [[ > #include <execinfo.h> > extern > #ifdef __cplusplus > "C" > #endif > size_t backtrace(void **addrlist, size_t len); > ]]) > ], > [am_cv_proto_backtrace_type=size_t], > [am_cv_proto_backtrace_type=int]) So if the compilation fails for any reason, you set the type to int. That could be OK in your case (depending how you use it) but it seems a little weird to me. > ]) > AC_DEFINE_UNQUOTED([backtrace_t], [$am_cv_proto_backtrace_type], > [Define to return type for backtrace().]) Note that POSIX reserves identifiers ending in _t if you include any header file, so you should normally avoid using that suffix in an application. Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/) _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf