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

« back to all changes in this revision

Viewing changes to m4/getdelim.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
# getdelim.m4 serial 6
 
2
 
 
3
dnl Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
 
4
dnl
 
5
dnl This file is free software; the Free Software Foundation
 
6
dnl gives unlimited permission to copy and/or distribute it,
 
7
dnl with or without modifications, as long as this notice is preserved.
 
8
 
 
9
AC_PREREQ([2.59])
 
10
 
 
11
AC_DEFUN([gl_FUNC_GETDELIM],
 
12
[
 
13
  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
 
14
 
 
15
  dnl Persuade glibc <stdio.h> to declare getdelim().
 
16
  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
17
 
 
18
  AC_CHECK_DECLS_ONCE([getdelim])
 
19
 
 
20
  AC_CHECK_FUNCS_ONCE([getdelim])
 
21
  if test $ac_cv_func_getdelim = yes; then
 
22
    dnl Found it in some library.  Verify that it works.
 
23
    AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim],
 
24
    [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
 
25
    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 
26
#    include <stdio.h>
 
27
#    include <stdlib.h>
 
28
#    include <string.h>
 
29
    int main ()
 
30
    {
 
31
      FILE *in = fopen ("./conftest.data", "r");
 
32
      if (!in)
 
33
        return 1;
 
34
      {
 
35
        /* Test result for a NULL buffer and a zero size.
 
36
           Based on a test program from Karl Heuer.  */
 
37
        char *line = NULL;
 
38
        size_t siz = 0;
 
39
        int len = getdelim (&line, &siz, '\n', in);
 
40
        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
 
41
          return 1;
 
42
      }
 
43
      {
 
44
        /* Test result for a NULL buffer and a non-zero size.
 
45
           This crashes on FreeBSD 8.0.  */
 
46
        char *line = NULL;
 
47
        size_t siz = (size_t)(~0) / 4;
 
48
        if (getdelim (&line, &siz, '\n', in) == -1)
 
49
          return 1;
 
50
      }
 
51
      return 0;
 
52
    }
 
53
    ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works.
 
54
    , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work.
 
55
    , dnl We're cross compiling. Assume it works on glibc2 systems.
 
56
      [AC_EGREP_CPP([Lucky GNU user],
 
57
         [
 
58
#include <features.h>
 
59
#ifdef __GNU_LIBRARY__
 
60
 #if (__GLIBC__ >= 2)
 
61
  Lucky GNU user
 
62
 #endif
 
63
#endif
 
64
         ],
 
65
         [gl_cv_func_working_getdelim=yes],
 
66
         [gl_cv_func_working_getdelim=no])]
 
67
    )])
 
68
  else
 
69
    gl_cv_func_working_getdelim=no
 
70
  fi
 
71
 
 
72
  if test $ac_cv_have_decl_getdelim = no; then
 
73
    HAVE_DECL_GETDELIM=0
 
74
  fi
 
75
 
 
76
  if test $gl_cv_func_working_getdelim = no; then
 
77
    if test $ac_cv_func_getdelim = yes; then
 
78
      REPLACE_GETDELIM=1
 
79
    fi
 
80
    AC_LIBOBJ([getdelim])
 
81
    gl_PREREQ_GETDELIM
 
82
  fi
 
83
])
 
84
 
 
85
# Prerequisites of lib/getdelim.c.
 
86
AC_DEFUN([gl_PREREQ_GETDELIM],
 
87
[
 
88
  AC_CHECK_FUNCS([flockfile funlockfile])
 
89
  AC_CHECK_DECLS([getc_unlocked])
 
90
])