~ubuntu-branches/ubuntu/trusty/grub2/trusty

« back to all changes in this revision

Viewing changes to m4/realloc.m4

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# realloc.m4 serial 11
2
 
dnl Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
 
1
# realloc.m4 serial 13
 
2
dnl Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
6
6
 
 
7
m4_version_prereq([2.70], [] ,[
 
8
 
 
9
# This is taken from the following Autoconf patch:
 
10
# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
 
11
AC_DEFUN([_AC_FUNC_REALLOC_IF],
 
12
[
 
13
  AC_REQUIRE([AC_HEADER_STDC])dnl
 
14
  AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
 
15
  AC_CHECK_HEADERS([stdlib.h])
 
16
  AC_CACHE_CHECK([for GNU libc compatible realloc],
 
17
    [ac_cv_func_realloc_0_nonnull],
 
18
    [AC_RUN_IFELSE(
 
19
       [AC_LANG_PROGRAM(
 
20
          [[#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 
21
            # include <stdlib.h>
 
22
            #else
 
23
            char *realloc ();
 
24
            #endif
 
25
          ]],
 
26
          [[return ! realloc (0, 0);]])
 
27
       ],
 
28
       [ac_cv_func_realloc_0_nonnull=yes],
 
29
       [ac_cv_func_realloc_0_nonnull=no],
 
30
       [case "$host_os" in
 
31
          # Guess yes on platforms where we know the result.
 
32
          *-gnu* | freebsd* | netbsd* | openbsd* \
 
33
          | hpux* | solaris* | cygwin* | mingw*)
 
34
            ac_cv_func_realloc_0_nonnull=yes ;;
 
35
          # If we don't know, assume the worst.
 
36
          *) ac_cv_func_realloc_0_nonnull=no ;;
 
37
        esac
 
38
       ])
 
39
    ])
 
40
  AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2])
 
41
])# AC_FUNC_REALLOC
 
42
 
 
43
])
 
44
 
7
45
# gl_FUNC_REALLOC_GNU
8
46
# -------------------
9
47
# Test whether 'realloc (0, 0)' is handled like in GNU libc, and replace
17
55
               [Define to 1 if your system has a GNU libc compatible 'realloc'
18
56
                function, and to 0 otherwise.])],
19
57
    [AC_DEFINE([HAVE_REALLOC_GNU], [0])
20
 
     gl_REPLACE_REALLOC
 
58
     REPLACE_REALLOC=1
21
59
    ])
22
60
])# gl_FUNC_REALLOC_GNU
23
61
 
33
71
    AC_DEFINE([HAVE_REALLOC_POSIX], [1],
34
72
      [Define if the 'realloc' function is POSIX compliant.])
35
73
  else
36
 
    gl_REPLACE_REALLOC
 
74
    REPLACE_REALLOC=1
37
75
  fi
38
76
])
39
 
 
40
 
AC_DEFUN([gl_REPLACE_REALLOC],
41
 
[
42
 
  AC_LIBOBJ([realloc])
43
 
  REPLACE_REALLOC=1
44
 
])