| author | Guido Günther <agx@sigxcpu.org> | |
| Wed, 6 Apr 2011 10:42:02 +0000 (12:42 +0200) | ||
| committer | Guido Günther <agx@sigxcpu.org> | |
| Wed, 6 Apr 2011 10:42:02 +0000 (12:42 +0200) |
270 files changed:
--- a/AUTHORS
+++ b/AUTHORS
Minoru Usui <usui@mxm.nes.nec.co.jp>
Tiziano Mueller <dev-zero@gentoo.org>
Thibault VINCENT <thibault.vincent@smartjog.com>
+ Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
[....send patches to get your name here....]
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
+2011-04-04 Daniel Veillard <veillard@redhat.com>
+
+ Release of libvirt-0.9.0
+ * configure.ac docs/news.html.in libvirt.spec.in: update for the release
+ * po/*.po*: update polish translation and regenerate
+
+2011-04-03 Wen Congyang <wency@cn.fujitsu.com>
+
+ fix memory leak in qemuProcessHandleGraphics()
+ If strdup("x509dname") or strdup("saslUsername") success, but
+ strdup(x509dname) or strdup(saslUsername) failed, subject->nidentity
+ is not the num elements of subject->identities, and we will leak some
+ memory.
+
+ do not lock vm while allocating memory
+ There is no need to lock vm while allocating memory. If allocating
+ memory failed, we forgot to unlock vm.
+
+2011-04-02 Eric Blake <eblake@redhat.com>
+
+ docs: fix typo
+ * docs/formatdomain.html.in: Fix KVM name.
+
+ docs: correct invalid xml
+ * docs/internals.html.in: Fix xml errors.
+ * docs/formatstorageencryption.html.in: Likewise.
+ * docs/drvesx.html.in: Likewise.
+ * docs/archnetwork.html.in: Likewise.
+ * docs/logging.html.in: Likewise.
+ * docs/drvvmware.html.in: Likewise.
+ * docs/api.html.in: Likewise.
+ * docs/formatnwfilter.html.in: Likewise.
+ * docs/formatdomain.html.in: Likewise.
+ * docs/windows.html.in: Likewise.
+
+2011-04-01 Eric Blake <eblake@redhat.com>
+
+ virsh: fix mingw failure on creating nonblocking pipe
+ * .gnulib: Update to latest, for nonblocking module.
+ * bootstrap.conf (gnulib_modules): Add nonblocking.
+ * src/util/util.c (virSetBlocking): Defer to gnulib.
+
+2011-04-01 Daniel Veillard <veillard@redhat.com>
+
+ Fix libxl driver startup
+ When you happen to have a libvirtd binary compiled with the
+ libxenlight driver (say you have installed xen-4.1 libraries)
+ but not running a xen enabled system, then libvirtd fails to start.
+
+ The cause is that libxlStartup() returns -1 when failing to initialize
+ the library, and this propagates to virStateInitialize() which consider
+ this a failure. We should only exit libxlStartup with an error code
+ if something like an allocation error occurs, not if the driver failed
+ to initialize.
+
+ * src/libxl/libxl_driver.c: fix libxlStartup() to not return -1
+ when failing to initialize the libxenlight library
+
+2011-04-01 Jiri Denemark <jdenemar@redhat.com>
+
+ virsh: Fix documentation for memtune command
+ Commit 78ba748ef14c520ff1c4af2b5b0a44586ac49c8c claims to fix
+ documentation for swap_hard_limit virsh memtune option but it only fixes
+ documentation in formatdomain.html and libvirt.h. This patch completes
+ the task by fixing "virsh help memtune" output and memtune section of
+ virsh man page.
+
+2011-04-01 Guido Günther <agx@sigxcpu.org>
+
+ Make check_fc_host() and check_vport_capable() usable as rvalues
+ as needed on non linux ports using HAL.
+
+2011-04-01 Jiri Denemark <jdenemar@redhat.com>
+
+ qemu: Ignore libvirt debug messages in qemu log
+ qemu driver uses a 4K buffer for reading qemu log file. This is enough
+ when only qemu's output is present in the log file. However, when
+ debugging messages are turned on, intermediate libvirt process fills the
+ log with a bunch of debugging messages before it executes qemu binary.
+ In such a case the buffer may become too small. However, we are not
+ really interested in libvirt messages so they can be filtered out from
+ the buffer.
+
+2011-04-01 Osier Yang <jyang@redhat.com>
+
+ qemu: Fix improper logic of qemuCgroupSetup
+ It throws errors as long as the cgroup controller is not available,
+ regardless of whether we really want to use it to do setup or not,
+ which is not what we want, fixing it with throwing error when need
+ to use the controller.
+
+ And change "VIR_WARN" to "qemuReportError" for memory controller
+ incidentally.
+
+2011-04-01 Wen Congyang <wency@cn.fujitsu.com>
+
+ free tmp after unlinking it
+ We create a temporary file to save memory, and we will remove it after reading
+ memory to buffer. But we free the variable that contains the temporary filename
+ before we remove it. So we should free tmp after unlinking it.
+
+2011-04-01 Michal Privoznik <mprivozn@redhat.com>
+
+ Fix several formatting mistakes in doc
+
+2011-04-01 Daniel P. Berrange <berrange@redhat.com>
+
+ Remove iohelper on Win32 since it is not required
+ The iohelper binary is not required on Win32, although it compiles
+ without trouble. Simply remove it from the RPM.
+
+ * mingw32-libvirt.spec.in: Remove iohelper
+
+2011-03-31 Daniel P. Berrange <berrange@redhat.com>
+
+ Fix domain events C example on Win32
+ printf on Win32 does not necessarily support %lld and we don't
+ have GNULIBs wrapper for printf(). Switch to use asprintf() for
+ which we do have a gnulib wrapper with %lld support
+
+ * examples/domain-events/events-c/event-test.c: Fix formatting
+ of %lld on Win32
+ * cfg.mk: Don't require use of virAsprintf since this is an
+ example app for out of tree users to follow
+
+2011-03-31 Eric Blake <eblake@redhat.com>
+
+ maint: avoid locale-sensitivity in string case comparisons
+ strcase{cmp/str} have the drawback of being sensitive to the global
+ locale; this is unacceptable in a library setting. Prefer a
+ hard-coded C locale alternative for all but virsh, which is user
+ facing and where the global locale isn't changing externally.
+
+ * .gnulib: Update to latest, for c-strcasestr change.
+ * bootstrap.conf (gnulib_modules): Drop strcasestr, add c-strcase
+ and c-strcasestr.
+ * cfg.mk (sc_avoid_strcase): New rule.
+ (exclude_file_name_regexp--sc_avoid_strcase): New exception.
+ * src/internal.h (STRCASEEQ, STRCASENEQ, STRCASEEQLEN)
+ (STRCASENEQLEN): Adjust offenders.
+ * src/qemu/qemu_monitor_text.c (qemuMonitorTextEjectMedia):
+ Likewise.
+ * tools/virsh.c (namesorter): Document exception.
+
+ docs: mention C89 syntax preferences
+ * docs/hacking.html.in (Code formatting): Document that // comment
+ and declaration-after-statement are discouraged.
+ * HACKING: Regenerate.
+
+2011-03-31 Jiri Denemark <jdenemar@redhat.com>
+
+ qemu: Fix media eject with qemu-0.12.*
+ In qemu-0.12.* "device '...' is locked" message was changed to "Device
+ ..." so libvirt was no longer detecting this as an error.
+
+2011-03-30 Daniel Veillard <veillard@redhat.com>
+
+ The next release is 0.9.0 not 0.8.9
+ Fix this which went into documentation
+
+2011-03-30 Wen Congyang <wency@cn.fujitsu.com>
+
+ check whether qemuMonitorJSONHMP() failed
+ If qemu quited unexpectedly when we call qemuMonitorJSONHMP(),
+ libvirt will crash.
+ Steps to reproduce this bug:
+ 1. use gdb to attach libvirtd, and set a breakpoint in the function
+ qemuMonitorSetCapabilities()
+ 2. start a vm
+ 3. let the libvirtd to run until qemuMonitorJSONSetCapabilities() returns.
+ 4. kill the qemu process
+ 5. continue running libvirtd
+
+ do not send monitor command after monitor meet error
+ If the monitor met a error, and we will call qemuProcessHandleMonitorEOF().
+ But we may try to send monitor command after qemuProcessHandleMonitorEOF()
+ returned. Then libvirtd will be blocked in qemuMonitorSend().
+
+ Steps to reproduce this bug:
+ 1. use gdb to attach libvirtd, and set a breakpoint in the function
+ qemuConnectMonitor()
+ 2. start a vm
+ 3. let the libvirtd to run until qemuMonitorOpen() returns.
+ 4. kill the qemu process
+ 5. continue running libvirtd
+
+2011-03-30 Hu Tao <hutao@cn.fujitsu.com>
+
+ qemu: unlock qemu driver before return from domain save
+ qemuDriverUnlock() wasn't called on 2 exit paths
+ * src/qemu/qemu_driver.c: fix qemudDomainSave() to always unlock
+ the driver before exiting on error
+
+2011-03-30 Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
+
+ extend logging to record configuration-related changes
+ Currently libvirt's default logging is limited and it is difficult to
+ determine what was happening when a proglem occurred (especially on a
+ machines where one don't know the detail.) This patch helps to do that
+ by making additional logging available for the following events:
+
+ creating/defining/undefining domains
+ creating/defining/undefining/starting/stopping networks
+ creating/defining/undefining/starting/stopping storage pools
+ creating/defining/undefining/starting/stopping storage volumes.
+
+ * AUTHORS: add Naoya Horiguchi
+ * src/network/bridge_driver.c src/qemu/qemu_driver.c
+ src/storage/storage_driver.c: provide more VIR_INFO logging
+
+2011-03-30 Daniel Veillard <veillard@redhat.com>
+
+ Add libvirt_iohelper to spec file
+ The new iohelper binary was missing from the packaging spec
+
2011-03-29 Osier Yang <jyang@redhat.com>
cputune: New tests for cputune XML
diff --git a/Makefile.in b/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
$(top_srcdir)/gnulib/m4/inet_ntop.m4 \
$(top_srcdir)/gnulib/m4/inet_pton.m4 \
$(top_srcdir)/gnulib/m4/inline.m4 \
+ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
$(top_srcdir)/gnulib/m4/intmax_t.m4 \
$(top_srcdir)/gnulib/m4/inttypes_h.m4 \
$(top_srcdir)/gnulib/m4/ioctl.m4 \
+ $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+ $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+ $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+ $(top_srcdir)/gnulib/m4/locale_h.m4 \
+ $(top_srcdir)/gnulib/m4/localename.m4 \
$(top_srcdir)/gnulib/m4/lock.m4 \
$(top_srcdir)/gnulib/m4/longlong.m4 \
$(top_srcdir)/gnulib/m4/lseek.m4 \
$(top_srcdir)/gnulib/m4/select.m4 \
$(top_srcdir)/gnulib/m4/servent.m4 \
$(top_srcdir)/gnulib/m4/setenv.m4 \
+ $(top_srcdir)/gnulib/m4/setlocale.m4 \
$(top_srcdir)/gnulib/m4/sigaction.m4 \
$(top_srcdir)/gnulib/m4/signal_h.m4 \
$(top_srcdir)/gnulib/m4/signalblocking.m4 \
$(top_srcdir)/gnulib/m4/wchar_h.m4 \
$(top_srcdir)/gnulib/m4/write.m4 \
$(top_srcdir)/gnulib/m4/xalloc.m4 \
- $(top_srcdir)/gnulib/m4/yield.m4 \
+ $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/m4/codeset.m4 \
$(top_srcdir)/m4/compiler-flags.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_SEND = @GNULIB_SEND@
GNULIB_SENDTO = @GNULIB_SENDTO@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
HAVE_WMEMSET = @HAVE_WMEMSET@
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
HOSTENT_LIB = @HOSTENT_LIB@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
IP6TABLES_PATH = @IP6TABLES_PATH@
IPTABLES_PATH = @IPTABLES_PATH@
IP_PATH = @IP_PATH@
LIB_PTHREAD = @LIB_PTHREAD@
LIPO = @LIPO@
LN_S = @LN_S@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LOCK_CHECKING_CFLAGS = @LOCK_CHECKING_CFLAGS@
LTALLOCA = @LTALLOCA@
LTLIBICONV = @LTLIBICONV@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
NEXT_AS_FIRST_DIRECTIVE_POLL_H = @NEXT_AS_FIRST_DIRECTIVE_POLL_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_NETDB_H = @NEXT_NETDB_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
NEXT_POLL_H = @NEXT_POLL_H@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
--- a/NEWS
+++ b/NEWS
http://libvirt.org/news.html
+0.9.0: Apr 4 2011:
+ - Features:
+ Support cputune cpu usage tuning (Osier Yang and Nikunj A. Dadhania),
+ Add public APIs for storage volume upload/download (Daniel P. Berrange),
+ Add public API for setting migration speed on the fly (Daniel P. Berrange),
+ Add libxenlight driver (Jim Fehlig and Markus Groß),
+ qemu: support migration to fd (Eric Blake),
+ libvirt: add virDomain{Get,Set}BlkioParameters (Gui Jianfeng),
+ setmem: introduce a new libvirt API (virDomainSetMemoryFlags) (Taku Izumi),
+ Expose event loop implementation as a public API (Daniel P. Berrange),
+ Dump the debug buffer to libvirtd.log on fatal signal (Daniel Veillard),
+ Audit support (Eric Blake)
+
+ - Documentation:
+ fix typo (Eric Blake),
+ correct invalid xml (Eric Blake),
+ virsh: Fix documentation for memtune command (Jiri Denemark),
+ Fix several formatting mistakes in doc (Michal Privoznik),
+ mention C89 syntax preferences (Eric Blake),
+ document recent hook additions (Eric Blake),
+ Update on the goal page (Daniel Veillard),
+ Document first release with spice and qxl (Cole Robinson),
+ Add schema definition for imagelabel (Osier Yang),
+ update virGetVersion description (Tiziano Mueller),
+ Improve logging documentation including the debug buffer (Daniel Veillard),
+ update windows page for initial libvirt 0.8.8 installer (Justin Clift),
+ formatdomain.html.in: Fix spelling PIC->PCI (Philipp Hahn),
+ fix missing <p> (Eric Blake),
+ documenting the 802.1Qbg parameters of a 'direct' interface (Gerhard Stenzel),
+ silence warnings about generated API docs (Eric Blake),
+ document <driver name='vhost'/> for interfaces (Eric Blake),
+ correct range of default NAT subnet (Eric Blake),
+ formatdomain: Add release info for disk <driver> attributes (Cole Robinson),
+ Fix spelling mistake: seek (Philipp Hahn),
+ maint: fix grammar in error message (Eric Blake)
+
+ - Portability:
+ virsh: fix mingw failure on creating nonblocking pipe (Eric Blake),
+ Remove iohelper on Win32 since it is not required (Daniel P. Berrange),
+ Fix domain events C example on Win32 (Daniel P. Berrange),
+ build: fix compilation on mingw (Eric Blake),
+ util: use SCM_RIGHTS in virFileOperation when needed (Eric Blake),
+ Don't use INT64_MAX in libvirt.h because it requires stdint.h (Matthias Bolte),
+ libvirtd: Remove indirect linking (Guido Günther),
+ build: avoid compiler warning on cygwin (Eric Blake),
+ build: fix build on cygwin (Eric Blake),
+ build: fix building error when building without libvirtd (Wen Congyang),
+ virsh: Remove indirect link against libxml2 (Guido Günther),
+ Fix build on cygwin (Daniel Veillard),
+ Add check for kill() to fix build of cgroups on win32 (Daniel P. Berrange),
+ build: fix broken mingw cross-compilation (Eric Blake)
+
+ - Bug fixes:
+ fix memory leak in qemuProcessHandleGraphics() (Wen Congyang),
+ do not lock vm while allocating memory (Wen Congyang),
+ Fix libxl driver startup (Daniel Veillard),
+ qemu: Ignore libvirt debug messages in qemu log (Jiri Denemark),
+ qemu: Fix improper logic of qemuCgroupSetup (Osier Yang),
+ free tmp after unlinking it (Wen Congyang),
+ qemu: Fix media eject with qemu-0.12.* (Jiri Denemark),
+ check whether qemuMonitorJSONHMP() failed (Wen Congyang),
+ do not send monitor command after monitor meet error (Wen Congyang),
+ qemu: unlock qemu driver before return from domain save (Hu Tao),
+ qemu: fix regression with fd labeling on migration (Eric Blake),
+ Ignore return value of virDomainObjUnref (Markus Groß),
+ Fix infinite loop in daemon if client quits with multiple streams open (Daniel P. Berrange),
+ qemu: fix regression that hangs on save failure (Eric Blake),
+ qemu: fix restoring a compressed save image (Eric Blake),
+ util: allow clearing cloexec bit (Eric Blake),
+ logging: always NUL-terminate circular buffer (Eric Blake),
+ tests: don't alter state in $HOME (Eric Blake),
+ qemu: don't restore state label twice (Eric Blake),
+ Fix syntax error in configure.ac (Osier Yang),
+ remote: Don't leak gnutls session on negotiation error (Matthias Bolte),
+ hooks: fix regression in previous patch (Eric Blake),
+ Add missing { for qemudDomainInterfaceStats (Philipp Hahn),
+ daemon: Avoid resetting errors before they are reported (Jiri Denemark),
+ fix the check of the output of monitor command 'device_add' (Wen Congyang),
+ Make error reporting in libvirtd thread safe (Jiri Denemark),
+ update domain status forcibly even if attach a device failed (Wen Congyang),
+ util: Fix return value for virJSONValueFromString if it fails (Osier Yang),
+ Initialization error of qemuCgroupData in Qemu host usb hotplug (Wen Congyang),
+ build: fix missing initializer (Eric Blake),
+ Fix uninitialized variable & error reporting in LXC veth setup (Daniel P. Berrange),
+ udev: fix regression with qemu:///session (Eric Blake),
+ logging: fix off-by-one bug (Eric Blake),
+ do not report OOM error when prepareCall() failed (Wen Congyang),
+ Don't return an error on failure to create blkio controller (Hu Tao),
+ qemu: respect locking rules (Eric Blake),
+ openvz: fix a simple bug in openvzListDefinedDomains() (Jean-Baptiste Rouault),
+ Fix delayed event delivery when SASL is active (Daniel P. Berrange),
+ qemu: Fix copy&paste error messages in text monitor (Jiri Denemark),
+ do not unref obj in qemuDomainObjExitMonitor* (Wen Congyang),
+ qemu: check driver name while attaching disk (Wen Congyang),
+ remote: Add missing virCondDestroy calls (Matthias Bolte),
+ build: improve rpm generation for distro backports (Eric Blake),
+ storage: Fix a problem which will cause libvirtd crashed (Osier Yang),
+ Fix misc bugs in virCommandPtr (Daniel P. Berrange),
+ libvirt: fix a simple bug in virDomainSetMemoryFlags() (Taku Izumi),
+ qemu: Check the unsigned integer overflow (Osier Yang),
+ audit: eliminate potential null pointer deref when auditing macvtap devices (Laine Stump),
+ network driver: don't send default route to clients on isolated networks (Laine Stump),
+ virsh: Free stream when shutdown console (Osier Yang),
+ Add missing checks for read only connections (Guido Günther),
+ qemu: fix -global argument usage (Eric Blake),
+ Make sure we reset the umask on the error path (Guido Günther),
+ qemu: Stop guest CPUs before creating a snapshot (Jiri Denemark),
+ qemu: Escape snapshot name passed to {save,load,del}vm (Jiri Denemark),
+ qemu: Fix warnings in event handlers (Jiri Denemark),
+ storage: Update qemu-img flag checking (Osier Yang),
+ Make sure the rundir is accessible by the user (Guido Günther),
+ Fix a wrong error message thrown to user (Hu Tao),
+ unlock eventLoop before calling callback function (Wen Congyang),
+ fixes for several memory leaks (Phil Petty),
+ Fix a counter bug in the log buffer (Daniel Veillard),
+ qemu: avoid corruption of domain hashtable and misuse of freed domains (Laine Stump),
+ qemu: Add missing lock of virDomainObj before calling virDomainUnref (Laine Stump),
+ esx: Escape password for XML (Matthias Bolte),
+ util: correct retry path in virFileOperation (Eric Blake),
+ util: Allow removing hash entries in virHashForEach (Jiri Denemark),
+ qemu: avoid double close on domain restore (Eric Blake),
+ Fix port value parsing for serial and parallel ports (Michal Novotny),
+ Fix off-by-1 in virFileAbsPath. (Daniel P. Berrange),
+ security: avoid memory leak (Eric Blake),
+ protect the scsi controller to be deleted when it is in use (Wen Congyang),
+ virsh: freecell --all getting wrong NUMA nodes count (Michal Privoznik),
+ remove duplicated call to reportOOMError (Christophe Fergeau)
+
+ - Improvements:
+ Make check_fc_host() and check_vport_capable() usable as rvalues (Guido Günther),
+ maint: avoid locale-sensitivity in string case comparisons (Eric Blake),
+ extend logging to record configuration-related changes (Naoya Horiguchi),
+ Add libvirt_iohelper to spec file (Daniel Veillard),
+ cputune: New tests for cputune XML (Osier Yang),
+ cputune: Support cputune for xend driver (Osier Yang),
+ cputune: Support cputune for lxc driver (Osier Yang),
+ cputune: Support cputune for qemu driver (Osier Yang),
+ cputune: Implementations of parsing and formating cputune xml (Osier Yang),
+ cputune: Add data structures presenting cputune XML (Osier Yang),
+ cputune: Add document for cputune XML (Osier Yang),
+ cputune: Add XML schema for cputune xml (Osier Yang),
+ qemu: improve error message on failed fd transfer (Eric Blake),
+ maint: ignore new built file (Eric Blake),
+ Add domainSuspend/Resume to libxl driver (Markus Groß),
+ Add domainGetOSType to libxl driver (Markus Groß),
+ Add domainGetSchedulerType to libxl driver (Markus Groß),
+ Implements domainXMLTo/FromNative in libxl driver (Markus Groß),
+ Add vcpu functions to libxl driver (Markus Groß),
+ List authors in copyright headers (Markus Groß),
+ Add event callbacks to libxl driver (Markus Groß),
+ Remote protocol support for storage vol upload/download APIs (Daniel P. Berrange),
+ Support volume data upload/download APIs in storage driver (Daniel P. Berrange),
+ Add vol-upload and vol-download commands to virsh (Daniel P. Berrange),
+ Enhance the streams helper to support plain file I/O (Daniel P. Berrange),
+ Update event loop example programs to demonstrate best practice (Daniel P. Berrange),
+ qemu: support fd: migration with compression (Eric Blake),
+ qemu: skip granting access during fd migration (Eric Blake),
+ qemu: consolidate migration to file code (Eric Blake),
+ qemu: use common API for reading difficult files (Eric Blake),
+ qemu, storage: improve type safety (Eric Blake),
+ util: adjust indentation in previous patch (Eric Blake),
+ util: rename virFileOperation to virFileOpenAs (Eric Blake),
+ storage: simplify fd handling (Eric Blake),
+ qemu: simplify domain save fd handling (Eric Blake),
+ qemu: allow simple domain save to use fd: protocol (Eric Blake),
+ Update of localisations, switch to transifex (Daniel Veillard),
+ build: shorten libxenlight summary for consistent alignment (Eric Blake),
+ command: add virCommandAbort for cleanup paths (Eric Blake),
+ command: don't mix RunAsync and daemons (Eric Blake),
+ command: properly diagnose process exit via signal (Eric Blake),
+ Add memory functions to libxl driver (Markus Groß),
+ build: enforce reference count checking (Eric Blake),
+ maint: prohibit access(,X_OK) (Eric Blake),
+ Get cpu time and current memory balloon from libxl (Markus Groß),
+ build: nuke all .x-sc* files, and fix VPATH syntax-check (Eric Blake),
+ command: reject pidfile on non-daemon (Eric Blake),
+ rpm: add missing dependencies (Eric Blake),
+ rpm: separate runtime and build requirements (Eric Blake),
+ qemu: simplify monitor callbacks (Eric Blake),
+ 8021Qbh: use preassociate-rr during the migration prepare stage (Roopa Prabhu),
+ Wire up virDomainMigrateSetSpeed into QEMU driver (Daniel P. Berrange),
+ Wire up virDomainMigrateSetSpeed for the remote RPC driver (Daniel P. Berrange),
+ maint: update authors (Eric Blake),
+ Disable libxl build in RPM on Fedora < 16 (Daniel P. Berrange),
+ qemu: fallback to HMP drive_add/drive_del (Hu Tao),
+ qemu: Only use HMP passthrough if it is supported (Jiri Denemark),
+ qemu: Detect support for HMP passthrough (Jiri Denemark),
+ qemu: add two hook script events "prepare" and "release" (Thibault Vincent),
+ qemu: simplify interface fd handling in monitor (Eric Blake),
+ qemu: simplify PCI configfd handling in monitor (Eric Blake),
+ qemu: simplify monitor fd error handling (Eric Blake),
+ util: guarantee sane errno in virFileIsExecutable (Eric Blake),
+ Don't build libxenlight driver for Xen 4.0 (Jim Fehlig),
+ network driver: log error and abort network startup when radvd isn't found (Laine Stump),
+ build: translate changes in previous patch (Eric Blake),
+ Ensure binary is resolved wrt $PATH in virExec (Daniel P. Berrange),
+ util: Forbid calling hash APIs from iterator callback (Jiri Denemark),
+ Avoid taking lock in libvirt debug dump (Daniel Veillard),
+ unlock the monitor when unwatching the monitor (Wen Congyang),
+ Add vim configuration that makes vim auto-indent code (Hu Tao),
+ virsh: fix memtune's help message for swap_hard_limit (Nikunj A. Dadhania),
+ Add PCI sysfs reset access (Alex Williamson),
+ Support Xen sysctl v8, domctl v7 (Jim Fehlig),
+ macvtap: log an error if on failure to connect to netlink socket (Laine Stump),
+ qemu: improve efficiency of dd during snapshots (Eric Blake),
+ virsh: allow empty string arguments (Eric Blake),
+ qemu: Fallback to HMP when cpu_set QMP command is not found (Wen Congyang),
+ Change message for VIR_FROM_RPC error domain (Daniel P. Berrange),
+ Add compat function for geteuid() (Daniel P. Berrange),
+ Add virSetBlocking() to allow O_NONBLOCK to be toggle on or off (Daniel P. Berrange),
+ qemu: use more appropriate error (Eric Blake),
+ Make LXC container startup/shutdown/I/O more robust (Daniel P. Berrange),
+ Allow to dynamically set the size of the debug buffer (Daniel Veillard),
+ qemu: consolidate duplicated monitor migration code (Eric Blake),
+ qemu: use lighter-weight fd:n on incoming tunneled migration (Eric Blake),
+ Fix performance problem of virStorageVolCreateXMLFrom() (Minoru Usui),
+ libvirt-guests: avoid globbing when splitting $URIS (Eric Blake),
+ libvirt-guest.init: quoting variables (Philipp Hahn),
+ virsh: Insert error messages to avoid a quiet abortion of commands (Michal Privoznik),
+ python: Use hardcoded python path in libvirt.py (Jiri Denemark),
+ virsh: Allow starting domains by UUID (Jiri Denemark),
+ network driver: Use a separate dhcp leases file for each network (Laine Stump),
+ network driver: Start dnsmasq even if no dhcp ranges/hosts are specified. (Laine Stump),
+ libvirt-guest.init: handle domain name with spaces (Philipp Hahn),
+ domain.rng vs. formatdomain.html#elementsUSB (Philipp Hahn),
+ Ignore backing file errors in FS storage pool (Philipp Hahn),
+ remote-protocol: implement new BlkioParameters API (Gui Jianfeng),
+ virsh: Adding blkiotune command to virsh tool (Gui Jianfeng),
+ qemu: implement new BlkioParameters API (Gui Jianfeng),
+ libvirt: implements virDomain{Get,Set}BlkioParameters (Gui Jianfeng),
+ setmem: add the new options to "virsh setmem" command (Taku Izumi),
+ setmem: implement the remote protocol to address the new API (Taku Izumi),
+ setmem: implement the code to address the new API in the qemu driver (Taku Izumi),
+ audit: audit use of /dev/net/tun, /dev/tapN, /dev/vhost-net (Eric Blake),
+ qemu: don't request cgroup ACL access for /dev/net/tun (Eric Blake),
+ qemu: support vhost in attach-interface (Eric Blake),
+ qemu: Refactor qemuDomainSnapshotCreateXML (Jiri Denemark),
+ qemu: Fallback to HMP for snapshot commands (Jiri Denemark),
+ qemu: Setup infrastructure for HMP passthrough (Jiri Denemark),
+ qemu: Replace deprecated option of qemu-img (Osier Yang),
+ audit: also audit cgroup ACL permissions (Eric Blake),
+ cgroup: allow fine-tuning of device ACL permissions (Eric Blake),
+ audit: rename remaining qemu audit functions (Eric Blake),
+ audit: also audit cgroup controller path (Eric Blake),
+ audit: split cgroup audit types to allow more information (Eric Blake),
+ audit: tweak audit messages to match conventions (Eric Blake),
+ Don't overwrite virRun error messages (Cole Robinson),
+ virsh: Change option parsing functions to return tri-state information (Michal Privoznik),
+ virsh: change vshCommandOptString return type and fix const-correctness (Michal Privoznik),
+ support to detach USB disk (Wen Congyang),
+ rename qemuDomainDetachSCSIDiskDevice to qemuDomainDetachDiskDevice (Wen Congyang),
+ qemu_hotplug: Reword error if spice password change not available (Cole Robinson),
+ Move event code out of the daemon/ into src/util/ (Daniel P. Berrange),
+ Convert daemon/virsh over to use primary event APIs, rather than impl (Daniel P. Berrange),
+ Cleaning up some of the logging code (Daniel Veillard),
+ qemu: Support vram for video of qxl type (Osier Yang),
+ Add an an internal API for emergency dump of debug buffer (Daniel Veillard),
+ Add logrotate support for libvirtd.log (Daniel Veillard),
+ Change default log policy to libvirtd.log instead of syslog (Daniel Veillard),
+ Force all logs to go to the round robbin memory buffer (Daniel Veillard),
+ AUTHORS: adjust to preferred spelling (KAMEZAWA Hiroyuki),
+ Pass virSecurityManagerPtr to virSecurityDAC{Set, Restore}ChardevCallback (Soren Hansen),
+ maint: update to latest gnulib (Eric Blake),
+ Attempt to improve an error message (Daniel P. Berrange),
+ add additional event debug points (Daniel P. Berrange),
+ qemu: only request sound cgroup ACL when required (Eric Blake),
+ Add support for multiple serial ports into the Xen driver (Michal Novotny),
+ Add APIs for killing off processes inside a cgroup (Daniel P. Berrange),
+ Allow hash tables to use generic pointers as keys (Daniel P. Berrange),
+ Remove deallocator parameter from hash functions (Daniel P. Berrange),
+ Make commandtest more robust wrt its execution environment (Daniel P. Berrange),
+ audit: audit qemu pci and usb device passthrough (Eric Blake),
+ audit: audit qemu memory and vcpu adjusments (Eric Blake),
+ audit: add qemu hooks for auditing cgroup events (Eric Blake),
+ audit: prepare qemu for listing vm in cgroup audits (Eric Blake),
+ cgroup: determine when skipping non-devices (Eric Blake),
+ virExec: avoid uninitialized memory usage (Eric Blake),
+ Allow 32-on-64 execution for LXC guests (Daniel P. Berrange),
+ Put <stdbool.h> into internal.h so it is available everywhere (Daniel P. Berrange),
+ qemu: Switch over command line capabilities to virBitmap (Jiri Denemark),
+ qemu: Rename qemud\?CmdFlags to qemuCaps (Jiri Denemark),
+ qemu: Use helper functions for handling cmd line capabilities (Jiri Denemark),
+ qemu: Rename QEMUD_CMD_FLAG_* to QEMU_CAPS_* (Jiri Denemark),
+ util: Add API for converting virBitmap into printable string (Jiri Denemark),
+ util: Use unsigned long as a base type for virBitmap (Jiri Denemark),
+ Expose name + UUID to LXC containers via env variables (Daniel P. Berrange),
+ Fix discard of expected errors (Daniel P. Berrange),
+ Fix group/mode for /dev/pts inside LXC container (Daniel P. Berrange),
+ 802.1Qbh: Delay IFF_UP'ing interface until migration final stage (Roopa Prabhu),
+ storage: make debug log more useful (Osier Yang),
+ virsh: replace vshPrint with vshPrintExtra for snapshot list Otherwise extra information will be printed even if "--quiet" is specified. (Osier Yang),
+ check device-mapper when building with mpath or disk storage driver (Wen Congyang),
+ build: add dependency on gnutls-utils (Eric Blake),
+ Renamed functions in xenxs (Markus Groß),
+ Moved XM formatting functions to xenxs (Markus Groß),
+ Moved XM parsing functions to xenxs (Markus Groß),
+ Moved SEXPR formatting functions to xenxs (Markus Groß),
+ Moved SEXPR parsing functions to xenxs (Markus Groß),
+ Moved some SEXPR functions from xen-unified (Markus Groß),
+ Moved SEXPR unit to utils (Markus Groß),
+ virt-*-validate.in: quote all variable references (Dan Kenigsberg),
+ virt-pki-validate: behave when CERTTOOL is missing (Dan Kenigsberg),
+ autobuild.sh: use VPATH build (Eric Blake),
+ maint: fix 'make dist' in VPATH build (Eric Blake),
+ build: don't require pod2man for tarball builds (Eric Blake),
+ hash: make virHashFree more free-like (Eric Blake),
+ build: Fix API docs generation in VPATH build (Jiri Denemark),
+ Remove all object hashtable caches from virConnectPtr (Daniel P. Berrange),
+ nwfilter: enable rejection of packets (Stefan Berger),
+ Drop empty argument from dnsmasq call (Guido Günther),
+ esx: Ignore malformed host UUID from BIOS (Matthias Bolte),
+ build: speed up non-maintainer builds (Eric Blake),
+ build: recompute symbols after changing configure options (Eric Blake),
+ Requires gettext for client package (Osier Yang),
+ Do not add drive 'boot=on' param when a kernel is specified (Jim Fehlig),
+ factor common code in virHashAddEntry and virHashUpdateEntry (Christophe Fergeau),
+ add hash table rebalancing in virHashUpdateEntry (Christophe Fergeau),
+ hash: modernize debug code (Eric Blake),
+ build: improve 'make install' for VPATH builds (Eric Blake),
+ check more error info about whether drive_add failed (Wen Congyang),
+ logging: make VIR_ERROR and friends preserve errno (Eric Blake),
+ maint: avoid 'make syntax-check' from tarball (Eric Blake),
+ Give each virtual network bridge its own fixed MAC address (Laine Stump),
+ Allow brAddTap to create a tap device that is down (Laine Stump),
+ Add txmode attribute to interface XML for virtio backend (Laine Stump),
+ Restructure domain struct interface "driver" data for easier expansion (Laine Stump),
+ build: Fix VPATH build (Jiri Denemark),
+ storage: Allow to delete device mapper disk partition (Osier Yang)
+
+ - Cleanups:
+ The next release is 0.9.0 not 0.8.9 (Daniel Veillard),
+ maint: use space, not tab, in remote_protocol-structs (Eric Blake),
+ Remove the Open Nebula driver (Daniel P. Berrange),
+ domain_conf: drop unused ref-count in snapshot object (Eric Blake),
+ Update the set of maintainers for the project (Daniel Veillard),
+ Make virDomainObjParseNode() static (Hu Tao),
+ maint: make spacing in .sh files easier (Eric Blake),
+ network driver: Fix indentation from previous commit (Laine Stump),
+ qemu: Rename qemuMonitorCommandWithHandler as qemuMonitorText* (Jiri Denemark),
+ qemu: Rename qemuMonitorCommand{,WithFd} as qemuMonitorHMP* (Jiri Denemark),
+ maint: avoid long lines in more tests (Eric Blake),
+ maint: kill all remaining uses of old DEBUG macro (Eric Blake),
+ maint: Expand tabs in python code (Jiri Denemark),
+ remove space between function name and ( (Christophe Fergeau),
+ don't check for NULL before calling virHashFree (Christophe Fergeau),
+ remove no longer needed calls to virReportOOMError (Christophe Fergeau),
+ Move all the QEMU migration code to a new file (Daniel P. Berrange),
+ Split all QEMU process mangement code into separate file (Daniel P. Berrange)
+
+
+
0.8.8: Feb 17 2011:
- Features:
sysinfo: expose new API (Eric Blake),
diff --git a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
m4_include([gnulib/m4/inet_ntop.m4])
m4_include([gnulib/m4/inet_pton.m4])
m4_include([gnulib/m4/inline.m4])
+m4_include([gnulib/m4/intlmacosx.m4])
m4_include([gnulib/m4/intmax_t.m4])
m4_include([gnulib/m4/inttypes_h.m4])
m4_include([gnulib/m4/ioctl.m4])
+m4_include([gnulib/m4/lcmessage.m4])
+m4_include([gnulib/m4/locale-fr.m4])
+m4_include([gnulib/m4/locale-ja.m4])
+m4_include([gnulib/m4/locale-tr.m4])
+m4_include([gnulib/m4/locale-zh.m4])
+m4_include([gnulib/m4/locale_h.m4])
+m4_include([gnulib/m4/localename.m4])
m4_include([gnulib/m4/lock.m4])
m4_include([gnulib/m4/longlong.m4])
m4_include([gnulib/m4/lseek.m4])
m4_include([gnulib/m4/select.m4])
m4_include([gnulib/m4/servent.m4])
m4_include([gnulib/m4/setenv.m4])
+m4_include([gnulib/m4/setlocale.m4])
m4_include([gnulib/m4/sigaction.m4])
m4_include([gnulib/m4/signal_h.m4])
m4_include([gnulib/m4/signalblocking.m4])
m4_include([gnulib/m4/write.m4])
m4_include([gnulib/m4/xalloc.m4])
m4_include([gnulib/m4/yield.m4])
+m4_include([m4/codeset.m4])
m4_include([m4/compiler-flags.m4])
m4_include([m4/gettext.m4])
m4_include([m4/iconv.m4])
--- a/cfg.mk
+++ b/cfg.mk
halt="don't use ctype macros (use c-ctype.h)" \
$(_sc_search_regexp)
+sc_avoid_strcase:
+ @prohibit='\bstrn?case(cmp|str) *\(' \
+ halt="don't use raw strcase functions (use c-strcase instead)" \
+ $(_sc_search_regexp)
+
sc_prohibit_virBufferAdd_with_string_literal:
@prohibit='\<virBufferAdd *\([^,]+, *"[^"]' \
halt='use virBufferAddLit, not virBufferAdd, with a string literal' \
syntax-check: $(top_srcdir)/HACKING
# List all syntax-check exemptions:
+exclude_file_name_regexp--sc_avoid_strcase = ^tools/virsh\.c$$
+
_src1=libvirt|fdstream|qemu/qemu_monitor|util/(command|util)|xen/xend_internal
exclude_file_name_regexp--sc_avoid_write = \
^(src/($(_src1))|daemon/libvirtd|tools/console)\.c$$
(^docs|^python/(libvirt-override|typewrappers)\.c$$)
exclude_file_name_regexp--sc_prohibit_asprintf = \
- ^(bootstrap.conf$$|po/|src/util/util\.c$$)
+ ^(bootstrap.conf$$|po/|src/util/util\.c$$|examples/domain-events/events-c/event-test\.c$$)
exclude_file_name_regexp--sc_prohibit_close = \
(\.py$$|^docs/|(src/util/files\.c|src/libvirt\.c)$$)
diff --git a/config.h.in b/config.h.in
--- a/config.h.in
+++ b/config.h.in
/* Define to 1 when the gnulib module send should be tested. */
#undef GNULIB_TEST_SEND
+/* Define to 1 when the gnulib module setenv should be tested. */
+#undef GNULIB_TEST_SETENV
+
+/* Define to 1 when the gnulib module setlocale should be tested. */
+#undef GNULIB_TEST_SETLOCALE
+
/* Define to 1 when the gnulib module setsockopt should be tested. */
#undef GNULIB_TEST_SETSOCKOPT
/* whether capng is available for privilege reduction */
#undef HAVE_CAPNG
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
/* Define to 1 if you have the `cfmakeraw' function. */
#undef HAVE_CFMAKERAW
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
/* Define to 1 if you have the `chown' function. */
#undef HAVE_CHOWN
don't. */
#undef HAVE_DECL_PUTC_UNLOCKED
+/* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_SETENV
+
/* Define to 1 if you have the declaration of `sleep', and to 0 if you don't.
*/
#undef HAVE_DECL_SLEEP
/* Define to 1 if you have the `kill' function. */
#undef HAVE_KILL
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
/* Define to 1 if you have the `apparmor' library (-lapparmor). */
#undef HAVE_LIBAPPARMOR
/* Define to 1 if you have the <net/ethernet.h> header file. */
#undef HAVE_NET_ETHERNET_H
+/* Define to 1 if you have the `newlocale' function. */
+#undef HAVE_NEWLOCALE
+
/* whether numactl is available for topology info */
#undef HAVE_NUMACTL
/* Define to 1 if you have the <sched.h> header file. */
#undef HAVE_SCHED_H
+/* Define to 1 if you have the <search.h> header file. */
+#undef HAVE_SEARCH_H
+
/* whether basic SELinux functionality is available */
#undef HAVE_SELINUX
/* Define to 1 if you have the <selinux/label.h> header file. */
#undef HAVE_SELINUX_LABEL_H
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
/* Define to 1 if you have the `shutdown' function. */
#undef HAVE_SHUTDOWN
/* Define if struct tm has the tm_gmtoff member. */
#undef HAVE_TM_GMTOFF
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
/* use UDEV for host device enumeration */
#undef HAVE_UDEV
/* Define to 1 if the system has the type `unsigned long long int'. */
#undef HAVE_UNSIGNED_LONG_LONG_INT
+/* Define to 1 if you have the `uselocale' function. */
+#undef HAVE_USELOCALE
+
/* Define to 1 if you have the `usleep' function. */
#undef HAVE_USLEEP
/* Define to 1 if you have the <xen/xen.h> header file. */
#undef HAVE_XEN_XEN_H
+/* Define to 1 if you have the <xlocale.h> header file. */
+#undef HAVE_XLOCALE_H
+
/* Have query_raw field in libxml2 xmlURI structure */
#undef HAVE_XMLURI_QUERY_RAW
diff --git a/configure b/configure
--- a/configure
+++ b/configure
LIBTESTS_LIBDEPS
YIELD_LIB
abs_aux_dir
+LOCALE_ZH_CN
+LOCALE_JA
+LOCALE_FR_UTF8
+INTL_MACOSX_LIBS
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
+NEXT_LOCALE_H
+HAVE_XLOCALE_H
+REPLACE_DUPLOCALE
+REPLACE_SETLOCALE
+HAVE_DUPLOCALE
+GNULIB_DUPLOCALE
+GNULIB_SETLOCALE
+LOCALE_TR_UTF8
+LOCALE_FR
gltests_WITNESS
HAVE_WINT_T
NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
gl_func_list="$gl_func_list vasnprintf"
gl_func_list="$gl_func_list getegid"
gl_header_list="$gl_header_list grp.h"
+gl_header_list="$gl_header_list xlocale.h"
+gl_func_list="$gl_func_list newlocale"
gl_func_list="$gl_func_list getgrouplist"
+gl_func_list="$gl_func_list setenv"
gl_func_list="$gl_func_list symlink"
gl_func_list="$gl_func_list shutdown"
gl_func_list="$gl_func_list cfmakeraw"
# Code from module c++defs:
# Code from module c-ctype:
# Code from module c-ctype-tests:
+ # Code from module c-strcase:
+ # Code from module c-strcase-tests:
+ # Code from module c-strcasestr:
+ # Code from module c-strcasestr-tests:
# Code from module canonicalize-lgpl:
# Code from module canonicalize-lgpl-tests:
# Code from module chown:
# Code from module intprops:
# Code from module ioctl:
# Code from module listen:
+ # Code from module locale:
+ # Code from module locale-tests:
+ # Code from module localename:
+ # Code from module localename-tests:
# Code from module lock:
# Code from module lock-tests:
# Code from module lseek:
# Code from module netdb-tests:
# Code from module netinet_in:
# Code from module netinet_in-tests:
+ # Code from module nonblocking:
+ # Code from module nonblocking-tests:
# Code from module open:
# Code from module open-tests:
# Code from module pathmax:
# Code from module select-tests:
# Code from module send:
# Code from module servent:
+ # Code from module setenv:
+ # Code from module setenv-tests:
+ # Code from module setlocale:
+ # Code from module setlocale-tests:
# Code from module setsockopt:
# Code from module sigaction:
# Code from module sigaction-tests:
fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_langinfo_codeset=yes
+else
+ am_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+ fi
+
+
@@ -14461,7 +14526,271 @@ LIBS=$ac_save_LIBS
+ GNULIB_SETLOCALE=0;
+ GNULIB_DUPLOCALE=0;
+ HAVE_DUPLOCALE=1;
+ REPLACE_SETLOCALE=0;
+ REPLACE_DUPLOCALE=0;
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if test "${gt_cv_val_LC_MESSAGES+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_val_LC_MESSAGES=yes
+else
+ gt_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5
+$as_echo "$gt_cv_val_LC_MESSAGES" >&6; }
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFLocaleCopyCurrent=yes
+else
+ gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_setenv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+ if test $ac_cv_have_decl_setenv = no; then
+ HAVE_DECL_SETENV=0
+ fi
+
+ :
+
+
+
+
+
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+$as_echo_n "checking whether setenv validates arguments... " >&6; }
+if test "${gl_cv_func_setenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_setenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+
+int
+main ()
+{
+
+ int result = 0;
+ {
+ if (setenv ("", "", 0) != -1)
+ result |= 1;
+ else if (errno != EINVAL)
+ result |= 2;
+ }
+ {
+ if (setenv ("a", "=", 1) != 0)
+ result |= 4;
+ else if (strcmp (getenv ("a"), "=") != 0)
+ result |= 8;
+ }
+ return result;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_setenv_works=yes
+else
+ gl_cv_func_setenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
+$as_echo "$gl_cv_func_setenv_works" >&6; }
+ if test "$gl_cv_func_setenv_works" != yes; then
+ REPLACE_SETENV=1
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+ :
+
+
+
+
+
+ for ac_header in search.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SEARCH_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in tsearch
+do :
+ ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TSEARCH 1
+_ACEOF
+fi
+done
# Code from module c++defs:
# Code from module c-ctype:
+ # Code from module c-strcase:
+ # Code from module c-strcasestr:
# Code from module canonicalize-lgpl:
+ # Code from module nonblocking:
# Code from module open:
@@ -23981,21 +24313,284 @@ $as_echo "#define GNULIB_TEST_BIND 1" >>confdefs.h
- :
-
-
-
-
-
-
-
-
-
- GNULIB_ENVIRON=$gl_module_indicator_condition
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
-$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* On native Win32, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Win32 locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+$as_echo_n "checking for a turkish Unicode locale... " >&6; }
+if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* On native Win32, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Win32 locale name.
+ if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=Turkish_Turkey.65001
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+$as_echo "$gt_cv_locale_tr_utf8" >&6; }
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+ GNULIB_ENVIRON=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
@@ -24775,6 +25370,181 @@ $as_echo "#define GNULIB_TEST_LISTEN 1" >>confdefs.h
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
+$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
+if test "${gl_cv_header_locale_h_posix2001+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <locale.h>
+ int x = LC_MESSAGES;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_locale_h_posix2001=yes
+else
+ gl_cv_header_locale_h_posix2001=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
+$as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
+
+
+ :
+
+
+
+
+
+ if test $ac_cv_header_xlocale_h = yes; then
+ HAVE_XLOCALE_H=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
+$as_echo_n "checking whether locale.h defines locale_t... " >&6; }
+if test "${gl_cv_header_locale_has_locale_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <locale.h>
+ locale_t x;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_locale_has_locale_t=yes
+else
+ gl_cv_header_locale_has_locale_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
+$as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
+ if test $gl_cv_header_locale_has_locale_t = yes; then
+ gl_cv_header_locale_h_needs_xlocale_h=no
+ else
+ gl_cv_header_locale_h_needs_xlocale_h=yes
+ fi
+ else
+ HAVE_XLOCALE_H=0
+ gl_cv_header_locale_h_needs_xlocale_h=no
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_locale_h='<'locale.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
+$as_echo_n "checking absolute name of <locale.h>... " >&6; }
+if test "${gl_cv_next_locale_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <locale.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/locale.h#{
+ s#.*"\(.*/locale.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
+$as_echo "$gl_cv_next_locale_h" >&6; }
+ fi
+ NEXT_LOCALE_H=$gl_cv_next_locale_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'locale.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_locale_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test -n "$STDDEF_H" \
+ || test $gl_cv_header_locale_h_posix2001 = no \
+ || test $gl_cv_header_locale_h_needs_xlocale_h = yes; then
+
+ :
+
+ fi
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+ for ac_func in setlocale uselocale
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+ :
+
+
+
+
+
+
+
+
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
@@ -25141,6 +25911,592 @@ _ACEOF
+
+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext"
+
+ fi
+
+
+
+
+ GNULIB_SETENV=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
+
+
+
+
+
+
+ case "$host_os" in
+ mingw*) REPLACE_SETLOCALE=1 ;;
+ esac
+ if test $REPLACE_SETLOCALE = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+
+ GNULIB_SETLOCALE=$gl_module_indicator_condition
+
+
+
+$as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* On native Win32, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the native Win32 locale name.
+ if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=French_France.1252
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* On native Win32, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Win32 locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* On native Win32, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding (except on MirBSD). */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Note that on native Win32, the Japanese locale is Japanese_Japan.932,
+ # and CP932 is very different from EUC-JP, so we cannot use it here.
+ gt_cv_locale_ja=none
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ /* On native Win32, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is speficied, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+#else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+#endif
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail.
+ On MirBSD 10, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "UTF-8". */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
+ || strcmp (cs, "UTF-8") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding (except on MirBSD). */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Win32 locale name.
+ if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=Chinese_China.54936
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ ;;
+ esac
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
:
diff --git a/daemon/Makefile.in b/daemon/Makefile.in
--- a/daemon/Makefile.in
+++ b/daemon/Makefile.in
$(top_srcdir)/gnulib/m4/inet_ntop.m4 \
$(top_srcdir)/gnulib/m4/inet_pton.m4 \
$(top_srcdir)/gnulib/m4/inline.m4 \
+ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
$(top_srcdir)/gnulib/m4/intmax_t.m4 \
$(top_srcdir)/gnulib/m4/inttypes_h.m4 \
$(top_srcdir)/gnulib/m4/ioctl.m4 \
+ $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+ $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+ $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+ $(top_srcdir)/gnulib/m4/locale_h.m4 \
+ $(top_srcdir)/gnulib/m4/localename.m4 \
$(top_srcdir)/gnulib/m4/lock.m4 \
$(top_srcdir)/gnulib/m4/longlong.m4 \
$(top_srcdir)/gnulib/m4/lseek.m4 \
$(top_srcdir)/gnulib/m4/select.m4 \
$(top_srcdir)/gnulib/m4/servent.m4 \
$(top_srcdir)/gnulib/m4/setenv.m4 \
+ $(top_srcdir)/gnulib/m4/setlocale.m4 \
$(top_srcdir)/gnulib/m4/sigaction.m4 \
$(top_srcdir)/gnulib/m4/signal_h.m4 \
$(top_srcdir)/gnulib/m4/signalblocking.m4 \
$(top_srcdir)/gnulib/m4/wchar_h.m4 \
$(top_srcdir)/gnulib/m4/write.m4 \
$(top_srcdir)/gnulib/m4/xalloc.m4 \
- $(top_srcdir)/gnulib/m4/yield.m4 \
+ $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/m4/codeset.m4 \
$(top_srcdir)/m4/compiler-flags.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_SEND = @GNULIB_SEND@
GNULIB_SENDTO = @GNULIB_SENDTO@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
HAVE_WMEMSET = @HAVE_WMEMSET@
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
HOSTENT_LIB = @HOSTENT_LIB@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
IP6TABLES_PATH = @IP6TABLES_PATH@
IPTABLES_PATH = @IPTABLES_PATH@
IP_PATH = @IP_PATH@
LIB_PTHREAD = @LIB_PTHREAD@
LIPO = @LIPO@
LN_S = @LN_S@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LOCK_CHECKING_CFLAGS = @LOCK_CHECKING_CFLAGS@
LTALLOCA = @LTALLOCA@
LTLIBICONV = @LTLIBICONV@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
NEXT_AS_FIRST_DIRECTIVE_POLL_H = @NEXT_AS_FIRST_DIRECTIVE_POLL_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_NETDB_H = @NEXT_NETDB_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
NEXT_POLL_H = @NEXT_POLL_H@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
diff --git a/docs/Makefile.in b/docs/Makefile.in
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
$(top_srcdir)/gnulib/m4/inet_ntop.m4 \
$(top_srcdir)/gnulib/m4/inet_pton.m4 \
$(top_srcdir)/gnulib/m4/inline.m4 \
+ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
$(top_srcdir)/gnulib/m4/intmax_t.m4 \
$(top_srcdir)/gnulib/m4/inttypes_h.m4 \
$(top_srcdir)/gnulib/m4/ioctl.m4 \
+ $(top_srcdir)/gnulib/m4/lcmessage.m4 \
+ $(top_srcdir)/gnulib/m4/locale-fr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-ja.m4 \
+ $(top_srcdir)/gnulib/m4/locale-tr.m4 \
+ $(top_srcdir)/gnulib/m4/locale-zh.m4 \
+ $(top_srcdir)/gnulib/m4/locale_h.m4 \
+ $(top_srcdir)/gnulib/m4/localename.m4 \
$(top_srcdir)/gnulib/m4/lock.m4 \
$(top_srcdir)/gnulib/m4/longlong.m4 \
$(top_srcdir)/gnulib/m4/lseek.m4 \
$(top_srcdir)/gnulib/m4/select.m4 \
$(top_srcdir)/gnulib/m4/servent.m4 \
$(top_srcdir)/gnulib/m4/setenv.m4 \
+ $(top_srcdir)/gnulib/m4/setlocale.m4 \
$(top_srcdir)/gnulib/m4/sigaction.m4 \
$(top_srcdir)/gnulib/m4/signal_h.m4 \
$(top_srcdir)/gnulib/m4/signalblocking.m4 \
$(top_srcdir)/gnulib/m4/wchar_h.m4 \
$(top_srcdir)/gnulib/m4/write.m4 \
$(top_srcdir)/gnulib/m4/xalloc.m4 \
- $(top_srcdir)/gnulib/m4/yield.m4 \
+ $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/m4/codeset.m4 \
$(top_srcdir)/m4/compiler-flags.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
GNULIB_SEND = @GNULIB_SEND@
GNULIB_SENDTO = @GNULIB_SENDTO@
GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_FACCESSAT = @HAVE_FACCESSAT@
HAVE_FCHDIR = @HAVE_FCHDIR@
HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
HAVE_WMEMSET = @HAVE_WMEMSET@
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
HOSTENT_LIB = @HOSTENT_LIB@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
IP6TABLES_PATH = @IP6TABLES_PATH@
IPTABLES_PATH = @IPTABLES_PATH@
IP_PATH = @IP_PATH@
LIB_PTHREAD = @LIB_PTHREAD@
LIPO = @LIPO@
LN_S = @LN_S@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LOCK_CHECKING_CFLAGS = @LOCK_CHECKING_CFLAGS@
LTALLOCA = @LTALLOCA@
LTLIBICONV = @LTLIBICONV@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_NETDB_H = @NEXT_AS_FIRST_DIRECTIVE_NETDB_H@
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
NEXT_AS_FIRST_DIRECTIVE_POLL_H = @NEXT_AS_FIRST_DIRECTIVE_POLL_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_NETDB_H = @NEXT_NETDB_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
NEXT_POLL_H = @NEXT_POLL_H@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SLEEP = @REPLACE_SLEEP@
REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
REPLACE_SPRINTF = @REPLACE_SPRINTF@
diff --git a/docs/api.html b/docs/api.html
--- a/docs/api.html
+++ b/docs/api.html
<div id="content">
<h1>The libvirt API concepts</h1>
<p> This page describes the main principles and architecture choices
- behind the definition of the libvirt API:
-
- </p>
+ behind the definition of the libvirt API:</p>
<ul><li>
<a href="#Objects">Objects exposed</a>
</li><li>
name will default to a preselected hypervisor but it's probably not a
wise thing to do in most cases. See the <a href="uri.html">connection
URI</a> page for a full descriptions of the values allowed.</p>
- <p>
- </p>
<p> Once the application obtained a <a href="html/libvirt-libvirt.html#virConnectPtr"><code>virConnectPtr</code></a>
connection to the
hypervisor it can then use it to manage domains and related resources
a permanent definition available in the system for them. Based on this
thay can be activated dynamically in order to be used.</p>
<p> Most kind of object can also be named in various ways:</p>
- <p>
- </p>
<ul><li>by their <code>name</code>, an user friendly identifier but
whose unicity cannot be garanteed between two nodes.</li><li>by their <code>ID</code>, which is a runtime unique identifier
provided by the hypervisor for one given activation of the object,
and a verb describing the action on that object.</p>
<p> For each first class object you will find apis
for the following actions:</p>
- <ul><li><b>Lookup</b>:...LookupByName,
- </li><li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
+ <ul><li><b>Lookup</b>:...LookupByName,</li><li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
those are used to enumerate a set of object available to an given
hypervisor connection like:
<a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>,
<a href="html/libvirt-libvirt.html#virStoragePoolSetAutostart"><code>virStoragePoolSetAutostart</code></a>,
<a href="html/libvirt-libvirt.html#virNetworkGetBridgeName"><code>virNetworkGetBridgeName</code></a>, etc.</li><li><b>Creation</b>: </li><li><b>Destruction</b>: ... </li></ul>
<p> For more in-depth details of the storage related APIs see
- <a href="storage.html">the storage management page</a>,
+ <a href="storage.html">the storage management page</a>.
</p>
<h2>
<a name="Driver" id="Driver">The libvirt drivers</a>
diff --git a/docs/api.html.in b/docs/api.html.in
--- a/docs/api.html.in
+++ b/docs/api.html.in
<h1>The libvirt API concepts</h1>
<p> This page describes the main principles and architecture choices
- behind the definition of the libvirt API:
+ behind the definition of the libvirt API:</p>
<ul id="toc"></ul>
possible to use both KVM and LinuxContainers on the same node). A NULL
name will default to a preselected hypervisor but it's probably not a
wise thing to do in most cases. See the <a href="uri.html">connection
- URI</a> page for a full descriptions of the values allowed.<p>
+ URI</a> page for a full descriptions of the values allowed.</p>
<p> Once the application obtained a <code class='docref'>virConnectPtr</code>
connection to the
hypervisor it can then use it to manage domains and related resources
<code>defined</code> in which case they are inactive but there is
a permanent definition available in the system for them. Based on this
thay can be activated dynamically in order to be used.</p>
- <p> Most kind of object can also be named in various ways:<p>
+ <p> Most kind of object can also be named in various ways:</p>
<ul>
<li>by their <code>name</code>, an user friendly identifier but
whose unicity cannot be garanteed between two nodes.</li>
<p> For each first class object you will find apis
for the following actions:</p>
<ul>
- <li><b>Lookup</b>:...LookupByName,
+ <li><b>Lookup</b>:...LookupByName,</li>
<li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
those are used to enumerate a set of object available to an given
hypervisor connection like:
<li><b>Destruction</b>: ... </li>
</ul>
<p> For more in-depth details of the storage related APIs see
- <a href="storage.html">the storage management page</a>,
+ <a href="storage.html">the storage management page</a>.
+ </p>
<h2><a name="Driver">The libvirt drivers</a></h2>
<p></p>
<p class="image">
--- a/docs/archnetwork.html.in
+++ b/docs/archnetwork.html.in
</li>
<li><strong>Guest C</strong>. The only network interface is connected
to a virtual network <code>VLAN 2</code>. It has no direct connectivity
- to a physical LAN, relying on <code>Guest B</codE> to route traffic
+ to a physical LAN, relying on <code>Guest B</code> to route traffic
on its behalf.
</li>
</ul>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainSetMemoryFlags"/>virDomainSetMemoryFlags ()</h3><pre class="programlisting">int virDomainSetMemoryFlags (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory, <br/> unsigned int flags)<br/>
-</pre><p/>
-<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td/></tr></tbody></table></div></div>
+</pre><p>Dynamically change the target amount of physical memory allocated to a
+domain. If domain is NULL, then this change the amount of memory reserved
+to Domain0 i.e. the domain where the application runs.
+This funcation may requires privileged access to the hypervisor.
+
+@flags must include <a href="libvirt-libvirt.html#VIR_DOMAIN_MEM_LIVE">VIR_DOMAIN_MEM_LIVE</a> to affect a running
+domain (which may fail if domain is not active), or
+VIR_DOMAIN_MEM_CONFIG to affect the next boot via the XML
+description of the domain. Both flags may be set.</p>
+<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an OR'ed set of <a href="libvirt-libvirt.html#virDomainMemoryModFlags">virDomainMemoryModFlags</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainSetMemoryParameters"/>virDomainSetMemoryParameters ()</h3><pre class="programlisting">int virDomainSetMemoryParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virMemoryParameterPtr">virMemoryParameterPtr</a> params, <br/> int nparams, <br/> unsigned int flags)<br/>
</pre><p>Change the memory tunables
diff --git a/docs/drvesx.html.in b/docs/drvesx.html.in
--- a/docs/drvesx.html.in
+++ b/docs/drvesx.html.in
</pre>
- <h4><a name="extraparams">Extra parameters</h4>
+ <h4><a name="extraparams">Extra parameters</a></h4>
<p>
Extra parameters can be added to a URI as part of the query string
(the part following <code>?</code>). A single parameter is formed by a
There are several specialties in the domain XML config for ESX domains.
</p>
- <h3><a name="restrictions">Restrictions</h3>
+ <h3><a name="restrictions">Restrictions</a></h3>
<p>
There are some restrictions for some values of the domain XML config.
The driver will complain if this restrictions are violated.
</ul>
- <h3><a name="datastore">Datastore references</h3>
+ <h3><a name="datastore">Datastore references</a></h3>
<p>
Storage is managed in datastores. VMware uses a special path format to
reference files in a datastore. Basically, the datastore name is put
</p>
- <h3><a name="macaddresses">MAC addresses</h3>
+ <h3><a name="macaddresses">MAC addresses</a></h3>
<p>
VMware has registered two MAC address prefixes for domains:
<code>00:0c:29</code> and <code>00:50:56</code>. These prefixes are
</pre>
- <h3><a name="hardware">Available hardware</h3>
+ <h3><a name="hardware">Available hardware</a></h3>
<p>
VMware ESX supports different models of SCSI controllers and network
cards.
diff --git a/docs/drvvmware.html b/docs/drvvmware.html
--- a/docs/drvvmware.html
+++ b/docs/drvvmware.html
</p>
<p>
This driver uses the "vmrun" utility which is distributed with the VMware VIX API.
- You can download the VIX API from <a href="http://www.vmware.com/support/developer/vix-api/">here</a>.
-
+ You can download the VIX API
+ from <a href="http://www.vmware.com/support/developer/vix-api/">here</a>.
</p>
<h2>Connections to VMware driver</h2>
<p>
diff --git a/docs/drvvmware.html.in b/docs/drvvmware.html.in
--- a/docs/drvvmware.html.in
+++ b/docs/drvvmware.html.in
</p>
<p>
This driver uses the "vmrun" utility which is distributed with the VMware VIX API.
- You can download the VIX API from <a href="http://www.vmware.com/support/developer/vix-api/">here</a>.
+ You can download the VIX API
+ from <a href="http://www.vmware.com/support/developer/vix-api/">here</a>.
+ </p>
<h2>Connections to VMware driver</h2>
diff --git a/docs/formatdomain.html b/docs/formatdomain.html
--- a/docs/formatdomain.html
+++ b/docs/formatdomain.html
omitted, it defaults to the OS provided defaults.</dd><dt><code>weight</code></dt><dd> The optional <code>weight</code> element is the I/O weight of the
guest. The value should be in range [100, 1000].</dd><dt><code>memtune</code></dt><dd> The optional <code>memtune</code> element provides details
regarding the memory tunable parameters for the domain. If this is
- omitted, it defaults to the OS provided defaults.</dd><dt><code>hard_limit</code></dt><dd> The optional <code>hard_limit</code> element is the maximum memory
+ omitted, it defaults to the OS provided defaults. For QEMU/KVM, the
+ parameters are applied to the QEMU process as a whole. Thus, when
+ counting them, one needs to add up guest RAM, guest video RAM, and
+ some memory overhead of QEMU itself. The last piece is hard to
+ determine so one needs guess and try.</dd><dt><code>hard_limit</code></dt><dd> The optional <code>hard_limit</code> element is the maximum memory
the guest can use. The units for this value are kilobytes (i.e. blocks
of 1024 bytes)</dd><dt><code>soft_limit</code></dt><dd> The optional <code>soft_limit</code> element is the memory limit to
enforce during memory contention. The units for this value are
regarding the cpu tunable parameters for the domain.</dd><dt><code>vcpupin</code></dt><dd> The optional <code>vcpupin</code> element specifies which of host
physical CPUS the domain VCPU will be pinned to. If this is ommited,
each VCPU pinned to all the physical CPUS by default. It contains two
- required attributes, the attribute <code>vcpu specifies vcpu id,
+ required attributes, the attribute <code>vcpu</code> specifies vcpu id,
and the attribute <code>cpuset</code> is same as attribute <code>cpuset</code>
- of element <code>vcpu</code>. NB, Only qemu driver supports</code></dd><dt><code>shares</code></dt><dd> The optional <code>shares</code> element specifies the proportional
+ of element <code>vcpu</code>. NB, Only qemu driver supports</dd><dt><code>shares</code></dt><dd> The optional <code>shares</code> element specifies the proportional
weighted share for the domain. If this is ommited, it defaults to
the OS provided defaults. NB, There is no unit for the value, it's a relative
measure based on the setting of other VM, e.g. A VM configured with value
originate from are directly delivered to the target macvtap device.
Both origin and destination devices need to be in bridge mode
for direct delivery. If either one of them is in <code>vepa</code> mode,
- a VEPA capable bridge is required.
- </dd><dt><code>private</code></dt><dd>All packets are sent to the external bridge and will only be
+ a VEPA capable bridge is required.</dd><dt><code>private</code></dt><dd>All packets are sent to the external bridge and will only be
delivered to a target VM on the same host if they are sent through an
external router or gateway and that device sends them back to the
host. This procedure is followed if either the source or destination
<span class="since">Since 0.8.5</span> you can also use <code>telnets</code>
(secure telnet) and <code>tls</code>.
</p>
- <p>
-
-</p>
<pre>
...
<devices>
<dt><code>memtune</code></dt>
<dd> The optional <code>memtune</code> element provides details
regarding the memory tunable parameters for the domain. If this is
- omitted, it defaults to the OS provided defaults.</dd>
+ omitted, it defaults to the OS provided defaults. For QEMU/KVM, the
+ parameters are applied to the QEMU process as a whole. Thus, when
+ counting them, one needs to add up guest RAM, guest video RAM, and
+ some memory overhead of QEMU itself. The last piece is hard to
+ determine so one needs guess and try.</dd>
<dt><code>hard_limit</code></dt>
<dd> The optional <code>hard_limit</code> element is the maximum memory
the guest can use. The units for this value are kilobytes (i.e. blocks
<dd> The optional <code>vcpupin</code> element specifies which of host
physical CPUS the domain VCPU will be pinned to. If this is ommited,
each VCPU pinned to all the physical CPUS by default. It contains two
- required attributes, the attribute <code>vcpu</vcpu> specifies vcpu id,
+ required attributes, the attribute <code>vcpu</code> specifies vcpu id,
and the attribute <code>cpuset</code> is same as attribute <code>cpuset</code>
of element <code>vcpu</code>. NB, Only qemu driver supports</dd>
<dt><code>shares</code></dt>
<p>
Provides direct attachment of the virtual machine's NIC to the given
physial interface of the host.
- <span class="since">Since 0.7.7 (QEMU and KVM only)</span><br>
+ <span class="since">Since 0.7.7 (QEMU and KVM only)</span><br/>
This setup requires the Linux macvtap
driver to be available. <span class="since">(Since Linux 2.6.34.)</span>
One of the modes 'vepa'
originate from are directly delivered to the target macvtap device.
Both origin and destination devices need to be in bridge mode
for direct delivery. If either one of them is in <code>vepa</code> mode,
- a VEPA capable bridge is required.
+ a VEPA capable bridge is required.</dd>
<dt><code>private</code></dt>
<dd>All packets are sent to the external bridge and will only be
delivered to a target VM on the same host if they are sent through an
The <code>txmode</code> attribute specifies how to handle
transmission of packets when the transmit buffer is full. The
value can be either 'iothread' or 'timer'.
- <span class="since">Since 0.8.8 (QEMU and KVM only)</span><br><br>
+ <span class="since">Since 0.8.8 (QEMU and KVM only)</span><br/><br/>
If set to 'iothread', packet tx is all done in an iothread in
the bottom half of the driver (this option translates into
adding "tx=bh" to the qemu commandline -device virtio-net-pci
- option).<br><br>
+ option).<br/><br/>
If set to 'timer', tx work is done in qemu, and if there is
more tx data than can be sent at the present time, a timer is
set before qemu moves on to do other things; when the timer
- fires, another attempt is made to send more data.<br><br>
+ fires, another attempt is made to send more data.<br/><br/>
The resulting difference, according to the qemu developer who
added the option is: "bh makes tx more asynchronous and reduces
latency, but potentially causes more processor bandwidth
contention since the cpu doing the tx isn't necessarily the
- cpu where the guest generated the packets."<br><br>
+ cpu where the guest generated the packets."<br/><br/>
<b>In general you should leave this option alone, unless you
are very certain you know what you are doing.</b>
in clear text. The <code>keymap</code> attribute specifies the keymap
to use. It is possible to set a limit on the validity of the password
be giving an timestamp <code>passwdValidTo='2010-04-09T15:51:00'</code>
- assumed to be in UTC. NB, this may not be supported by all hypervisors.<br>
- <br>
+ assumed to be in UTC. NB, this may not be supported by all hypervisors.<br/>
+ <br/>
Rather than using listen/port, QEMU supports a <code>socket</code>
attribute for listening on a unix domain socket path.
<span class="since">Since 0.8.8</span>
Alternatively you can use <code>telnet</code> instead of <code>raw</code> TCP.
<span class="since">Since 0.8.5</span> you can also use <code>telnets</code>
(secure telnet) and <code>tls</code>.
- <p>
+ </p>
<pre>
...
--- a/docs/formatnwfilter.html
+++ b/docs/formatnwfilter.html
</p>
<ul><li>
action -- mandatory; must either be <code>drop</code>,
- <code>reject</code><span class="since">(since 0.8.9)</span>,
+ <code>reject</code><span class="since">(since 0.9.0)</span>,
or <code>accept</code> if
the evaluation of the filtering rule is supposed to drop,
reject (using ICMP message), or accept a packet
to the network filtering subsystem start with the prefix
<code>nwfilter</code>. The following commands are available:
</p>
- <p>
- </p>
<ul><li>nwfilter-list : list UUIDs and names of all network filters</li><li>nwfilter-define : define a new network filter or update an existing one</li><li>nwfilter-undefine : delete a network filter given its name; it must not be currently in use</li><li>nwfilter-dumpxml : display a network filter given its name</li><li>nwfilter-edit : edit a network filter given its name</li></ul>
<h2>
<a name="nwfexamples" id="nwfexamples">Pre-existing network filters</a>
The requirements for this filter are:
</p>
<ul><li>prevents a VM's interface from MAC, IP and ARP spoofing</li><li>opens only TCP ports 22 and 80 of a VM's interface</li><li>allows the VM to send ping traffic from an interface
- but not let the VM be pinged on the interface</li><li>allows the VM to do DNS lookups (UDP towards port 53)</li><li>enable an ftp server (in active mode) to be run inside the VM
- </li></ul>
+ but not let the VM be pinged on the interface</li><li>allows the VM to do DNS lookups (UDP towards port 53)</li><li>enable an ftp server (in active mode) to be run inside the VM</li></ul>
<p>
The additional requirement of allowing an ftp server to be run inside
the VM maps into the requirement of allowing port 21 to be reachable
cannot be circumvented from within
the virtual machine, it makes them mandatory from the point of
view of a virtual machine user.
- <br><br>
+ <br/><br/>
The network filter subsystem allows each virtual machine's network
traffic filtering rules to be configured individually on a per
interface basis. The rules are
applied on the host when the virtual machine is started and can be modified
while the virtual machine is running. The latter can be achieved by
modifying the XML description of a network filter.
- <br><br>
+ <br/><br/>
Multiple virtual machines can make use of the same generic network filter.
When such a filter is modified, the network traffic filtering rules
of all running virtual machines that reference this filter are updated.
- <br><br>
+ <br/><br/>
Network filtering support is available <span class="since">since 0.8.1
(Qemu, KVM)</span>
</p>
other filters can be used, a <i>tree</i> of filters can be built.
The <code>clean-traffic</code> filter can be viewed using the
command <code>virsh nwfilter-dumpxml clean-traffic</code>.
- <br><br>
+ <br/><br/>
As previously mentioned, a single network filter can be referenced
by multiple virtual machines. Since interfaces will typically
have individual parameters associated with their respective traffic
10.0.0.1 and enforce that the traffic from this interface will
always be using 10.0.0.1 as the source IP address, which is
one of the purposes of this particular filter.
- <br><br>
+ <br/><br/>
</p>
<h3><a name="nwfconceptsvars">Usage of variables in filters</a></h3>
Two variables names have so far been reserved for usage by the
network traffic filtering subsystem: <code>MAC</code> and
<code>IP</code>.
- <br><br>
+ <br/><br/>
<code>MAC</code> is the MAC address of the
network interface. A filtering rule that references this variable
will automatically be instantiated with the MAC address of the
the MAC parameter. Even though it is possible to specify the MAC
parameter similar to the IP parameter above, it is discouraged
since libvirt knows what MAC address an interface will be using.
- <br><br>
+ <br/><br/>
The parameter <code>IP</code> represents the IP address
that the operating system inside the virtual machine is expected
to use on the given interface. The <code>IP</code> parameter
For current limitations on IP address detection, consult the
<a href="#nwflimits">section on limitations</a> on how to use this
feature and what to expect when using it.
- <br><br>
+ <br/><br/>
The following is the XML description of the network filer
<code>no-arp-spoofing</code>. It serves as an example for
a network filter XML referencing the <code>MAC</code> and
filters may be referenced multiple times in a filter tree but
references between filters must not introduce loops (directed
acyclic graph).
- <br><br>
+ <br/><br/>
The following shows the XML of the <code>clean-traffic</code>
network filter referencing several other filters.
</p>
needs to be provided inside a <code>filter</code> node. This
node must have the attribute <code>filter</code> whose value contains
the name of the filter to be referenced.
- <br><br>
+ <br/><br/>
New network filters can be defined at any time and
may contain references to network filters that are
not known to libvirt, yet. However, once a virtual machine
<ul>
<li>
action -- mandatory; must either be <code>drop</code>,
- <code>reject</code><span class="since">(since 0.8.9)</span>,
+ <code>reject</code><span class="since">(since 0.9.0)</span>,
or <code>accept</code> if
the evaluation of the filtering rule is supposed to drop,
reject (using ICMP message), or accept a packet
<li>
statematch -- optional; possible values are '0' or 'false' to
turn the underlying connection state matching off; default is 'true'
- <br>
+ <br/>
Also read the section on <a href="#nwfelemsRulesAdv">advanced configuration</a>
topics.
</li>
traffic of type <code>ip</code> is also associated with the chain
'ipv4' then that filter's rules will be ordered relative to the priority
500 of the shown rule.
- <br><br>
+ <br/><br/>
A rule may contain a single rule for filtering of traffic. The
above example shows that traffic of type <code>ip</code> is to be
filtered.
<li>STRING: A string</li>
</ul>
<p>
- <br><br>
+ <br/><br/>
Every attribute except for those of type IP_MASK or IPV6_MASK can
be negated using the <code>match</code>
attribute with value <code>no</code>. Multiple negated attributes
the protocol property attribute1 does not match value1 AND
the protocol property attribute2 does not match value2 AND
the protocol property attribute3 matches value3.
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoMAC">MAC (Ethernet)</a></h5>
<p>
Protocol ID: <code>mac</code>
- <br>
+ <br/>
Note: Rules of this type should go into the <code>root</code> chain.
</p>
<table class="top_table">
<h5><a name="nwfelemsRulesProtoARP">ARP/RARP</a></h5>
<p>
Protocol ID: <code>arp</code> or <code>rarp</code>
- <br>
+ <br/>
Note: Rules of this type should either go into the
<code>root</code> or <code>arp/rarp</code> chain.
</p>
Valid strings for the <code>Opcode</code> field are:
Request, Reply, Request_Reverse, Reply_Reverse, DRARP_Request,
DRARP_Reply, DRARP_Error, InARP_Request, ARP_NAK
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoIP">IPv4</a></h5>
<p>
Valid strings for <code>protocol</code> are:
tcp, udp, udplite, esp, ah, icmp, igmp, sctp
- <br><br>
+ <br/><br/>
</p>
<p>
Valid strings for <code>protocol</code> are:
tcp, udp, udplite, esp, ah, icmpv6, sctp
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoTCP-ipv4">TCP/UDP/SCTP</a></h5>
<p>
Protocol ID: <code>tcp</code>, <code>udp</code>, <code>sctp</code>
- <br>
+ <br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.
</p>
</tr>
</table>
<p>
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoICMP">ICMP</a></h5>
<p>
Protocol ID: <code>icmp</code>
- <br>
+ <br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.
</p>
</tr>
</table>
<p>
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoMisc">IGMP, ESP, AH, UDPLITE, 'ALL'</a></h5>
<p>
Protocol ID: <code>igmp</code>, <code>esp</code>, <code>ah</code>, <code>udplite</code>, <code>all</code>
- <br>
+ <br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.
</p>
</tr>
</table>
<p>
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoTCP-ipv6">TCP/UDP/SCTP over IPV6</a></h5>
<p>
Protocol ID: <code>tcp-ipv6</code>, <code>udp-ipv6</code>, <code>sctp-ipv6</code>
- <br>
+ <br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.
</p>
</tr>
</table>
<p>
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoICMPv6">ICMPv6</a></h5>
<p>
Protocol ID: <code>icmpv6</code>
- <br>
+ <br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.
</p>
</tr>
</table>
<p>
- <br><br>
+ <br/><br/>
</p>
<h5><a name="nwfelemsRulesProtoMiscv6">IGMP, ESP, AH, UDPLITE, 'ALL' over IPv6</a></h5>
<p>
Protocol ID: <code>igmp-ipv6</code>, <code>esp-ipv6</code>, <code>ah-ipv6</code>, <code>udplite-ipv6</code>, <code>all-ipv6</code>
- <br>
+ <br/>
Note: The chain parameter is ignored for this type of traffic
and should either be omitted or set to <code>root</code>.
</p>
</tr>
</table>
<p>
- <br><br>
+ <br/><br/>
</p>
<h3><a name="nwfelemsRulesAdv">Advanced Filter Configuration Topics</a></h3>
port 80 on an attacker site, then the attacker will not be able to
initiate a connection from TCP port 80 back towards the VM.
By default the connection state match that enables connection tracking
- and then enforcement of directionality of traffic is turned on. <br>
+ and then enforcement of directionality of traffic is turned on. <br/>
The following shows an example XML fragement where this feature has been
turned off for incoming connections to TCP port 12345.
</p>
</pre>
<p>
Note that the rule for the limit has to logically appear
- before the rule for accepting the traffic.<br>
+ before the rule for accepting the traffic.<br/>
An additional rule for letting DNS traffic to port 22
go out the VM has been added to avoid ssh sessions not
getting established for reasons related to DNS lookup failures
by the ssh daemon. Leaving this rule out may otherwise lead to
fun-filled debugging joy (symptom: ssh client seems to hang
while trying to connect).
- <br><br>
+ <br/><br/>
Lot of care must be taken with timeouts related
to tracking of traffic. An ICMP ping that
the user may have terminated inside the VM may have a long
<p>
sets the ICMP connection tracking timeout to 3 seconds. The
effect of this is that once one ping is terminated, another
- one can start after 3 seconds.<br>
+ one can start after 3 seconds.<br/>
Further, we want to point out that a client that for whatever
reason has not properly closed a TCP connection may cause a
connection to be held open for a longer period of time,
with life-cycle support for network filters. All commands related
to the network filtering subsystem start with the prefix
<code>nwfilter</code>. The following commands are available:
- <p>
+ </p>
<ul>
<li>nwfilter-list : list UUIDs and names of all network filters</li>
<li>nwfilter-define : define a new network filter or update an existing one</li>
the protocols very well that you want to be filtering on so that
no further traffic than what you want can pass and that in fact the
traffic you want to allow does pass.
- <br><br>
+ <br/><br/>
The network filtering subsystem is currently only available on
Linux hosts and only works for Qemu and KVM type of virtual machines.
On Linux
<li>arp, rarp</li>
<li>ip</li>
<li>ipv6</li>
- </uL>
+ </ul>
<p>
All other protocols over IPv4 are supported using iptables, those over
IPv6 are implemented using ip6tables.
- <br><br>
+ <br/><br/>
On a Linux host, all traffic filtering instantiated by libvirt's network
filter subsystem first passes through the filtering support implemented
by ebtables and only then through iptables or ip6tables filters. If
a filter tree has rules with the protocols <code>mac</code>,
<code>arp</code>, <code>rarp</code>, <code>ip</code>, or <code>ipv6</code>
ebtables rules will automatically be instantiated.
- <br>
+ <br/>
The role of the <code>chain</code> attribute in the network filter
XML is that internally a new user-defined ebtables table is created
that then for example receives all <code>arp</code> traffic coming
placed into filters specifying this chain. This type of branching
into user-defined tables is only supported with filtering on the ebtables
layer.
- <br>
+ <br/>
As an example, it is
possible to filter on UDP traffic by source and destination ports using
the <code>ip</code> protocol filter and specifying attributes for the
The requirement to prevent spoofing is fulfilled by the existing
<code>clean-traffic</code> network filter, thus we will reference this
filter from our custom filter.
- <br>
+ <br/>
To enable traffic for TCP ports 22 and 80 we will add 2 rules to
enable this type of traffic. To allow the VM to send ping traffic
we will add a rule for ICMP traffic. For simplicity reasons
per-interface basis and the rules are evaluated based on the knowledge
about which (tap) interface has sent or will receive the packet rather
than what their source or destination IP address may be.
- <br><br>
+ <br/><br/>
An XML fragment for a possible network interface description inside
the domain XML of the <code>test</code> VM could then look like this:
</p>
<li>allows the VM to send ping traffic from an interface
but not let the VM be pinged on the interface</li>
<li>allows the VM to do DNS lookups (UDP towards port 53)</li>
- <li>enable an ftp server (in active mode) to be run inside the VM
+ <li>enable an ftp server (in active mode) to be run inside the VM</li>
</ul>
<p>
The additional requirement of allowing an ftp server to be run inside
outgoing tcp connection originating from the VM's TCP port 20 back to
the ftp client (ftp active mode). There are several ways of how this
filter can be written and we present 2 solutions.
- <br><br>
+ <br/><br/>
The 1st solution makes use of the <code>state</code> attribute of
the TCP protocol that gives us a hook into the connection tracking
framework of the Linux host. For the VM-initiated ftp data connection
to be using.
Different IP addresses in use by multiple interfaces of a VM
(one IP address each) will be independently detected.
- <br><br>
+ <br/><br/>
Once a VM's IP address has been detected, its IP network traffic
may be locked to that address, if for example IP address spoofing
is prevented by one of its filters. In that case the user of the VM
will not be able to change the IP address on the interface inside
the VM, which would be considered IP address spoofing.
- <br><br>
+ <br/><br/>
In case a VM is resumed after suspension or migrated, IP address
detection will be restarted.
</p>
outside the scope of libvirt to ensure that referenced filters
on the source system are equivalent to those on the target system
and vice versa.
- <br><br>
+ <br/><br/>
Migration must occur between libvirt insallations of version
0.8.1 or later in order not to lose the network traffic filters
associated with an interface.
secret value at the time of volume creation, and store it using the
specified <code>uuid</code>.
</p>
- <p>
- </p>
<h3>
<a name="StorageEncryptionDefault" id="StorageEncryptionDefault">"default" format</a>
</h3>
by the particular volume format and driver, automatically generate a
secret value at the time of volume creation, and store it using the
specified <code>uuid</code>.
- <p>
+ </p>
<h3><a name="StorageEncryptionDefault">"default" format</a></h3>
<p>
<code><encryption type="default"/></code> can be specified only
diff --git a/docs/hacking.html b/docs/hacking.html
--- a/docs/hacking.html
+++ b/docs/hacking.html
Usually they're in macro definitions or strings, and should be converted
anyhow.
</p>
+ <p>
+ Libvirt requires a C99 compiler for various reasons. However,
+ most of the code base prefers to stick to C89 syntax unless
+ there is a compelling reason otherwise. For example, it is
+ preferable to use <code>/* */</code> comments rather
+ than <code>//</code>. Also, when declaring local variables, the
+ prevailing style has been to declare them at the beginning of a
+ scope, rather than immediately before use.
+ </p>
<h2>
<a name="curly_braces" id="curly_braces">Curly braces</a>
</h2>
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
anyhow.
</p>
+ <p>
+ Libvirt requires a C99 compiler for various reasons. However,
+ most of the code base prefers to stick to C89 syntax unless
+ there is a compelling reason otherwise. For example, it is
+ preferable to use <code>/* */</code> comments rather
+ than <code>//</code>. Also, when declaring local variables, the
+ prevailing style has been to declare them at the beginning of a
+ scope, rather than immediately before use.
+ </p>
+
<h2><a name="curly_braces">Curly braces</a></h2>
diff --git a/docs/hooks.html b/docs/hooks.html
--- a/docs/hooks.html
+++ b/docs/hooks.html
is not started. The first location, <span class="since">since
0.9.0</span>, is before libvirt performs any resource
labeling, and the hook can allocate resources not managed by
- libvirt such as DRBD or missing bridges. This is called as:
- <pre>/etc/libvirt/hooks/qemu guest_name prepare begin -</pre>
+ libvirt such as DRBD or missing bridges. This is called as:<br /><pre>/etc/libvirt/hooks/qemu guest_name prepare begin -</pre>
The second location, available <span class="since">Since
0.8.0</span>, occurs after libvirt has finished labeling
- all resources, but has not yet started the guest, called as:
- <pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li><li>When a QEMU guest is stopped, the qemu hook script is called
+ all resources, but has not yet started the guest, called as:<br /><pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li><li>When a QEMU guest is stopped, the qemu hook script is called
in two locations, to match the startup.
First, <span class="since">since 0.8.0</span>, the hook is
- called before libvirt restores any labels:
- <pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre>
+ called before libvirt restores any labels:<br /><pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre>
Then, after libvirt has released all resources, the hook is
called again, <span class="since">since 0.9.0</span>, to allow
any additional resource cleanup:<br /><pre>/etc/libvirt/hooks/qemu guest_name release end -</pre></li></ul>
diff --git a/docs/hooks.html.in b/docs/hooks.html.in
--- a/docs/hooks.html.in
+++ b/docs/hooks.html.in
is not started. The first location, <span class="since">since
0.9.0</span>, is before libvirt performs any resource
labeling, and the hook can allocate resources not managed by
- libvirt such as DRBD or missing bridges. This is called as:</br>
+ libvirt such as DRBD or missing bridges. This is called as:<br/>
<pre>/etc/libvirt/hooks/qemu guest_name prepare begin -</pre>
The second location, available <span class="since">Since
0.8.0</span>, occurs after libvirt has finished labeling
- all resources, but has not yet started the guest, called as:</br>
+ all resources, but has not yet started the guest, called as:<br/>
<pre>/etc/libvirt/hooks/qemu guest_name start begin -</pre></li>
<li>When a QEMU guest is stopped, the qemu hook script is called
in two locations, to match the startup.
First, <span class="since">since 0.8.0</span>, the hook is
- called before libvirt restores any labels:</br>
+ called before libvirt restores any labels:<br/>
<pre>/etc/libvirt/hooks/qemu guest_name stopped end -</pre>
Then, after libvirt has released all resources, the hook is
called again, <span class="since">since 0.9.0</span>, to allow
This command only changes the runtime configuration of the domain,
so can only be called on an active domain.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMemoryFlags" id="virDomainSetMemoryFlags"><code>virDomainSetMemoryFlags</code></a></h3><pre class="programlisting">int virDomainSetMemoryFlags (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory, <br /> unsigned int flags)<br />
-</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virDomainSetMemoryParameters" id="virDomainSetMemoryParameters"><code>virDomainSetMemoryParameters</code></a></h3><pre class="programlisting">int virDomainSetMemoryParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virMemoryParameterPtr">virMemoryParameterPtr</a> params, <br /> int nparams, <br /> unsigned int flags)<br />
+</pre><p>Dynamically change the target amount of physical memory allocated to a
+domain. If domain is NULL, then this change the amount of memory reserved
+to Domain0 i.e. the domain where the application runs.
+This funcation may requires privileged access to the hypervisor.
+
+@flags must include <a href="libvirt-libvirt.html#VIR_DOMAIN_MEM_LIVE">VIR_DOMAIN_MEM_LIVE</a> to affect a running
+domain (which may fail if domain is not active), or
+VIR_DOMAIN_MEM_CONFIG to affect the next boot via the XML
+description of the domain. Both flags may be set.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an OR'ed set of <a href="libvirt-libvirt.html#virDomainMemoryModFlags">virDomainMemoryModFlags</a></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMemoryParameters" id="virDomainSetMemoryParameters"><code>virDomainSetMemoryParameters</code></a></h3><pre class="programlisting">int virDomainSetMemoryParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virMemoryParameterPtr">virMemoryParameterPtr</a> params, <br /> int nparams, <br /> unsigned int flags)<br />
</pre><p>Change the memory tunables
This function requires privileged access to the hypervisor.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>params</tt></i>:</span></td><td>pointer to memory parameter objects</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>number of memory parameter (this value should be same or less than the number of parameters supported)</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, for future extension</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success.</td></tr></tbody></table></div><h3><a name="virDomainSetSchedulerParameters" id="virDomainSetSchedulerParameters"><code>virDomainSetSchedulerParameters</code></a></h3><pre class="programlisting">int virDomainSetSchedulerParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br /> int nparams)<br />
</pre><p>Change the scheduler parameters</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><span class="term"><i><tt>params</tt></i>:</span></td><td>pointer to scheduler parameter objects</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameter (this value should be same or less than the returned value nparams of virDomainGetSchedulerType)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success.</td></tr></tbody></table></div><h3><a name="virDomainSetVcpus" id="virDomainSetVcpus"><code>virDomainSetVcpus</code></a></h3><pre class="programlisting">int virDomainSetVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int nvcpus)<br />
diff --git a/docs/internals.html b/docs/internals.html
--- a/docs/internals.html
+++ b/docs/internals.html
internals, adding new public APIs, new hypervisor drivers or extending
the libvirtd daemon code.
</p>
- <ul><li>Introduction to basic rules and guidelines for <a href="hacking.html">hacking</a><a>
- on libvirt code</a></li><li>Guide to adding <a href="api_extension.html">public APIs</a><a></a></li><li>Approach for <a href="internals/command.html">spawning commands</a> from
+ <ul><li>Introduction to basic rules and guidelines for <a href="hacking.html">hacking</a>
+ on libvirt code</li><li>Guide to adding <a href="api_extension.html">public APIs</a></li><li>Approach for <a href="internals/command.html">spawning commands</a> from
libvirt driver code</li></ul>
</div>
</div>
diff --git a/docs/internals.html.in b/docs/internals.html.in
--- a/docs/internals.html.in
+++ b/docs/internals.html.in
</p>
<ul>
- <li>Introduction to basic rules and guidelines for <a href="hacking.html">hacking<a>
+ <li>Introduction to basic rules and guidelines for <a href="hacking.html">hacking</a>
on libvirt code</li>
- <li>Guide to adding <a href="api_extension.html">public APIs<a></li>
+ <li>Guide to adding <a href="api_extension.html">public APIs</a></li>
<li>Approach for <a href="internals/command.html">spawning commands</a> from
libvirt driver code</li>
</ul>
diff --git a/docs/libvirt-api.xml b/docs/libvirt-api.xml
--- a/docs/libvirt-api.xml
+++ b/docs/libvirt-api.xml
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
</function>
<function name='virDomainSetMemoryFlags' file='libvirt' module='libvirt'>
- <info><![CDATA[]]></info>
- <return type='int' info=''/>
- <arg name='domain' type='virDomainPtr' info=''/>
- <arg name='memory' type='unsigned long' info=''/>
- <arg name='flags' type='unsigned int' info=''/>
+ <info><![CDATA[Dynamically change the target amount of physical memory allocated to a
+domain. If domain is NULL, then this change the amount of memory reserved
+to Domain0 i.e. the domain where the application runs.
+This funcation may requires privileged access to the hypervisor.
+
+@flags must include VIR_DOMAIN_MEM_LIVE to affect a running
+domain (which may fail if domain is not active), or
+VIR_DOMAIN_MEM_CONFIG to affect the next boot via the XML
+description of the domain. Both flags may be set.]]></info>
+ <return type='int' info='0 in case of success, -1 in case of failure.'/>
+ <arg name='domain' type='virDomainPtr' info='a domain object or NULL'/>
+ <arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
+ <arg name='flags' type='unsigned int' info='an OR'ed set of virDomainMemoryModFlags'/>
</function>
<function name='virDomainSetMemoryParameters' file='libvirt' module='libvirt'>
<info><