~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to m4/intdiv0.m4

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# intdiv0.m4 serial 4 (gettext-0.18.2)
 
2
dnl Copyright (C) 2002, 2007-2008, 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 Bruno Haible.
 
8
 
 
9
AC_DEFUN([gt_INTDIV0],
 
10
[
 
11
  AC_REQUIRE([AC_PROG_CC])dnl
 
12
  AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
13
 
 
14
  AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
 
15
    gt_cv_int_divbyzero_sigfpe,
 
16
    [
 
17
      gt_cv_int_divbyzero_sigfpe=
 
18
changequote(,)dnl
 
19
      case "$host_os" in
 
20
        macos* | darwin[6-9]* | darwin[1-9][0-9]*)
 
21
          # On MacOS X 10.2 or newer, just assume the same as when cross-
 
22
          # compiling. If we were to perform the real test, 1 Crash Report
 
23
          # dialog window would pop up.
 
24
          case "$host_cpu" in
 
25
            i[34567]86 | x86_64)
 
26
              gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
 
27
          esac
 
28
          ;;
 
29
      esac
 
30
changequote([,])dnl
 
31
      if test -z "$gt_cv_int_divbyzero_sigfpe"; then
 
32
        AC_RUN_IFELSE(
 
33
          [AC_LANG_SOURCE([[
 
34
#include <stdlib.h>
 
35
#include <signal.h>
 
36
 
 
37
static void
 
38
sigfpe_handler (int sig)
 
39
{
 
40
  /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
 
41
  exit (sig != SIGFPE);
 
42
}
 
43
 
 
44
int x = 1;
 
45
int y = 0;
 
46
int z;
 
47
int nan;
 
48
 
 
49
int main ()
 
50
{
 
51
  signal (SIGFPE, sigfpe_handler);
 
52
/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP.  */
 
53
#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
 
54
  signal (SIGTRAP, sigfpe_handler);
 
55
#endif
 
56
/* Linux/SPARC yields signal SIGILL.  */
 
57
#if defined (__sparc__) && defined (__linux__)
 
58
  signal (SIGILL, sigfpe_handler);
 
59
#endif
 
60
 
 
61
  z = x / y;
 
62
  nan = y / y;
 
63
  exit (1);
 
64
}
 
65
]])],
 
66
          [gt_cv_int_divbyzero_sigfpe=yes],
 
67
          [gt_cv_int_divbyzero_sigfpe=no],
 
68
          [
 
69
            # Guess based on the CPU.
 
70
changequote(,)dnl
 
71
            case "$host_cpu" in
 
72
              alpha* | i[34567]86 | x86_64 | m68k | s390*)
 
73
                gt_cv_int_divbyzero_sigfpe="guessing yes";;
 
74
              *)
 
75
                gt_cv_int_divbyzero_sigfpe="guessing no";;
 
76
            esac
 
77
changequote([,])dnl
 
78
          ])
 
79
      fi
 
80
    ])
 
81
  case "$gt_cv_int_divbyzero_sigfpe" in
 
82
    *yes) value=1;;
 
83
    *) value=0;;
 
84
  esac
 
85
  AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
 
86
    [Define if integer division by zero raises signal SIGFPE.])
 
87
])