Closed
Bug 1104651
Opened 10 years ago
Closed 10 years ago
[gonk-l] valloc is not defined in newer bionic
Categories
(Firefox OS Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.2 S2 (19dec)
People
(Reporter: seinlin, Assigned: mwu)
References
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Valloc is deprecated in Android 5.0. See http://androidxref.com/5.0.0_r2/xref/bionic/libc/private/bionic_config.h#20 .
Assignee: nobody → mwu
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8537556 -
Attachment is obsolete: true
Attachment #8537820 -
Flags: review?(mh+mozilla)
Comment 5•10 years ago
|
||
Comment on attachment 8537820 [details] [diff] [review]
Make valloc optional, v2
Review of attachment 8537820 [details] [diff] [review]:
-----------------------------------------------------------------
::: configure.in
@@ +3413,5 @@
> + ac_cv_func_valloc=no)])
> +
> +if test "$ac_cv_func_valloc" = yes; then
> + AC_DEFINE(HAVE_VALLOC)
> +fi
How about AC_EGREP_HEADER(valloc, malloc.h, AC_DEFINE(HAVE_VALLOC))?
Attachment #8537820 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #5)
> How about AC_EGREP_HEADER(valloc, malloc.h, AC_DEFINE(HAVE_VALLOC))?
Should work for glibc and bionic, but I'm not sure about bsd. Some quick searching suggest that bsds define valloc in unistd.h so we'll need to add something for that.
Assignee | ||
Comment 7•10 years ago
|
||
Attachment #8537820 -
Attachment is obsolete: true
Assignee | ||
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
Comment on attachment 8538528 [details] [diff] [review]
Make valloc optional, v3
Review of attachment 8538528 [details] [diff] [review]:
-----------------------------------------------------------------
Seems to work. The only drawback is that this macro doesn't report success or failure, so it's harder to tell if valloc is enabled or not. However, searching the build logs for HAVE_VALLOC on OSX and Linux works, so that's close enough.
Attachment #8538528 -
Flags: review?(mh+mozilla)
Comment 10•10 years ago
|
||
Comment on attachment 8538528 [details] [diff] [review]
Make valloc optional, v3
Review of attachment 8538528 [details] [diff] [review]:
-----------------------------------------------------------------
::: configure.in
@@ +3398,5 @@
> AC_CHECK_FUNCS(malloc_usable_size)
>
> +dnl In newer bionic headers, valloc is built but not defined,
> +dnl so we check more carefully here.
> +AC_EGREP_HEADER(valloc, malloc.h, AC_DEFINE(HAVE_VALLOC))
(In reply to Michael Wu [:mwu] from comment #9)
> Seems to work. The only drawback is that this macro doesn't report success
> or failure, so it's harder to tell if valloc is enabled or not.
AC_MSG_CHECKING([for valloc in malloc.h])
AC_EGREP_HEADER(valloc, malloc.h, AC_DEFINE(HAVE_VALLOC)AC_MSG_RESULT([yes]),AC_MSG_RESULT([no]))
Attachment #8538528 -
Flags: review?(mh+mozilla) → review+
Assignee | ||
Comment 11•10 years ago
|
||
A bit more verbose, but still simpler than AC_TRY_COMPILE.
Attachment #8538528 -
Attachment is obsolete: true
Assignee | ||
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S2 (19dec)
You need to log in
before you can comment on or make changes to this bug.
Description
•