mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
update from gnulib
* build-aux/mktempd (rand_bytes, mktempd): * build-aux/useless-if-before-free (FILE): * build-aux/vc-list-files: * gnulib/lib/.cvsignore: * gnulib/lib/Makefile.am: * gnulib/lib/poll.c (poll): * gnulib/lib/stdbool.in.h (_GL_STDBOOL_H, true): * gnulib/lib/stdio-impl.h (fp_, fp_ub): * gnulib/lib/stdio.in.h (vasprintf, obstack_printf) (obstack_vprintf): * gnulib/lib/vasnprintf.c (_GNU_SOURCE, sprintf, IF_LINT, exp) (remainder, scale10_round_decimal_long_double) (scale10_round_decimal_double, pad_ourselves): * gnulib/m4/gnulib-cache.m4: * gnulib/m4/gnulib-common.m4 (gl_MODULE_INDICATOR): * gnulib/m4/gnulib-tool.m4 (gl_LOCAL_DIR, gl_M4_BASE, gl_PO_BASE) (gl_DOC_BASE, gl_TESTS_BASE, gl_WITH_TESTS, gl_LIB, gl_LGPL) (gl_MAKEFILE_NAME, gl_MACRO_PREFIX, gl_PO_DOMAIN, gl_VC_FILES): * gnulib/m4/lock.m4 (gl_LOCK_EARLY_BODY, gl_PREREQ_LOCK) (gl_DISABLE_THREADS): * gnulib/m4/onceonly.m4: * gnulib/m4/posix-shell.m4 (gl_POSIX_SHELL): * gnulib/m4/stdio_h.m4 (gl_STDIO_H_DEFAULTS): * gnulib/tests/test-getaddrinfo.c (ENABLE_DEBUGGING, dbgprintf) (simple): * gnulib/tests/test-stdint.c (UINTMAX_MAX, or): * gnulib/tests/test-vc-list-files-cvs.sh (compare): * gnulib/tests/test-vc-list-files-git.sh (compare):
This commit is contained in:
@@ -24,6 +24,15 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Whether to print debugging messages. */
|
||||
#define ENABLE_DEBUGGING 0
|
||||
|
||||
#if ENABLE_DEBUGGING
|
||||
# define dbgprintf printf
|
||||
#else
|
||||
# define dbgprintf if (0) printf
|
||||
#endif
|
||||
|
||||
/* BeOS does not have AF_UNSPEC. */
|
||||
#ifndef AF_UNSPEC
|
||||
# define AF_UNSPEC 0
|
||||
@@ -40,7 +49,7 @@ int simple (char *host, char *service)
|
||||
struct addrinfo *ai0, *ai;
|
||||
int res;
|
||||
|
||||
printf ("Finding %s service %s...\n", host, service);
|
||||
dbgprintf ("Finding %s service %s...\n", host, service);
|
||||
|
||||
/* This initializes "hints" but does not use it. Is there a reason
|
||||
for this? If so, please fix this comment. */
|
||||
@@ -51,7 +60,7 @@ int simple (char *host, char *service)
|
||||
|
||||
res = getaddrinfo (host, service, 0, &ai0);
|
||||
|
||||
printf ("res %d: %s\n", res, gai_strerror (res));
|
||||
dbgprintf ("res %d: %s\n", res, gai_strerror (res));
|
||||
|
||||
if (res != 0)
|
||||
{
|
||||
@@ -73,18 +82,18 @@ int simple (char *host, char *service)
|
||||
|
||||
for (ai = ai0; ai; ai = ai->ai_next)
|
||||
{
|
||||
printf ("\tflags %x\n", ai->ai_flags);
|
||||
printf ("\tfamily %x\n", ai->ai_family);
|
||||
printf ("\tsocktype %x\n", ai->ai_socktype);
|
||||
printf ("\tprotocol %x\n", ai->ai_protocol);
|
||||
printf ("\taddrlen %ld: ", (unsigned long) ai->ai_addrlen);
|
||||
printf ("\tFound %s\n",
|
||||
inet_ntop (ai->ai_family,
|
||||
&((struct sockaddr_in *)
|
||||
ai->ai_addr)->sin_addr,
|
||||
buf, sizeof (buf) - 1));
|
||||
dbgprintf ("\tflags %x\n", ai->ai_flags);
|
||||
dbgprintf ("\tfamily %x\n", ai->ai_family);
|
||||
dbgprintf ("\tsocktype %x\n", ai->ai_socktype);
|
||||
dbgprintf ("\tprotocol %x\n", ai->ai_protocol);
|
||||
dbgprintf ("\taddrlen %ld: ", (unsigned long) ai->ai_addrlen);
|
||||
dbgprintf ("\tFound %s\n",
|
||||
inet_ntop (ai->ai_family,
|
||||
&((struct sockaddr_in *)
|
||||
ai->ai_addr)->sin_addr,
|
||||
buf, sizeof (buf) - 1));
|
||||
if (ai->ai_canonname)
|
||||
printf ("\tFound %s...\n", ai->ai_canonname);
|
||||
dbgprintf ("\tFound %s...\n", ai->ai_canonname);
|
||||
|
||||
{
|
||||
char ipbuf[BUFSIZ];
|
||||
@@ -94,11 +103,11 @@ int simple (char *host, char *service)
|
||||
ipbuf, sizeof (ipbuf) - 1,
|
||||
portbuf, sizeof (portbuf) - 1,
|
||||
NI_NUMERICHOST|NI_NUMERICSERV);
|
||||
printf ("\t\tgetnameinfo %d: %s\n", res, gai_strerror (res));
|
||||
dbgprintf ("\t\tgetnameinfo %d: %s\n", res, gai_strerror (res));
|
||||
if (res == 0)
|
||||
{
|
||||
printf ("\t\tip %s\n", ipbuf);
|
||||
printf ("\t\tport %s\n", portbuf);
|
||||
dbgprintf ("\t\tip %s\n", ipbuf);
|
||||
dbgprintf ("\t\tport %s\n", portbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Test of <stdint.h> substitute.
|
||||
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006-2008 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -246,11 +246,15 @@ uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX };
|
||||
verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
|
||||
verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0);
|
||||
|
||||
/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in
|
||||
the preprocessor. */
|
||||
#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__))
|
||||
#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX
|
||||
/* ok */
|
||||
#else
|
||||
err or;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* 7.18.3. Limits of other integer types */
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ for i in with-cvsu without; do
|
||||
ok=0
|
||||
mkdir $tmpdir && cd $tmpdir &&
|
||||
# without cvs, skip the test
|
||||
{ cvs -Q -d "$repo" init || exit 77; } &&
|
||||
# The double use of 'exit' is needed for the reference to $? inside the trap.
|
||||
{ ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 || { (exit 77); exit 77; }; } &&
|
||||
mkdir w && cd w &&
|
||||
mkdir d &&
|
||||
touch d/a b c &&
|
||||
|
||||
@@ -31,7 +31,8 @@ trap '(exit $?); exit $?' 1 2 13 15
|
||||
fail=1
|
||||
mkdir $tmpdir && cd $tmpdir &&
|
||||
# without git, skip the test
|
||||
{ git init -q || exit 77; } &&
|
||||
# The double use of 'exit' is needed for the reference to $? inside the trap.
|
||||
{ ( git init -q ) > /dev/null 2>&1 || { (exit 77); exit 77; }; } &&
|
||||
mkdir d &&
|
||||
touch d/a b c &&
|
||||
git add . > /dev/null &&
|
||||
|
||||
Reference in New Issue
Block a user