~serge-hallyn/ubuntu/raring/libvirt/libvirt-hugepages

« back to all changes in this revision

Viewing changes to gnulib/m4/strerror.m4

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-07-11 12:37:49 UTC
  • mfrom: (1.2.14)
  • Revision ID: package-import@ubuntu.com-20120711123749-gt314clvb7840c6p
Tags: 0.9.13-0ubuntu1
* New upstream version: 
* debian/rules: Remove .la files
* debian/control: Dropped debian vcs info.
* Dropped:
  - debian/paches/9022-pass-the-virt-driver-name-into-security-drivers:
    Already applied upstream.
  - debian/patches/9023-dont-enable-apparmor-driver-with-lxc
    Already applied upstream.
  - debian/patches/9024-initialize-random-generator-in-lxc:
    Already applied upstream.
* Re-diffed:
  - debian/patches/9002-better_default_uri_virsh.patch
* Added:
  - debian/patches/add-libvirt-highbank-support.patch: Add highbank 
    CPU detection support.
  - debian/patches/fix-lxc-container-unmounting.patch: Fix container
    mounting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# strerror.m4 serial 16
 
1
# strerror.m4 serial 17
2
2
dnl Copyright (C) 2002, 2007-2012 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,
9
9
  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
10
10
  AC_REQUIRE([gl_HEADER_ERRNO_H])
11
11
  AC_REQUIRE([gl_FUNC_STRERROR_0])
 
12
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
12
13
  m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
13
14
    AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
14
15
  ])
22
23
           [[if (!*strerror (-2)) return 1;]])],
23
24
        [gl_cv_func_working_strerror=yes],
24
25
        [gl_cv_func_working_strerror=no],
25
 
        [dnl Be pessimistic on cross-compiles for now.
26
 
         gl_cv_func_working_strerror="guessing no"])
 
26
        [case "$host_os" in
 
27
                   # Guess yes on glibc systems.
 
28
           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
 
29
                   # If we don't know, assume the worst.
 
30
           *)      gl_cv_func_working_strerror="guessing no" ;;
 
31
         esac
 
32
        ])
27
33
    ])
28
 
    if test "$gl_cv_func_working_strerror" != yes; then
29
 
      dnl The system's strerror() fails to return a string for out-of-range
30
 
      dnl integers. Replace it.
31
 
      REPLACE_STRERROR=1
32
 
    fi
 
34
    case "$gl_cv_func_working_strerror" in
 
35
      *yes) ;;
 
36
      *)
 
37
        dnl The system's strerror() fails to return a string for out-of-range
 
38
        dnl integers. Replace it.
 
39
        REPLACE_STRERROR=1
 
40
        ;;
 
41
    esac
33
42
    m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
34
43
      dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
35
44
      dnl buffer, we must replace strerror.
48
57
dnl return a string that matches strerror(-1)).
49
58
AC_DEFUN([gl_FUNC_STRERROR_0],
50
59
[
 
60
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
51
61
  REPLACE_STRERROR_0=0
52
62
  AC_CACHE_CHECK([whether strerror(0) succeeds],
53
63
   [gl_cv_func_strerror_0_works],
67
77
           return result;]])],
68
78
      [gl_cv_func_strerror_0_works=yes],
69
79
      [gl_cv_func_strerror_0_works=no],
70
 
      [dnl Be pessimistic on cross-compiles for now.
71
 
       gl_cv_func_strerror_0_works="guessing no"])
 
80
      [case "$host_os" in
 
81
                 # Guess yes on glibc systems.
 
82
         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
 
83
                 # If we don't know, assume the worst.
 
84
         *)      gl_cv_func_strerror_0_works="guessing no" ;;
 
85
       esac
 
86
      ])
72
87
  ])
73
 
  if test "$gl_cv_func_strerror_0_works" != yes; then
74
 
    REPLACE_STRERROR_0=1
75
 
    AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
76
 
      does not return a message implying success.])
77
 
  fi
 
88
  case "$gl_cv_func_strerror_0_works" in
 
89
    *yes) ;;
 
90
    *)
 
91
      REPLACE_STRERROR_0=1
 
92
      AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
 
93
        does not return a message implying success.])
 
94
      ;;
 
95
  esac
78
96
])