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

« back to all changes in this revision

Viewing changes to m4/getline.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
 
# getline.m4 serial 21
 
1
# getline.m4 serial 26
2
2
 
3
 
dnl Copyright (C) 1998-2003, 2005-2007, 2009-2010 Free Software Foundation,
 
3
dnl Copyright (C) 1998-2003, 2005-2007, 2009-2013 Free Software Foundation,
4
4
dnl Inc.
5
5
dnl
6
6
dnl This file is free software; the Free Software Foundation
46
46
        size_t siz = 0;
47
47
        int len = getline (&line, &siz, in);
48
48
        if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
49
 
          return 1;
 
49
          return 2;
50
50
      }
51
51
      {
52
52
        /* Test result for a NULL buffer and a non-zero size.
54
54
        char *line = NULL;
55
55
        size_t siz = (size_t)(~0) / 4;
56
56
        if (getline (&line, &siz, in) == -1)
57
 
          return 1;
 
57
          return 3;
58
58
      }
59
59
      return 0;
60
60
    }
65
65
         [
66
66
#include <features.h>
67
67
#ifdef __GNU_LIBRARY__
68
 
 #if (__GLIBC__ >= 2)
 
68
 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
69
69
  Lucky GNU user
70
70
 #endif
71
71
#endif
72
72
         ],
73
 
         [am_cv_func_working_getline=yes],
74
 
         [am_cv_func_working_getline=no])]
 
73
         [am_cv_func_working_getline="guessing yes"],
 
74
         [am_cv_func_working_getline="guessing no"])]
75
75
    )])
76
76
  fi
77
77
 
79
79
    HAVE_DECL_GETLINE=0
80
80
  fi
81
81
 
82
 
  if test $am_cv_func_working_getline = no; then
83
 
    dnl Set REPLACE_GETLINE always: Even if we have not found the broken
84
 
    dnl getline function among $LIBS, it may exist in libinet and the
85
 
    dnl executable may be linked with -linet.
86
 
    REPLACE_GETLINE=1
87
 
    AC_LIBOBJ([getline])
88
 
 
89
 
    gl_PREREQ_GETLINE
90
 
  fi
 
82
  case "$am_cv_func_working_getline" in
 
83
    *no)
 
84
      dnl Set REPLACE_GETLINE always: Even if we have not found the broken
 
85
      dnl getline function among $LIBS, it may exist in libinet and the
 
86
      dnl executable may be linked with -linet.
 
87
      REPLACE_GETLINE=1
 
88
      ;;
 
89
  esac
91
90
])
92
91
 
93
92
# Prerequisites of lib/getline.c.
94
93
AC_DEFUN([gl_PREREQ_GETLINE],
95
94
[
96
 
  gl_FUNC_GETDELIM
 
95
  :
97
96
])