Closed Bug 967556 Opened 11 years ago Closed 11 years ago

HAVE_POSIX_MEMALIGN isn't defined on OSX

Categories

(Firefox Build System :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: mwu, Assigned: glandium)

References

Details

Attachments

(1 file)

posix_memalign definitely exists on OSX, but we're not defining HAVE_POSIX_MEMALIGN for some reason.
It looks like AC_CHECK_FUNCS generally doesn't work on OSX now. clang is too clever. #line 14154 "configure" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char posix_memalign(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char posix_memalign(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_posix_memalign) || defined (__stub___posix_memalign) choke me #else posix_memalign(); #endif ; return 0; } mozilla@macmini 1% gcc posix_memalign_conftest.C ~ configure:14163:6: error: functions that differ only in their return type cannot be overloaded char posix_memalign(); ^ /usr/include/stdlib.h:156:7: note: previous declaration is here int posix_memalign(void **, size_t, size_t) __OSX_AVAILABLE_STARTIN... ^ configure:14173:1: error: no matching function for call to 'posix_memalign' posix_memalign(); ^~~~~~~~~~~~~~ /usr/include/stdlib.h:156:7: note: candidate function not viable: requires 3 arguments, but 0 were provided int posix_memalign(void **, size_t, size_t) __OSX_AVAILABLE_STARTIN... ^ 2 errors generated.
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Attachment #8375377 - Flags: review?(gps) → review+
(In reply to Mike Hommey [:glandium] from comment #5) > And a fixup. > https://hg.mozilla.org/integration/mozilla-inbound/rev/532299d1368f This avoids non clobber builds picking the old (wrong) cached value
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Depends on: 973310
Depends on: 1260605
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: