~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to m4/longlong.m4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Evan Broder, Mario Limonciello
  • Date: 2010-11-24 13:59:55 UTC
  • mfrom: (1.17.6 upstream) (17.6.15 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124135955-r6ii5sepayr7jt53
Tags: 1.99~20101124-1ubuntu1
[ Colin Watson ]
* Resynchronise with Debian experimental.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Program vesafb on BIOS systems rather than efifb.
  - Add a grub-rescue-efi-amd64 package containing a rescue CD-ROM image
    for EFI-AMD64.
  - On Wubi, don't ask for an install device, but just update wubildr
    using the diverted grub-install.
  - When embedding the core image in a post-MBR gap, check for and avoid
    sectors matching any of a list of known signatures.
  - Disable video_bochs and video_cirrus on PC BIOS systems, as probing
    PCI space seems to break on some systems.
* Downgrade "ACPI shutdown failed" error to a debug message, since it can
  cause spurious test failures.

[ Evan Broder ]
* Enable lua from grub-extras.
* Incorporate the bitop library into lua.
* Add enum_pci function to grub module in lua.
* Switch back to gfxpayload=keep by default, unless the video hardware
  is known to not support it.

[ Mario Limonciello ]
* Built part_msdos and vfat into bootx64.efi (LP: #677758)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# longlong.m4 serial 14
 
2
dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc.
 
3
dnl This file is free software; the Free Software Foundation
 
4
dnl gives unlimited permission to copy and/or distribute it,
 
5
dnl with or without modifications, as long as this notice is preserved.
 
6
 
 
7
dnl From Paul Eggert.
 
8
 
 
9
# Define HAVE_LONG_LONG_INT if 'long long int' works.
 
10
# This fixes a bug in Autoconf 2.61, but can be removed once we
 
11
# assume 2.62 everywhere.
 
12
 
 
13
# Note: If the type 'long long int' exists but is only 32 bits large
 
14
# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
 
15
# defined. In this case you can treat 'long long int' like 'long int'.
 
16
 
 
17
AC_DEFUN([AC_TYPE_LONG_LONG_INT],
 
18
[
 
19
  AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
 
20
    [AC_LINK_IFELSE(
 
21
       [_AC_TYPE_LONG_LONG_SNIPPET],
 
22
       [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
 
23
        dnl If cross compiling, assume the bug isn't important, since
 
24
        dnl nobody cross compiles for this platform as far as we know.
 
25
        AC_RUN_IFELSE(
 
26
          [AC_LANG_PROGRAM(
 
27
             [[@%:@include <limits.h>
 
28
               @%:@ifndef LLONG_MAX
 
29
               @%:@ define HALF \
 
30
                        (1LL << (sizeof (long long int) * CHAR_BIT - 2))
 
31
               @%:@ define LLONG_MAX (HALF - 1 + HALF)
 
32
               @%:@endif]],
 
33
             [[long long int n = 1;
 
34
               int i;
 
35
               for (i = 0; ; i++)
 
36
                 {
 
37
                   long long int m = n << i;
 
38
                   if (m >> i != n)
 
39
                     return 1;
 
40
                   if (LLONG_MAX / 2 < m)
 
41
                     break;
 
42
                 }
 
43
               return 0;]])],
 
44
          [ac_cv_type_long_long_int=yes],
 
45
          [ac_cv_type_long_long_int=no],
 
46
          [ac_cv_type_long_long_int=yes])],
 
47
       [ac_cv_type_long_long_int=no])])
 
48
  if test $ac_cv_type_long_long_int = yes; then
 
49
    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
 
50
      [Define to 1 if the system has the type `long long int'.])
 
51
  fi
 
52
])
 
53
 
 
54
# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
 
55
# This fixes a bug in Autoconf 2.61, but can be removed once we
 
56
# assume 2.62 everywhere.
 
57
 
 
58
# Note: If the type 'unsigned long long int' exists but is only 32 bits
 
59
# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
 
60
# will not be defined. In this case you can treat 'unsigned long long int'
 
61
# like 'unsigned long int'.
 
62
 
 
63
AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
 
64
[
 
65
  AC_CACHE_CHECK([for unsigned long long int],
 
66
    [ac_cv_type_unsigned_long_long_int],
 
67
    [AC_LINK_IFELSE(
 
68
       [_AC_TYPE_LONG_LONG_SNIPPET],
 
69
       [ac_cv_type_unsigned_long_long_int=yes],
 
70
       [ac_cv_type_unsigned_long_long_int=no])])
 
71
  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
72
    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
 
73
      [Define to 1 if the system has the type `unsigned long long int'.])
 
74
  fi
 
75
])
 
76
 
 
77
# Expands to a C program that can be used to test for simultaneous support
 
78
# of 'long long' and 'unsigned long long'. We don't want to say that
 
79
# 'long long' is available if 'unsigned long long' is not, or vice versa,
 
80
# because too many programs rely on the symmetry between signed and unsigned
 
81
# integer types (excluding 'bool').
 
82
AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
 
83
[
 
84
  AC_LANG_PROGRAM(
 
85
    [[/* For now, do not test the preprocessor; as of 2007 there are too many
 
86
         implementations with broken preprocessors.  Perhaps this can
 
87
         be revisited in 2012.  In the meantime, code should not expect
 
88
         #if to work with literals wider than 32 bits.  */
 
89
      /* Test literals.  */
 
90
      long long int ll = 9223372036854775807ll;
 
91
      long long int nll = -9223372036854775807LL;
 
92
      unsigned long long int ull = 18446744073709551615ULL;
 
93
      /* Test constant expressions.   */
 
94
      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
 
95
                     ? 1 : -1)];
 
96
      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
 
97
                     ? 1 : -1)];
 
98
      int i = 63;]],
 
99
    [[/* Test availability of runtime routines for shift and division.  */
 
100
      long long int llmax = 9223372036854775807ll;
 
101
      unsigned long long int ullmax = 18446744073709551615ull;
 
102
      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
 
103
              | (llmax / ll) | (llmax % ll)
 
104
              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
 
105
              | (ullmax / ull) | (ullmax % ull));]])
 
106
])