Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure: don't probe for the malloc()/free() return type
We require a C99 compiler, or in the case that led to this commit, a C++ compiler, and for those the malloc() and free() return types are well defined. This probe broke on Solaris when building with g++. Unlike glibc, the libc headers on Solaris, when building using a C++ compiler, define the stdlib.h functions within the std:: namespace, then imports those names into the top level namespace with 'using std::malloc'. This conflicts with the declarations used in the probe, causing the probe to fail to build, despite malloc() actually returning a void *. Since these two functions have well defined return types according to the standard, assume their return values match. Configure can still be invoked with different definitions for malloctype and freetype, or hints can override them, so someone on a non-standard system can at least get past this if they really need to (such a system will likely not build perl anyway.)
- Loading branch information