Re: [patch+7.8?] Fix --with-babeltrace with gcc-4.9.1

Yao Qi
2014-08-13T01:54:58Z

On 08/13/2014 04:32 AM, Doug Evans wrote:
> This seems like an excessive amount of code just to test whether a
> library exists.
> Do we really need all of it?

IMO, it's better to keep them. When I use babeltrace in GDB, I find the
babeltrace APIs are not stable, so I put more code in the configure
test, to cover GDB usages.

> E.g., can we just delete "pos" and the function call that initializes it?
>
> struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
>
> Or, if for some reason we need to test whether bf_ctf_get_iter exists,
> can we just
> call it and discard the result? [And similarly for the rest of the code.]
> None of this code gets run anyways.

As I said above, bt_iter_get_pos and bf_ctf_get_iter are here to test
they still exist in the babeltrace library. They are in 1.1.0, but I am
worried that they may be changed or renamed in the future.

--
Yao (é½å°§)