Last change
on this file since 4 was 1, checked in by Paul Smedley, 10 years ago |
Initial commit of Heimdal 1.5.3
|
File size:
620 bytes
|
Line | |
---|
1 | dnl
|
---|
2 | dnl $Id$
|
---|
3 | dnl
|
---|
4 | dnl Test for realloc that doesn't handle NULL as first parameter
|
---|
5 | dnl
|
---|
6 | AC_DEFUN([rk_BROKEN_REALLOC], [
|
---|
7 | AC_CACHE_CHECK(if realloc if broken, ac_cv_func_realloc_broken, [
|
---|
8 | ac_cv_func_realloc_broken=no
|
---|
9 | AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
---|
10 | #include <stddef.h>
|
---|
11 | #include <stdlib.h>
|
---|
12 |
|
---|
13 | int main(int argc, char **argv)
|
---|
14 | {
|
---|
15 | return realloc(NULL, 17) == NULL;
|
---|
16 | }
|
---|
17 | ]])],[:], [ac_cv_func_realloc_broken=yes],[:])
|
---|
18 | ])
|
---|
19 | if test "$ac_cv_func_realloc_broken" = yes ; then
|
---|
20 | AC_DEFINE(BROKEN_REALLOC, 1, [Define if realloc(NULL) doesn't work.])
|
---|
21 | fi
|
---|
22 | AH_BOTTOM([#ifdef BROKEN_REALLOC
|
---|
23 | #define realloc(X, Y) rk_realloc((X), (Y))
|
---|
24 | #endif])
|
---|
25 | ])
|
---|
Note:
See
TracBrowser
for help on using the repository browser.