|List:||Commits||« Previous MessageNext Message »|
|From:||Alexey Kopytov||Date:||October 1 2010 4:07pm|
|Subject:||Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)|
|View as plain text|
On 01.10.10 17:57, Davi Arnaut wrote: > On 10/1/10 10:47 AM, Alexey Kopytov wrote: > > [..] > >>> >>> That HAVE_BZERO does not mean that we have the function prototype. In >>> other others, even thought cmake/autoconf might think bzero is >>> available, it might not actually be due to the lack of the prototype. As >> >> OK, so HAVE_BZERO might be incorrectly defined on some platforms, which >> is obviously a bug. Its meaning is by definition (which is also assumed >> by the #ifdef in question): "there is a platform-defined bzero() that we >> can use". > > In autoconf, functions checks are implemented via link checks and I > assume cmake does the same. It's not exactly incorrectly defined, it > exists (and links successfully) but the prototype, which is required in > C++, is only present if the appropriate legacy defines are set. > So bzero() is not really available in C++ code on AIX. In this case we should not define HAVE_BZERO, that's it. We had a similar issue with isinf(), see bug #28240. Doesn't have anything to do with "legacy crap". >>> for the other questions, they are just hand waving. We do not have waste >>> time caring for legacy crap. >>> >> >> I did not claim the opposite. To make things dead simple, I say "we >> should not care about bzero()'s status, just do nothing. If it >> disappears, it will be mapped to memset() anyway". > > The point is that its not so simple. We a better off touching any legacy > stuff. There is nothing to gain from bzero expect trouble. > In my opinion, redefining bzero() on platforms where it is actually available is asking for troubles, too. >> And yes, incorrectly defined HAVE_BZERO is a different issue. > > Not exactly incorrect. That's the way autoconf/cmake works. > I am well aware how autoconf works. From the autoconf docs: "For each FUNCTION enumerated in the blank-or-newline-separated argument list, define `HAVE_FUNCTION' (in all capitals) if it is available." I think the only practically usable definition of "available" is "you can use it in your code". Since we can't really use bzero() in C++ code on AIX, HAVE_BZERO is incorrectly defined. This is what should be fixed in bug #55721. Best regards, Alexey.