~ubuntu-branches/ubuntu/jaunty/libvirt/jaunty-updates

« back to all changes in this revision

Viewing changes to gnulib/m4/eoverflow.m4

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-01-08 23:01:16 UTC
  • mfrom: (1.1.8 upstream) (3.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090108230116-niu4xzgypapywhmx
Tags: 0.5.1-4ubuntu1
* Merge with Debian experimental.
  - debian/control:
    + Don't build-depend on QEmu.
    + Add "XS-Debian-" prefix to Debian's Vcs headers.
    + Bump bridge-utils, dnsmasq-base, netcat-openbsd, and iptables
      to Depends of libvirt-bin.
    + s/interract/interact/g
    + Add versioned Conflicts/Replaces to libvirt0 for libvirt0-dbg,
      since we used to ship them as such.
  - Rename libvirt group to libvirtd.
  - 0005-delayed_iff_up_bridge.patch: Don't try to bring up the bridge
    before at least one interface has been added to it.
  - dont_clobber_existing_bridges.patch: Assign the name of the virtual
    bridge dynamically to avoid interfering with existing bridges.
  - better_default_uri_virsh.patch: Default to qemu:///system if the
    user has write access to the libvirt socket, otherwise
    qemu:///session.
  - We call libxen-dev libxen3-dev, so change all references.
* Included (but did not enable) opennebula patch (since it's not in
  the archive yet).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# eoverflow.m4 serial 2
2
 
dnl Copyright (C) 2004, 2006 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
 
# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
10
 
# POSIX.  But some systems (like AIX 3) don't define it, and some systems
11
 
# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
12
 
 
13
 
# Define EOVERFLOW as a C macro and as a substituted macro in such a way that
14
 
# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable,
15
 
# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric
16
 
#    value.
17
 
 
18
 
AC_DEFUN([gl_EOVERFLOW],
19
 
[
20
 
  AC_REQUIRE([AC_PROG_CC])dnl
21
 
 
22
 
  AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [
23
 
    AC_EGREP_CPP(yes,[
24
 
#include <errno.h>
25
 
#ifdef EOVERFLOW
26
 
yes
27
 
#endif
28
 
      ], have_eoverflow=1)
29
 
    if test -n "$have_eoverflow"; then
30
 
      dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves.
31
 
      ac_cv_decl_EOVERFLOW=yes
32
 
    else
33
 
      AC_EGREP_CPP(yes,[
34
 
#define _XOPEN_SOURCE_EXTENDED 1
35
 
#include <errno.h>
36
 
#ifdef EOVERFLOW
37
 
yes
38
 
#endif
39
 
        ], have_eoverflow=1)
40
 
      if test -n "$have_eoverflow"; then
41
 
        dnl EOVERFLOW exists but is hidden.
42
 
        dnl Define it to the same value.
43
 
        AC_COMPUTE_INT([ac_cv_decl_EOVERFLOW], [EOVERFLOW], [
44
 
#define _XOPEN_SOURCE_EXTENDED 1
45
 
#include <errno.h>
46
 
/* The following two lines are a workaround against an autoconf-2.52 bug.  */
47
 
#include <stdio.h>
48
 
#include <stdlib.h>
49
 
])
50
 
      else
51
 
        dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but
52
 
        dnl don't define it as EINVAL, because snprintf() callers want to
53
 
        dnl distinguish EINVAL and EOVERFLOW.
54
 
        ac_cv_decl_EOVERFLOW=E2BIG
55
 
      fi
56
 
    fi
57
 
  ])
58
 
  if test "$ac_cv_decl_EOVERFLOW" != yes; then
59
 
    AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW],
60
 
                       [Define as good substitute value for EOVERFLOW.])
61
 
    EOVERFLOW="$ac_cv_decl_EOVERFLOW"
62
 
    AC_SUBST(EOVERFLOW)
63
 
  fi
64
 
])
65
 
 
66
 
dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
67
 
dnl Remove this when we can assume autoconf >= 2.61.
68
 
m4_ifdef([AC_COMPUTE_INT], [], [
69
 
  AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
70
 
])