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:
@@ -1,18 +1,18 @@
|
||||
alloca.h
|
||||
arpa_inet.h
|
||||
.deps
|
||||
float.h
|
||||
*.la
|
||||
.libs
|
||||
*.lo
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
alloca.h
|
||||
arpa_inet.h
|
||||
float.h
|
||||
netinet_in.h
|
||||
poll.h
|
||||
stdbool.h
|
||||
stdint.h
|
||||
stdio.h
|
||||
stdio-impl.h
|
||||
stdio.h
|
||||
stdlib.h
|
||||
string.h
|
||||
sys_select.h
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype getaddrinfo getpass gettext mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files verify
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --aux-dir=build-aux --with-tests --lgpl=2 --libtool --macro-prefix=gl c-ctype getaddrinfo getpass gettext inet_pton mktempd physmem poll posix-shell strndup strsep sys_stat useless-if-before-free vasprintf vc-list-files verify
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits
|
||||
|
||||
@@ -188,6 +188,15 @@ EXTRA_libgnu_la_SOURCES += inet_ntop.c
|
||||
|
||||
## end gnulib module inet_ntop
|
||||
|
||||
## begin gnulib module inet_pton
|
||||
|
||||
|
||||
EXTRA_DIST += inet_pton.c
|
||||
|
||||
EXTRA_libgnu_la_SOURCES += inet_pton.c
|
||||
|
||||
## end gnulib module inet_pton
|
||||
|
||||
## begin gnulib module link-warning
|
||||
|
||||
LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
|
||||
@@ -382,6 +391,8 @@ stdio.h: stdio.in.h
|
||||
-e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
|
||||
-e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
|
||||
-e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
|
||||
-e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
|
||||
-e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
|
||||
-e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
|
||||
-e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
|
||||
-e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
|
||||
@@ -420,6 +431,8 @@ stdio.h: stdio.in.h
|
||||
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
|
||||
-e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
|
||||
-e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
|
||||
-e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
|
||||
-e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
|
||||
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
|
||||
< $(srcdir)/stdio.in.h; \
|
||||
} > $@-t
|
||||
|
||||
@@ -55,19 +55,25 @@ poll (pfd, nfd, timeout)
|
||||
int timeout;
|
||||
{
|
||||
fd_set rfds, wfds, efds;
|
||||
struct timeval tv, *ptv;
|
||||
struct timeval tv;
|
||||
struct timeval *ptv;
|
||||
int maxfd, rc;
|
||||
nfds_t i;
|
||||
|
||||
#ifdef _SC_OPEN_MAX
|
||||
if (nfd > sysconf (_SC_OPEN_MAX))
|
||||
static int sc_open_max = -1;
|
||||
|
||||
if (nfd < 0
|
||||
|| (nfd > sc_open_max
|
||||
&& (sc_open_max != -1
|
||||
|| nfd > (sc_open_max = sysconf (_SC_OPEN_MAX)))))
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
#else /* !_SC_OPEN_MAX */
|
||||
#ifdef OPEN_MAX
|
||||
if (nfd > OPEN_MAX)
|
||||
if (nfd < 0 || nfd > OPEN_MAX)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
@@ -84,10 +90,15 @@ poll (pfd, nfd, timeout)
|
||||
}
|
||||
|
||||
/* convert timeout number into a timeval structure */
|
||||
ptv = &tv;
|
||||
if (timeout >= 0)
|
||||
if (timeout == 0)
|
||||
{
|
||||
/* return immediately or after timeout */
|
||||
ptv = &tv;
|
||||
ptv->tv_sec = 0;
|
||||
ptv->tv_usec = 0;
|
||||
}
|
||||
else if (timeout > 0)
|
||||
{
|
||||
ptv = &tv;
|
||||
ptv->tv_sec = timeout / 1000;
|
||||
ptv->tv_usec = (timeout % 1000) * 1000;
|
||||
}
|
||||
@@ -155,6 +166,7 @@ poll (pfd, nfd, timeout)
|
||||
if (FD_ISSET (pfd[i].fd, &rfds))
|
||||
{
|
||||
int r;
|
||||
int socket_errno;
|
||||
|
||||
#if defined __MACH__ && defined __APPLE__
|
||||
/* There is a bug in Mac OS X that causes it to ignore MSG_PEEK
|
||||
@@ -162,23 +174,25 @@ poll (pfd, nfd, timeout)
|
||||
connected socket, a server socket, or something else using a
|
||||
0-byte recv, and use ioctl(2) to detect POLLHUP. */
|
||||
r = recv (pfd[i].fd, NULL, 0, MSG_PEEK);
|
||||
if (r == 0 || errno == ENOTSOCK)
|
||||
socket_errno = (r < 0) ? errno : 0;
|
||||
if (r == 0 || socket_errno == ENOTSOCK)
|
||||
ioctl(pfd[i].fd, FIONREAD, &r);
|
||||
#else
|
||||
char data[64];
|
||||
r = recv (pfd[i].fd, data, sizeof (data), MSG_PEEK);
|
||||
socket_errno = (r < 0) ? errno : 0;
|
||||
#endif
|
||||
if (r == 0)
|
||||
happened |= POLLHUP;
|
||||
|
||||
/* If the event happened on an unconnected server socket,
|
||||
that's fine. */
|
||||
else if (r > 0 || ( /* (r == -1) && */ errno == ENOTCONN))
|
||||
else if (r > 0 || ( /* (r == -1) && */ socket_errno == ENOTCONN))
|
||||
happened |= (POLLIN | POLLRDNORM) & sought;
|
||||
|
||||
/* Distinguish hung-up sockets from other errors. */
|
||||
else if (errno == ESHUTDOWN || errno == ECONNRESET
|
||||
|| errno == ECONNABORTED || errno == ENETRESET)
|
||||
else if (socket_errno == ESHUTDOWN || socket_errno == ECONNRESET
|
||||
|| socket_errno == ECONNABORTED || socket_errno == ENETRESET)
|
||||
happened |= POLLHUP;
|
||||
|
||||
else
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2001, 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
|
||||
definitions below, but temporarily we have to #undef them. */
|
||||
#ifdef __BEOS__
|
||||
#if defined __BEOS__ && !defined __HAIKU__
|
||||
# include <OS.h> /* defines bool but not _Bool */
|
||||
# undef false
|
||||
# undef true
|
||||
@@ -73,7 +73,7 @@
|
||||
(see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
|
||||
(see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
|
||||
enum; this ensures that '_Bool' promotes to 'int'. */
|
||||
#if defined __cplusplus || defined __BEOS__
|
||||
#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
|
||||
/* A compiler known to have 'bool'. */
|
||||
/* If the compiler already has both 'bool' and '_Bool', we can assume they
|
||||
are the same types. */
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
struct { unsigned char *_base; int _size; } _ub; \
|
||||
int _ur; \
|
||||
unsigned char _ubuf[3]; \
|
||||
unsigned cahr _nbuf[1]; \
|
||||
unsigned char _nbuf[1]; \
|
||||
struct { unsigned char *_base; int _size; } _lb; \
|
||||
int _blksize; \
|
||||
fpos_t _offset; \
|
||||
@@ -60,7 +60,7 @@
|
||||
};
|
||||
# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
|
||||
# else /* FreeBSD, DragonFly, MacOS X, Cygwin */
|
||||
# define fp_ub fp->_ub
|
||||
# define fp_ub fp_->_ub
|
||||
# endif
|
||||
|
||||
# define HASUB(fp) (fp_ub._base != NULL)
|
||||
|
||||
@@ -212,6 +212,26 @@ extern int vsprintf (char *str, const char *format, va_list args)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_OBSTACK_PRINTF@
|
||||
# if @REPLACE_OBSTACK_PRINTF@
|
||||
# define obstack_printf rpl_osbtack_printf
|
||||
# define obstack_vprintf rpl_obstack_vprintf
|
||||
# endif
|
||||
# if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@
|
||||
struct obstack;
|
||||
/* Grow an obstack with formatted output. Return the number of
|
||||
bytes added to OBS. No trailing nul byte is added, and the
|
||||
object should be closed with obstack_finish before use. Upon
|
||||
memory allocation error, call obstack_alloc_failed_handler. Upon
|
||||
other error, return -1. */
|
||||
extern int obstack_printf (struct obstack *obs, const char *format, ...)
|
||||
__attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
extern int obstack_vprintf (struct obstack *obs, const char *format,
|
||||
va_list args)
|
||||
__attribute__ ((__format__ (__printf__, 2, 0)));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if @GNULIB_FOPEN@
|
||||
# if @REPLACE_FOPEN@
|
||||
# define fopen rpl_fopen
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
|
||||
# include <math.h>
|
||||
# include "isnand.h"
|
||||
# include "isnand-nolibm.h"
|
||||
#endif
|
||||
|
||||
#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
|
||||
# include <math.h>
|
||||
# include "isnand.h"
|
||||
# include "isnand-nolibm.h"
|
||||
# include "printf-frexp.h"
|
||||
#endif
|
||||
|
||||
@@ -200,6 +200,21 @@ local_wcslen (const wchar_t *s)
|
||||
/* Here we need to call the native sprintf, not rpl_sprintf. */
|
||||
#undef sprintf
|
||||
|
||||
/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
|
||||
warnings in this file. Use -Dlint to suppress them. */
|
||||
#ifdef lint
|
||||
# define IF_LINT(Code) Code
|
||||
#else
|
||||
# define IF_LINT(Code) /* empty */
|
||||
#endif
|
||||
|
||||
/* Avoid some warnings from "gcc -Wshadow".
|
||||
This file doesn't use the exp() and remainder() functions. */
|
||||
#undef exp
|
||||
#define exp expo
|
||||
#undef remainder
|
||||
#define remainder rem
|
||||
|
||||
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
|
||||
/* Determine the decimal-point character according to the current locale. */
|
||||
# ifndef decimal_point_char_defined
|
||||
@@ -1198,7 +1213,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
|
||||
static char *
|
||||
scale10_round_decimal_long_double (long double x, int n)
|
||||
{
|
||||
int e;
|
||||
int e IF_LINT(= 0);
|
||||
mpn_t m;
|
||||
void *memory = decode_long_double (x, &e, &m);
|
||||
return scale10_round_decimal_decoded (e, m, memory, n);
|
||||
@@ -1216,7 +1231,7 @@ scale10_round_decimal_long_double (long double x, int n)
|
||||
static char *
|
||||
scale10_round_decimal_double (double x, int n)
|
||||
{
|
||||
int e;
|
||||
int e IF_LINT(= 0);
|
||||
mpn_t m;
|
||||
void *memory = decode_double (x, &e, &m);
|
||||
return scale10_round_decimal_decoded (e, m, memory, n);
|
||||
@@ -3693,7 +3708,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
|
||||
#endif
|
||||
TCHAR_T *fbp;
|
||||
unsigned int prefix_count;
|
||||
int prefixes[2];
|
||||
int prefixes[2] IF_LINT (= { 0 });
|
||||
#if !USE_SNPRINTF
|
||||
size_t tmp_length;
|
||||
TCHAR_T tmpbuf[700];
|
||||
|
||||
Reference in New Issue
Block a user