~ubuntu-branches/ubuntu/karmic/libvirt/karmic-proposed

« back to all changes in this revision

Viewing changes to gnulib/m4/printf.m4

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2009-02-11 01:01:42 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090211010142-8zrm7z1u6ryfhkiq
Tags: 0.6.0-1ubuntu1
* Merge with Debian experimental. Remaining changes:
  - 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
    main yet).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# printf.m4 serial 23
2
 
dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
 
1
# printf.m4 serial 28
 
2
dnl Copyright (C) 2003, 2007-2009 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,
5
5
dnl with or without modifications, as long as this notice is preserved.
225
225
[
226
226
  AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
227
227
  AC_REQUIRE([AC_PROG_CC])
228
 
  AC_REQUIRE([AC_C_BIGENDIAN])
 
228
  AC_REQUIRE([gl_BIGENDIAN])
229
229
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
230
230
  dnl The user can set or unset the variable gl_printf_safe to indicate
231
231
  dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
232
232
  if test -n "$gl_printf_safe"; then
233
 
    AC_DEFINE([CHECK_PRINTF_SAFE], 1,
 
233
    AC_DEFINE([CHECK_PRINTF_SAFE], [1],
234
234
      [Define if you wish *printf() functions that have a safe handling of
235
235
       non-IEEE-754 'long double' values.])
236
236
  fi
811
811
AC_DEFUN([gl_PRINTF_ENOMEM],
812
812
[
813
813
  AC_REQUIRE([AC_PROG_CC])
 
814
  AC_REQUIRE([gl_MULTIARCH])
814
815
  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
815
816
  AC_CACHE_CHECK([whether printf survives out-of-memory conditions],
816
817
    [gl_cv_func_printf_enomem],
817
818
    [
 
819
      gl_cv_func_printf_enomem="guessing no"
818
820
      if test "$cross_compiling" = no; then
819
 
        AC_LANG_CONFTEST([AC_LANG_SOURCE([
 
821
        if test $APPLE_UNIVERSAL_BUILD = 0; then
 
822
          AC_LANG_CONFTEST([AC_LANG_SOURCE([
820
823
]GL_NOCRASH[
821
824
changequote(,)dnl
822
825
#include <stdio.h>
865
868
}
866
869
changequote([,])dnl
867
870
          ])])
868
 
        if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
869
 
          (./conftest
870
 
           result=$?
871
 
           if test $result != 0 && test $result != 77; then result=1; fi
872
 
           exit $result
873
 
          ) >/dev/null 2>/dev/null
874
 
          case $? in
875
 
            0) gl_cv_func_printf_enomem="yes" ;;
876
 
            77) gl_cv_func_printf_enomem="guessing no" ;;
877
 
            *) gl_cv_func_printf_enomem="no" ;;
878
 
          esac
 
871
          if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
 
872
            (./conftest
 
873
             result=$?
 
874
             if test $result != 0 && test $result != 77; then result=1; fi
 
875
             exit $result
 
876
            ) >/dev/null 2>/dev/null
 
877
            case $? in
 
878
              0) gl_cv_func_printf_enomem="yes" ;;
 
879
              77) gl_cv_func_printf_enomem="guessing no" ;;
 
880
              *) gl_cv_func_printf_enomem="no" ;;
 
881
            esac
 
882
          else
 
883
            gl_cv_func_printf_enomem="guessing no"
 
884
          fi
 
885
          rm -fr conftest*
879
886
        else
 
887
          dnl A universal build on Apple MacOS X platforms.
 
888
          dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
 
889
          dnl But we need a configuration result that is valid in both modes.
880
890
          gl_cv_func_printf_enomem="guessing no"
881
891
        fi
882
 
        rm -fr conftest*
883
 
      else
 
892
      fi
 
893
      if test "$gl_cv_func_printf_enomem" = "guessing no"; then
884
894
changequote(,)dnl
885
895
        case "$host_os" in
886
896
                    # Guess yes on glibc systems.
901
911
          osf*)     gl_cv_func_printf_enomem="guessing yes";;
902
912
                    # Guess yes on BeOS.
903
913
          beos*)    gl_cv_func_printf_enomem="guessing yes";;
 
914
                    # Guess yes on Haiku.
 
915
          haiku*)   gl_cv_func_printf_enomem="guessing yes";;
904
916
                    # If we don't know, assume the worst.
905
917
          *)        gl_cv_func_printf_enomem="guessing no";;
906
918
        esac
1130
1142
#include <stdio.h>
1131
1143
int main()
1132
1144
{
1133
 
  static char buf[8] = "DEADBEEF";
 
1145
  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
1134
1146
  snprintf (buf, 1, "%d", 12345);
1135
1147
  return buf[1] != 'E';
1136
1148
}],
1148
1160
dnl     #include <stdio.h>
1149
1161
dnl     int main()
1150
1162
dnl     {
1151
 
dnl       static char buf[8] = "DEADBEEF";
 
1163
dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
1152
1164
dnl       snprintf (buf, 0, "%d", 12345);
1153
1165
dnl       return buf[0] != 'D';
1154
1166
dnl     }
1169
1181
dnl     }
1170
1182
dnl     int main()
1171
1183
dnl     {
1172
 
dnl       static char buf[8] = "DEADBEEF";
 
1184
dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
1173
1185
dnl       my_snprintf (buf, 0, "%d", 12345);
1174
1186
dnl       return buf[0] != 'D';
1175
1187
dnl     }
1197
1209
}
1198
1210
int main()
1199
1211
{
1200
 
  static char buf[8] = "DEADBEEF";
 
1212
  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
1201
1213
  my_snprintf (buf, 0, "%d", 12345);
1202
1214
  return buf[0] != 'D';
1203
1215
}],
1305
1317
dnl   OSF/1 4.0d                     #  .  #  #  #  #  .  .  .  .  #  .  .  #  #  #  #  #  #
1306
1318
dnl   NetBSD 4.0                     .  ?  ?  ?  ?  ?  .  .  ?  ?  ?  ?  ?  .  .  .  ?  ?  ?
1307
1319
dnl   NetBSD 3.0                     .  .  .  .  #  #  .  #  #  ?  #  .  #  .  .  .  .  .  .
 
1320
dnl   Haiku                          .  .  .  #  #  #  .  .  .  .  .  .  ?  .  .  .  .  .  .
1308
1321
dnl   BeOS                           #  #  .  #  #  #  .  #  .  ?  .  #  ?  .  .  .  .  .  .
1309
1322
dnl   mingw                          #  #  #  #  #  #  .  #  #  .  #  #  ?  .  #  #  #  .  .