commit 73d72933f9064297bbe1f7ff098b72f650fba77c
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Thu, 1 Feb 2024 09:00:00 +0100
Initial GNU libmicrohttpd2 commit
Files are largely imported from V1.x tree with some updates and changes.
Many files still need to be edited for V2.x tree.
Diffstat:
236 files changed, 44916 insertions(+), 0 deletions(-)
diff --git a/.gitattributes b/.gitattributes
@@ -0,0 +1,25 @@
+*.c text eol=lf diff=cpp
+*.h text eol=lf diff=cpp
+*.h.in text eol=lf diff=cpp
+*.c.in text eol=lf diff=cpp
+.gitattributes text eol=lf
+.gitignore text !eol
+configure.ac text eol=lf
+makefile.am text eol=lf
+*.m4 text eol=lf
+*.sh text eol=lf diff=bash
+*.key text eol=lf
+*.crt text eol=lf
+*.pem text eol=lf
+*.yml text eol=lf
+*.rec text eol=lf
+uncrustify.cfg text eol=lf
+.editorconfig text eol=crlf
+*.props text eol=cflf
+*.vcxproj text eol=cflf
+*.vcxproj.filters text eol=cflf
+*.sln text eol=cflf
+cpp.hint text !eol
+*.ps1 text eol=cflf
+microhttpd_dll_res_vc.rc.in text eol=crlf
+microhttpd_dll_res.rc.in text eol=lf
+\ No newline at end of file
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,49 @@
+Makefile.in
+Makefile
+.deps/
+.libs/
+/test-driver
+/INSTALL
+/libmicrohttpd.pc
+/configure.lineno
+/config.status.lineno
+/config.log
+/debug
+build-aux/
+/exclude
+/autom4te.cache
+/keys
+/doc.tmp
+/.project
+/.cproject
+/.tgitconfig
+/configure
+stamp-h?
+/libtool
+/aclocal.m4
+/config.status
+/stamp-h1
+/.pydevproject
+/.autotools
+/.vscode
+/.settings
+/.vs
+po/configure.acT
+po/POTFILES
+po/configargs.stamp
+*~
+\#*\#
+/uncrustify.cfg
+*.dvi
+*.t2d
+.texlipse
+/po/remove-potcdate.sed
+/po/autom4te.cache
+/po-config.log
+/po-config.status
+/po-configure
+/po/configure
+/po/aclocal.m4
+/po/po-configure.ac
+/po/configure.ac
+/libmicrohttpd-*.*.*.tar.*
diff --git a/AUTHORS b/AUTHORS
@@ -0,0 +1,76 @@
+Primary developers:
+Evgeny Grin (Karlson2k) <k2k@drgrin.dev> (maintainer)
+Christian Grothoff <christian@grothoff.org> (maintainer)
+
+Code contributions also came from:
+Andrey Uzunov <andrey.uzunov@gmail.com> (libmicrospdy experiment)
+Nils Durner <durner@gnunet.org> (initial W32 port)
+Sagie Amir (first version of TLS/SSL support using GNUtls)
+Richard Alimi <rich@velvetsea.net> (performance)
+Amr Ali <amr.ali.cc@gmail.com> (initial digest authentication implementation)
+Matthieu Speder <mspeder@users.sourceforge.net>
+Chris GauthierDickey <chrisg@cs.du.edu>
+Elliot Glaysher
+Daniel Pittman <depittman@gmail.com>
+John Popplewell <john@johnnypops.demon.co.uk>
+Heikki Lindholm <holin@iki.fi>
+Alex Sadovsky <alexeysad@gmail.com>
+Greg Schohn <greg.schohn@gmail.com>
+Thomas Martin <Thomas.Martin@rohde-schwarz.com>
+Peter Ross <pross@xvid.org>
+RuXu W <wrxzzj@gmail.com>
+Matthew Moore
+Colin Caughie <c.caughie@indigovision.com>
+David Carvalho <andaris@gmail.com>
+David Reiss <dreiss@facebook.com>
+Markus Doppelbauer <doppelbauer@gmx.net>
+Matt Holiday
+Michael Cronenworth <mike@cchtml.com>
+Milan Straka <straka@ufal.mff.cuni.cz>
+Mika Raento <mikie@iki.fi>
+Mike Crowe <mac@mcrowe.com>
+John Muth <muth@parascale.com>
+Geoffrey McRae <geoff@spacevs.com>
+Piotr Grzybowski <narsil.pl@gmail.com>
+Gerrit Telkamp <g.telkamp@domologic.de>
+Erik Slagter <erik@slagter.name>
+Andreas Wehrmann <a.wehrmann@centersystems.com>
+Eivind Sarto <ivan@espial.com>
+Thomas Stalder <gnunet@netsolux.ch>
+Zhimin Huang <zhimin.huang@bqvision.com>
+Jan Seeger <jan.seeger@thenybble.de>
+Will Bryant <will.bryant@gmail.com>
+LRN <lrn1986@gmail.com>
+Sven Geggus <sts@fuchsschwanzdomain.de>
+Steve Wolf <stevewolf6@gmail.com>
+Brecht Sanders <brecht@sanders.org>
+Jan Janak <jan@janakj.org>
+Matthew Mundell <matthew.mundell@greenbone.net>
+Scott Goldman <scottjg@github.com>
+Jared Cantwell
+Luke-Jr <luke@dashjr.org>
+Sree Harsha Totakura <sreeharsha@totakura.in>
+Hani Benhabiles <kroosec@gmail.com>
+Guy Martin <gmsoft@tuxicoman.be>
+Robert Groenenberg <robert.groenenberg@broadforward.com>
+Denis Dowling <denis.dowling@hsd.com.au>
+Louis Benoit <louisbenoit@videotron.ca>
+Flavio Coelin <flavio.ceolin@intel.com>
+Silvio Clecio <silvioprog@gmail.com>
+Robert D Kosisko <rkocisko@gmail.com>
+Tal Moaz <tmoaz@cisco.com>
+Dirk Brinkmeier
+Jose Bollo <jobol@nonadev.net>
+Jonathan McDougall <jonathanmcdougall@gmail.com>
+Tim Ruhsen <tim.ruehsen@gmx.de>
+Lawrence Sebald <lawrence.sebald@nasa.gov> (iovec-based responses)
+
+Documentation contributions also came from:
+Marco Maggi <marco.maggi-ipsu@poste.it>
+Sebastian Gerhardt <sebgerhardt@gmx.net>
+
+Special thanks to:
+Florian Weimer <fweimer@redhat.com>
+Ramakrishnan Muthukrishnan <ram@leastauthority.com>
+Gervasa Markham <grev@mozilla.com>
+Liz Steininger <liz@leastauthority.com>
diff --git a/COPYING b/COPYING
@@ -0,0 +1,470 @@
+All source files of the GNU libmicrohttpd2 library itself are
+dual-licensed: you may choose to use them under either the GNU Lesser
+General Public License version 2.1 or later (LGPLv2.1+), or the GNU
+General Public License version 2 or later (GPLv2+) with the eCos 2.0
+exception (see: https://ecos.sourceware.org/license-overview.html).
+If you build the library with TLS/HTTPS support enabled, you must comply
+with the terms of the LGPL.
+
+Please note that certain auxiliary files--such as documentation,
+examples, and internal test suites--may be licensed under different terms.
+Refer to the licence headers within individual files for details.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
diff --git a/ChangeLog b/ChangeLog
@@ -0,0 +1,4 @@
+Fri 01 Mar 2024 09:00:00 CET
+GNU libmicrohttpd2 project started
+
+-- Evgeny Grin (Karlson2k) and Christian Grothoff
+\ No newline at end of file
diff --git a/Makefile.am b/Makefile.am
@@ -0,0 +1,432 @@
+# This Makefile.am is in the public domain
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = contrib m4 src .
+
+if BUILD_DOC
+SUBDIRS += doc
+endif
+
+
+W32COMMON = w32/common/gen_dll_res.ps1 w32/common/microhttpd_dll_res_vc.rc.in w32/common/microhttpd_dll_res_vc.rc \
+ w32/common/MHD_config.h w32/common/vs_dirs.props \
+ w32/common/common-build-settings.props w32/common/libmicrohttpd-build-settings.props \
+ w32/common/apps-build-settings.props \
+ w32/common/project-configs.props w32/common/project-configs-xp.props \
+ w32/common/libmicrohttpd-files.vcxproj w32/common/libmicrohttpd-filters.vcxproj \
+ w32/common/hellobrowser-files.vcxproj w32/common/hellobrowser-filters.vcxproj
+W32VS2013 = w32/VS2013/libmicrohttpd.vcxproj w32/VS2013/libmicrohttpd.vcxproj.filters \
+ w32/VS2013/hellobrowser.vcxproj w32/VS2013/hellobrowser.vcxproj.filters \
+ w32/VS2013/simplepost.vcxproj w32/VS2013/largepost.vcxproj \
+ w32/VS2013/libmicrohttpd.sln
+W32VS2015 = w32/VS2015/libmicrohttpd.vcxproj w32/VS2015/libmicrohttpd.vcxproj.filters \
+ w32/VS2015/hellobrowser.vcxproj w32/VS2015/hellobrowser.vcxproj.filters \
+ w32/VS2015/simplepost.vcxproj w32/VS2015/largepost.vcxproj \
+ w32/VS2015/libmicrohttpd.sln
+W32VS2017 = w32/VS2017/libmicrohttpd.vcxproj w32/VS2017/libmicrohttpd.vcxproj.filters \
+ w32/VS2017/hellobrowser.vcxproj w32/VS2017/hellobrowser.vcxproj.filters \
+ w32/VS2017/simplepost.vcxproj w32/VS2017/largepost.vcxproj \
+ w32/VS2017/libmicrohttpd.sln
+W32VS2019 = w32/VS2019/libmicrohttpd.vcxproj w32/VS2019/libmicrohttpd.vcxproj.filters \
+ w32/VS2019/hellobrowser.vcxproj w32/VS2019/hellobrowser.vcxproj.filters \
+ w32/VS2019/simplepost.vcxproj w32/VS2019/largepost.vcxproj \
+ w32/VS2019/libmicrohttpd.sln
+W32VS2022 = w32/VS2022/libmicrohttpd.vcxproj w32/VS2022/libmicrohttpd.vcxproj.filters \
+ w32/VS2022/hellobrowser.vcxproj w32/VS2022/hellobrowser.vcxproj.filters \
+ w32/VS2022/simplepost.vcxproj w32/VS2022/largepost.vcxproj \
+ w32/VS2022/libmicrohttpd.sln
+W32VSAV = w32/VS-Any-Version/libmicrohttpd.vcxproj w32/VS-Any-Version/libmicrohttpd.vcxproj.filters \
+ w32/VS-Any-Version/hellobrowser.vcxproj w32/VS-Any-Version/hellobrowser.vcxproj.filters \
+ w32/VS-Any-Version/simplepost.vcxproj w32/VS-Any-Version/largepost.vcxproj \
+ w32/VS-Any-Version/libmicrohttpd.sln
+
+EXTRA_DIST = \
+ libmicrohttpd.pc.in \
+ $(W32COMMON) $(W32VS2013) $(W32VS2015) $(W32VS2017) \
+ $(W32VS2019) $(W32VS2022) $(W32VSAV)
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libmicrohttpd.pc
+
+EXTRA_DIST += pre-dist-hook-dummy
+MOSTLYCLEANFILES = pre-dist-hook-dummy
+DISTCLEANFILES =
+MAINTAINERCLEANFILES = m4/c_backported.m4
+
+pre-dist-hook-dummy: pre-dist-hook Makefile
+ @echo "dummy" > $@
+
+dist-hook: dist-po
+ @chmod u+w '$(distdir)/pre-dist-hook-dummy' && \
+ rm -f '$(distdir)/pre-dist-hook-dummy'
+ @rm -f pre-dist-hook-dummy
+ @if test -w '$(distdir)/m4/c_backported.m4'; then \
+ echo "Use empty m4/c_backported.m4 for dist target"; \
+ touch -r '$(distdir)/m4/c_backported.m4' '$(distdir)/m4/c_backported.m4-tmst' && \
+ echo 'dnl Not used for distribution' > '$(distdir)/m4/c_backported.m4' && \
+ touch -r '$(distdir)/m4/c_backported.m4-tmst' '$(distdir)/m4/c_backported.m4' && \
+ rm -f '$(distdir)/m4/c_backported.m4-tmst'; \
+ else \
+ true; \
+ fi
+
+dist-custm: distdir
+ @test -n "$(ARC_CMD)" || \
+ { echo 'The valid archive command must be defined by "ARC_CMD".' >&2; false; }
+ @test -n "$(ARC_EXT)" || \
+ { echo 'The archive file extension must be set by "ARC_EXT".' >&2; false; }
+ -rm -f '$(distdir).$(ARC_EXT)'
+ tardir=$(distdir) && $(am__tar) | $(ARC_CMD) >$(distdir).$(ARC_EXT)
+ $(am__post_remove_distdir)
+
+dist-custm2: distdir
+ @test -n "$(ARC_CMD)" || \
+ { echo 'The valid archive command must be defined by "ARC_CMD".' >&2; false; }
+ @test -n "$(ARC_EXT)" || \
+ { echo 'The archive file extension must be set by "ARC_EXT".' >&2; false; }
+ -rm -f '$(distdir).$(ARC_EXT)'
+ tardir=$(distdir) && $(am__tar) >$(distdir).tar && $(ARC_CMD) $(distdir).tar
+ rm -f $(distdir).tar
+ $(am__post_remove_distdir)
+
+pre-dist-hook: pre-dist-hook-doc
+ @echo "Preparing to make dist"
+
+pre-dist-hook-doc:
+ @echo "Preparing to make dist in doc"
+ @if test -w '$(top_srcdir)/doc' ; then \
+ $(am__cd) doc && $(MAKE) $(AM_MAKEFLAGS) update-stamp; \
+ else \
+ echo "Source tree is read-only, skipping force doc update"; \
+ fi;
+
+.PHONY: pre-dist-hook pre-dist-hook-doc
+
+# Works with old automake versions (<1.12.2) as "false"
+MHD_V = $(AM_V_P) false
+
+distclean-local: distclean-po
+
+maintainer-clean-local: maintainer-clean-po
+
+srcdir_po = $(top_srcdir)/po
+
+PO_ACLOCAL_M4 = $(srcdir_po)/aclocal.m4
+
+PO_MAIN_FILES = $(srcdir_po)/Makefile.in.in $(srcdir_po)/remove-potcdate.sin \
+ $(srcdir_po)/quot.sed $(srcdir_po)/boldquot.sed \
+ $(srcdir_po)/en@quot.header $(srcdir_po)/en@boldquot.header \
+ $(srcdir_po)/insert-header.sin $(srcdir_po)/Rules-quot
+
+PO_EXTRA_FILES = $(srcdir_po)/Makevars.template
+
+PO_ROOT_FILES = $(srcdir_po)/ABOUT-NLS
+
+PO_M4_FILES = $(srcdir_po)/m4/gettext.m4 $(srcdir_po)/m4/host-cpu-c-abi.m4 \
+ $(srcdir_po)/m4/iconv.m4 $(srcdir_po)/m4/intlmacosx.m4 \
+ $(srcdir_po)/m4/lib-ld.m4 $(srcdir_po)/m4/lib-link.m4 \
+ $(srcdir_po)/m4/lib-prefix.m4 $(srcdir_po)/m4/nls.m4 \
+ $(srcdir_po)/m4/po.m4 $(srcdir_po)/m4/progtest.m4
+
+PO_AUX_FILES = $(srcdir_po)/$(MHD_AUX_DIR)/config.rpath
+
+# All autopoint-created files
+PO_ALL_FILES = $(PO_MAIN_FILES) $(PO_EXTRA_FILES) $(PO_ROOT_FILES) \
+ $(PO_M4_FILES) $(PO_AUX_FILES)
+
+am__po_aclocal_m4_deps = $(PO_M4_FILES) $(srcdir_po)/configure.ac
+am__po_configure_deps = $(am__po_aclocal_m4_deps) $(PO_ACLOCAL_M4)
+
+$(PO_ACLOCAL_M4): $(am__po_aclocal_m4_deps)
+ @{ $(MHD_V) && echo "Building $@" ; } || true
+ @echo "cd $(srcdir_po) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)" && \
+ $(am__cd) '$(srcdir_po)' && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+# Do update po/configure.ac only if template files updated
+$(srcdir_po)/configure.ac: $(srcdir_po)/po-configure.ac.in $(top_srcdir)/configure.ac
+ @{ $(MHD_V) && echo "Building $@" ; } || true
+ @$(MAKE) $(AM_MAKEFLAGS) po/po-configure.ac
+ @cp -f po/po-configure.ac '$@'
+
+$(top_srcdir)/po-configure: $(srcdir_po)/configure.ac $(PO_ACLOCAL_M4) $(PO_AUX_FILES) $(srcdir_po)/$(MHD_AUX_DIR)/install-sh
+ @{ $(MHD_V) && echo "Building $@" ; } || true
+ @echo "cd $(srcdir_po) && $(AUTOCONF)" && \
+ ( $(am__cd) '$(srcdir_po)' && $(AUTOCONF) )
+ mv -f '$(srcdir_po)/configure' '$@'
+ -chmod a-x '$@'
+
+EXTRA_DIST += $(top_srcdir)/$(MHD_AUX_DIR)/config.rpath $(srcdir_po)/$(MHD_AUX_DIR)/install-sh \
+ $(PO_ALL_FILES) \
+ $(PO_ACLOCAL_M4) \
+ $(srcdir_po)/po-configure.ac.in $(srcdir_po)/configure.ac \
+ $(top_srcdir)/po-configure \
+ $(srcdir_po)/stamp-m.in
+
+DISTCLEANFILES += config.main.log po-config.log po/stamp-m
+MAINTAINERCLEANFILES += $(srcdir_po)/configure.ac
+
+$(srcdir_po)/stamp-m.in:
+ @: > '$@'
+
+po-config.status: $(top_srcdir)/po-configure $(top_srcdir)/$(MHD_AUX_DIR)/install-sh $(top_srcdir)/$(MHD_AUX_DIR)/config.rpath
+ @if test -f config.log; then \
+ mv -f config.log config.main.log; \
+ else \
+ true; \
+ fi
+ @SHELL@ '$(top_srcdir)/po-configure' $(ac_configure_args) --silent --no-create --no-recursion --disable-option-checking
+ @mv -f config.log po-config.log
+ @if test -f config.main.log; then \
+ mv -f config.main.log config.log; \
+ else \
+ true; \
+ fi
+
+po/Makefile: $(srcdir_po)/Makefile.in.in $(srcdir_po)/Makevars po-config.status $(srcdir_po)/POTFILES.in $(srcdir_po)/stamp-m.in
+ @: && @SHELL@ ./po-config.status po/stamp-m po/Makefile.in po-directories
+
+dist-po: po/Makefile $(PO_MAIN_FILES)
+ @dir1="po"; dir2="$(distdir)/po"; \
+ $(am__relativize); \
+ rel_distsubdir=$$reldir; \
+ echo "cd po && $(MAKE) $(AM_MAKEFLAGS) distdir='$$rel_distsubdir' distdir" && \
+ $(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) distdir="$$rel_distsubdir" distdir
+
+$(srcdir_po)/POTFILES.in: $(top_srcdir)/src/microhttpd/Makefile.am
+ @echo "cd $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) update-po-POTFILES.in" && \
+ $(am__cd) '$(top_builddir)/src/microhttpd' && $(MAKE) $(AM_MAKEFLAGS) update-po-POTFILES.in
+
+AUTOPOINT = autopoint
+AUTOPOINT_FLAGS =
+
+APIM_LOCK_BASE = autopoint-updating-lock
+APIM_TMSTMP_BASE = autopoint-timestamp
+APIM_TMSTMP_TMP_BASE = $(APIM_TMSTMP_BASE)-tmp
+APIM_TRIGGER_BASE = autopoint-trigger
+APIM_LOCK = $(srcdir_po)/$(APIM_LOCK_BASE)
+APIM_TMSTMP = $(srcdir_po)/$(APIM_TMSTMP_BASE)
+APIM_TMSTMP_TMP = $(srcdir_po)/$(APIM_TMSTMP_TMP_BASE)
+APIM_TRIGGER = $(srcdir_po)/$(APIM_TRIGGER_BASE)
+# Run 'autopoint' even if no file missing
+FORCE_AUTOPOINT_CHECK = no
+
+LOCK_TIMEOUT_VALUE = 120
+
+EXTRA_DIST += $(APIM_TMSTMP) $(APIM_TRIGGER)
+
+sleep_with_timeout = \
+ sleep 1; \
+ sec_waiting=`expr ${sec_waiting} + 1`; \
+ if test $${sec_waiting} -gt '$(LOCK_TIMEOUT_VALUE)'; then \
+ echo "Waiting timeout" 1>&2; \
+ rmdir "$${lock_name}" ; \
+ exit 1; \
+ fi
+
+wait_for_unlock = \
+ test -n "$${lock_name}" || lock_name='$(APIM_LOCK)'; \
+ if test -d "$${lock_name}"; then \
+ { $(MHD_V) && \
+ echo "Autopoint files are being updated in parallel thread, wait"; } || : ; \
+ sec_waiting=0; \
+ while test -d "$${lock_name}"; do \
+ $(sleep_with_timeout) ; \
+ done; \
+ fi
+
+apim_prepare = \
+ $(am__cd) '$(srcdir_po)' || exit 1; \
+ lock_name='$(APIM_LOCK_BASE)'; \
+ { trap "rm -rf $(APIM_TMSTMP_BASE) $(APIM_TMSTMP_TMP_BASE) $${lock_name} po" HUP ABRT INT TERM 2>/dev/null && \
+ trap "rm -rf $(APIM_TMSTMP_BASE) $(APIM_TMSTMP_TMP_BASE) $${lock_name} po" PIPE 2>/dev/null ; } || \
+ trap "rm -rf $(APIM_TMSTMP_BASE) $(APIM_TMSTMP_TMP_BASE) $${lock_name} po" 1 2 13 15; \
+ lock_held='false'; \
+ sec_waiting=0; \
+ while : ; do \
+ if mkdir "$${lock_name}" 2>/dev/null; then lock_held=':' ; else : ; fi; \
+ $${lock_held} && break || : ; \
+ test 'xyes' = 'x$(FORCE_AUTOPOINT_CHECK)' || break ; \
+ $(sleep_with_timeout) ; \
+ done; \
+ if $${lock_held} ; then \
+ rm -f '$(APIM_TMSTMP_BASE)' '$(APIM_TMSTMP_TMP_BASE)' || exit 1; \
+ echo 'timestamp' > '$(APIM_TMSTMP_TMP_BASE)' || exit 1; \
+ if test 'xyes' = 'x$(FORCE_AUTOPOINT_CHECK)'; then \
+ call_autopoint=':'; check_all='false'; \
+ else \
+ call_autopoint='false'; check_all=':'; \
+ fi; \
+ if $(MHD_V) ; then apim_echo='echo' ; else apim_echo=':'; fi ;\
+ $$apim_echo "Sync autopoint files"; \
+ files_missing='false'; \
+ $(MKDIR_P) 'po'; \
+ $(MKDIR_P) '$(MHD_AUX_DIR)'; \
+ main_f_names=`for f in $(PO_MAIN_FILES) $(PO_EXTRA_FILES); do echo "$$f"; done | $(SED) -e 's|^.*/||'`; \
+ root_f_names=`for f in $(PO_ROOT_FILES); do echo "$$f"; done | $(SED) -e 's|^.*/||'`; \
+ m4_f_names=`for f in $(PO_M4_FILES); do echo "$$f"; done | $(SED) -e 's|^.*/||'`; \
+ aux_f_names=`for f in $(PO_AUX_FILES); do echo "$$f"; done | $(SED) -e 's|^.*/||'`; \
+ for f in $${main_f_names}; do \
+ if test -f "$$f"; then \
+ cp -f "$$f" "po/$$f" ; \
+ else \
+ $$apim_echo "Missing $(srcdir_po)/$$f" ; \
+ files_missing=':' ; \
+ fi; \
+ done; \
+ if $${check_all} ; then \
+ for f in $${root_f_names}; do \
+ if test -f "./$$f"; then : ; \
+ else \
+ $$apim_echo "Missing $(srcdir_po)/$$f" ; \
+ files_missing=':' ; \
+ fi; \
+ done; \
+ for f in $${m4_f_names}; do \
+ if test -f "m4/$$f"; then : ; \
+ else \
+ $$apim_echo "Missing $(srcdir_po)/m4/$$f" ; \
+ files_missing=':' ; \
+ fi; \
+ done; \
+ for f in $${aux_f_names}; do \
+ if test -f "$(MHD_AUX_DIR)/$$f"; then : ;\
+ else \
+ $$apim_echo "Missing $(srcdir_po)/$(MHD_AUX_DIR)/$$f" ; \
+ files_missing=':' ; \
+ fi; \
+ done; \
+ fi; \
+ if $${files_missing} ; then \
+ call_autopoint=':' ; \
+ $$apim_echo "Some files are missing, call autopoint to restore them" ; \
+ elif $${call_autopoint}; then $$apim_echo "Check and update autopoint files" ; \
+ fi; \
+ rc_code=0; \
+ if $${call_autopoint} ; then \
+ echo ' cd $(srcdir_po) && $(AUTOPOINT) $(AUTOPOINT_FLAGS)'; \
+ '$(AUTOPOINT)' $(AUTOPOINT_FLAGS) || rc_code=1; \
+ fi; \
+ if test "$${rc_code}" = "0"; then \
+ $$apim_echo "Re-sync autopoint files back"; \
+ for f in $${aux_f_names}; do \
+ if test -f "$(MHD_AUX_DIR)/$$f"; then \
+ touch -f "$(MHD_AUX_DIR)/$$f" && \
+ cp -f "$(MHD_AUX_DIR)/$$f" "../$(MHD_AUX_DIR)/$$f"; \
+ else \
+ $$apim_echo "Still missing $(srcdir_po)/$(MHD_AUX_DIR)/$$f" 1>&2 ; \
+ rc_code=1; \
+ fi; \
+ done; \
+ for f in $${m4_f_names}; do \
+ if test -f "m4/$$f"; then \
+ touch "m4/$$f"; \
+ else \
+ $$apim_echo "Still missing $(srcdir_po)/m4/$$f" 1>&2 ; \
+ rc_code=1; \
+ fi; \
+ done; \
+ for f in $${root_f_names}; do \
+ if test -f "./$$f"; then \
+ touch "./$$f"; \
+ else \
+ $$apim_echo "Still missing $(srcdir_po)/$$f" 1>&2 ; \
+ rc_code=1; \
+ fi; \
+ done; \
+ for f in $${main_f_names}; do \
+ if test -f "po/$$f"; then \
+ cp -f "po/$$f" "$$f"; \
+ else \
+ $$apim_echo "Still missing $(srcdir_po)/$$f" 1>&2 ; \
+ rc_code=1; \
+ fi; \
+ done; \
+ fi; \
+ if test $${rc_code} = 0; then \
+ cp -fp '$(APIM_TMSTMP_TMP_BASE)' '$(APIM_TMSTMP_BASE)' ; \
+ touch -r '$(APIM_TMSTMP_TMP_BASE)' '$(APIM_TMSTMP_BASE)' ; \
+ $$apim_echo "All autopoint files have been synced"; \
+ rm -f '$(APIM_TMSTMP_TMP_BASE)'; \
+ else \
+ rm -f '$(APIM_TMSTMP_BASE)' '$(APIM_TMSTMP_TMP_BASE)'; \
+ fi; \
+ rm -fr 'po'; \
+ rmdir "$${lock_name}"; \
+ exit $${rc_code} ; \
+ else \
+ $(wait_for_unlock) ; \
+ test -f '$(APIM_TMSTMP_BASE)' || exit 1; \
+ fi; \
+ :
+
+mostlyclean-local: mostlyclean-autopoint-update
+mostlyclean-autopoint-update:
+ -test -d '$(APIM_LOCK)' && rm -rf '$(APIM_LOCK)'
+ -test -d '$(srcdir_po)/po' && rm -rf '$(srcdir_po)/po'
+ rm -f '$(APIM_TMSTMP_TMP)'
+
+$(APIM_TRIGGER):
+ @echo "autopoint files rebuild trigger" > "$@"
+
+$(APIM_TMSTMP): $(srcdir_po)/configure.ac $(APIM_TRIGGER)
+ @ $(apim_prepare)
+
+.DELETE_ON_ERROR: $(APIM_TMSTMP)
+
+$(PO_ALL_FILES): $(APIM_TMSTMP) $(srcdir_po)/configure.ac
+ @ ( $(apim_prepare) )
+ @test -f '$@'
+
+prepare-autopoint: $(srcdir_po)/configure.ac
+ @ ( $(apim_prepare) )
+ @test -f '$(APIM_TMSTMP)'
+
+check-prepare-autopoint: $(srcdir_po)/$(MHD_AUX_DIR)/install-sh $(APIM_TMSTMP)
+ @echo "Check all autopoint files"; \
+ files_missing='false'; \
+ for f in $(PO_ALL_FILES); do \
+ if test -f "$$f"; then : ; \
+ else \
+ echo "Missing $$f" ; \
+ files_missing=':' ; \
+ fi; \
+ done; \
+ if $${files_missing}; then \
+ $(MAKE) $(AM_MAKEFLAGS) prepare-autopoint || exit 1; \
+ else \
+ exit 0; \
+ fi
+
+# This could be used to update autopoint files for git or for 'dist' target
+update-autopoint-force:
+ $(MAKE) $(AM_MAKEFLAGS) 'FORCE_AUTOPOINT_CHECK=yes' 'AUTOPOINT_FLAGS=$(AUTOPOINT_FLAGS) -f' prepare-autopoint
+
+autopoint-files-all: $(APIM_TRIGGER) $(APIM_TMSTMP) $(PO_MAIN_FILES) $(PO_EXTRA_FILES) $(PO_M4_FILES) $(PO_AUX_FILES) $(srcdir_po)/$(MHD_AUX_DIR)/install-sh
+
+$(top_srcdir)/$(MHD_AUX_DIR)/config.rpath: $(srcdir_po)/$(MHD_AUX_DIR)/config.rpath
+ cp -f '$(srcdir_po)/$(MHD_AUX_DIR)/config.rpath' '$@'
+
+$(srcdir_po)/$(MHD_AUX_DIR)/install-sh: $(top_srcdir)/$(MHD_AUX_DIR)/install-sh
+ $(MKDIR_P) '$(srcdir_po)/$(MHD_AUX_DIR)'
+ cp -f '$(top_srcdir)/$(MHD_AUX_DIR)/install-sh' '$@'
+
+.PHONY: mostlyclean-autopoint-update prepare-autopoint update-autopoint-force check-prepare-autopoint autopoint-files-all
+
+distclean-po:
+ @( if test -f po/Makefile; then \
+ $(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) distclean; \
+ else \
+ true; \
+ fi )
+ -rm -f po-config.status po/Makefile po/stamp-m
+ -rm -f po/POTFILES po/remove-potcdate.sed po/Makefile.in
+
+maintainer-clean-po:
+ @( if test -f po/Makefile; then \
+ $(am__cd) po && $(MAKE) $(AM_MAKEFLAGS) maintainer-clean; \
+ else \
+ true; \
+ fi )
+ -rm -f po/$(PACKAGE_TARNAME).pot
+ -rm -rf $(srcdir_po)/autom4te.cache
+
+.PHONY: distclean-po maintainer-clean-po
diff --git a/NEWS b/NEWS
@@ -0,0 +1,10 @@
+[PLACEHOLDER]
+Development version GNU libmicrohttpd2 1.99.0.
+
+ -- Evgeny Grin (Karlson2k)
+
+
+Fri 01 Mar 2024 09:00:00 CET
+GNU libmicrohttpd2 project started
+
+ -- Evgeny Grin (Karlson2k) and Christian Grothoff
diff --git a/README b/README
@@ -0,0 +1,80 @@
+About
+=====
+
+GNU libmicrohttpd2 is a GNU package offering a C library that provides
+a compact API and implementation of an HTTP 1.1 web server (HTTP 1.0
+is also supported). GNU libmicrohttpd2 only implements the HTTP(S)
+protocol. The main application must still provide the application
+logic to generate the content.
+
+GNU libmicrohttpd2 is dual-licensed under the terms of the GNU Lesser
+General Public License (LGPLv2.1+) or, alternatively, the GNU General
+Public License (GPLv2+) with eCos 2.0 exception. You may use it under
+either license. See COPYING for details.
+
+
+Joining GNU
+===========
+
+This is a GNU program, developed by the GNU Project and part of the
+GNU Operating System. If you are the author of an awesome program and
+want to join us in writing Free Software, please consider making it an
+official GNU program and become a GNU maintainer. You can find
+instructions on how to do so at https://www.gnu.org/help/evaluation.
+We are looking forward to hacking with you!
+
+
+Installation
+============
+
+See INSTALL for generic installation instructions.
+
+If you are using Git, run "./bootstrap" to create configure.
+
+In order to run the testcases, you need a recent version of libcurl.
+libcurl is not required if you just want to install the library.
+
+
+Configure options
+=================
+
+If you are concerned about space, you should use configure option
+--enable-build-type=release-compact to have a tight code.
+
+You can use the following options to disable certain MHD features:
+
+--disable-https: no HTTPS / TLS / SSL support (significant reduction)
+--disable-messages: no error messages (they take space!)
+--disable-postprocessor: no MHD_PostProcessor API
+--disable-dauth: no digest authentication API
+--disable-epoll: no support for epoll, even with Linux kernel
+
+The resulting binary should be about XXk depending on the platform.
+
+
+Portability
+===========
+
+GNU libmicrohttpd2 is designed with portability in mind and is known to
+work reliably on GNU/Linux, W32, FreeBSD, NetBSD, OpenBSD, Darwin (macOS),
+Solaris/OpenIndiana and Haiku. It may also run without modification
+(or with minimal adjustments) on other operating systems, including
+GNU Hurd.
+
+The library attempts to prevent SIGPIPE signals on its sockets. This
+approach is known to be effective on GNU/Linux, macOS, and recent BSD
+systems. However, on other platforms where socket operations (such as
+send()) may trigger SIGPIPE, the application should explicitly install
+its own signal handler for SIGPIPE.
+
+
+Development Status
+==================
+
+This is a alpha release of GNU libmicrohttpd2. Some important features
+are not yet implemented, but a minimal working subset is available for
+early testing and application code adaptation.
+
+Please note that API-breaking changes may still occur until version 2.1
+is released. After version 2.1 stabilizes, only backward-compatible API
+changes will be introduced (with rare exceptions possible).
diff --git a/autogen.sh b/autogen.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# This file was added for compatibility with some automated build systems.
+# It is recommended to use 'bootstrap' directly instead.
+
+ag_srcdir="${0%/*}" && ag_srcdir="${ag_srcdir}${ag_srcdir:+/}"
+"${ag_srcdir}./bootstrap" ${1+"$@"}
diff --git a/bootstrap b/bootstrap
@@ -0,0 +1,64 @@
+#!/bin/sh
+
+# This is more portable than `which' but comes with
+# the caveat of not(?) properly working on busybox's ash:
+have_command()
+{
+ command -v "$1" >/dev/null 2>&1
+}
+
+unset bs_srcdir || exit 1
+if test X"`dirname / 2>/dev/null`" = X"/"; then
+ bs_scrdir=`dirname $0` || exit 2
+else
+ case $0 in
+ */*) bs_scrdir=`echo $0 | ${SED-sed} -n -e 's|/[^/]*$||p'` || exit 2;;
+ *) bs_scrdir='.' ;;
+ esac
+fi
+
+test -n "$bs_scrdir" && cd "$bs_scrdir" || echo "Warning: cannot detect sources directory" 1>&2
+
+if test ! -f './configure.ac'; then
+ echo "Error: no 'configure.ac' found. Wrong sources directory?" 1>&2
+ exit 2
+fi
+if test ! -f './src/include/microhttpd2.h'; then
+ echo "Error: file 'src/include/microhttpd2.h' not found. Wrong sources directory?" 1>&2
+ exit 2
+fi
+
+if have_command uncrustify; then
+ if test -f uncrustify.cfg; then
+ echo "Uncrustify configuration already exists, skipping installation from the upstream file."
+ else
+ echo "Installing libmicrohttpd uncrustify configuration"
+ ln -s contrib/uncrustify.cfg uncrustify.cfg || \
+ cp contrib/uncrustify.cfg uncrustify.cfg || \
+ echo "Failed to install uncrustify configuration file" 1>&2
+ fi
+ if test -f uncrustify.cfg; then
+ if test -d '.git' && test -x /bin/bash; then
+ if test -f .git/hooks/pre-commit; then
+ echo "Pre-commit git hook already exists, skipping installation from the upstream file."
+ else
+ echo "Installing uncrustify pre-commit git hook"
+ ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit || \
+ cp contrib/uncrustify_precommit .git/hooks/pre-commit || \
+ echo "Failed to install pre-commit git hook" 1>&2
+ fi
+ else
+ echo "No '.git' directory or no bash shell found, skipping installation of pre-commit git hook."
+ fi
+ fi
+else
+ echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development."
+fi
+
+WANT_AUTOCONF=latest
+WANT_AUTOMAKE=latest
+export WANT_AUTOCONF
+export WANT_AUTOMAKE
+
+autoreconf -vi ${1+"$@"} || \
+ echo "*** Failed to build autoconf output files ***" >&2
diff --git a/configure.ac b/configure.ac
@@ -0,0 +1,6061 @@
+# This file is part of libmicrohttpd.
+# (C) 2006-2021 Christian Grothoff (and other contributing authors)
+# (C) 2014-2024 Evgeny Grin (Karlson2k)
+#
+# libmicrohttpd is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 3, or (at your
+# option) any later version.
+#
+# libmicrohttpd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with libmicrohttpd; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+#
+#
+# Process this file with autoconf to produce a configure script.
+#
+#
+AC_PREREQ([2.64])
+LT_PREREQ([2.4.0])
+AC_INIT([GNU libmicrohttpd2],[1.99.0],[libmicrohttpd@gnu.org])
+AC_CONFIG_AUX_DIR([build-aux])
+MHD_AUX_DIR='build-aux' # Must be set to the same value as in the previous line
+AC_CONFIG_HEADERS([src/incl_priv/mhd_config.h])
+AC_CONFIG_MACRO_DIR([m4])
+m4_pattern_forbid([^_?MHD_[A-Z_]+_CC_])dnl
+
+LIB_VERSION_CURRENT=80
+LIB_VERSION_REVISION=1
+LIB_VERSION_AGE=68
+AC_SUBST([LIB_VERSION_CURRENT])
+AC_SUBST([LIB_VERSION_REVISION])
+AC_SUBST([LIB_VERSION_AGE])
+
+
+PACKAGE_VERSION_MAJOR='m4_car(m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))'
+PACKAGE_VERSION_MINOR='m4_argn(2, m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))'
+PACKAGE_VERSION_SUBMINOR='m4_argn(3, m4_unquote(m4_split(AC_PACKAGE_VERSION, [\.])))'
+AS_VAR_ARITH([MHD_W32_DLL_SUFF],[[$LIB_VERSION_CURRENT - $LIB_VERSION_AGE]])
+AC_SUBST([PACKAGE_VERSION_MAJOR])
+AC_SUBST([PACKAGE_VERSION_MINOR])
+AC_SUBST([PACKAGE_VERSION_SUBMINOR])
+AC_SUBST([MHD_W32_DLL_SUFF])
+
+MHD_LIB_CPPFLAGS=""
+MHD_LIB_CFLAGS=""
+MHD_LIB_LDFLAGS=""
+MHD_LIBDEPS=""
+# for pkg-config
+MHD_REQ_PRIVATE=''
+MHD_LIBDEPS_PKGCFG=''
+
+AS_IF([test -z "$CC" && test -z "$CPP"], [
+ AC_MSG_CHECKING([[whether z/OS special settings are required]])
+ AS_IF([test `uname -s` = "OS/390"],
+ [
+ # configure binaries for z/OS
+ AS_IF([test -z "$CC"],
+ [CC=`pwd`"/contrib/xcc"
+ chmod +x $CC || true])
+ AS_IF([test -z "$CPP"],
+ CPP="c89 -E")
+ AC_MSG_RESULT([[yes]])
+ ],
+ [AC_MSG_RESULT([[no]])]
+ )
+])
+
+
+AC_MSG_CHECKING([for build type])
+AC_ARG_ENABLE([build-type],
+ [AS_HELP_STRING([[--enable-build-type=TYPE]],
+ [enable build TYPE, a set of configuration parameters; individual settings ]
+ [(asserts, sanitizers, compiler and linker flags) can be overridden by ]
+ [additional configure parameters (debug, debugger, neutral, release, release-compact, ]
+ [release-hardened) [neutral]])],
+ [], [enable_build_type=neutral])
+AS_IF([test "x${enable_build_type}" = "x"], [enable_build_type="neutral"])
+AS_VAR_IF([enable_build_type], ["no"], [enable_build_type="neutral"])
+AS_VAR_IF([enable_build_type], ["yes"], [AC_MSG_ERROR([[Missing TYPE for --enable-build-type=]])])
+AS_CASE([${enable_build_type}],
+ [debug], [AC_MSG_RESULT([debug. Defaults: enable asserts, sanitizers (if any supported), debug information, compiler optimisation for debugging])],
+ [debugger], [AC_MSG_RESULT([debugger. Defaults: enable asserts, disable sanitizers, debug information, no compiler optimisation, static lib])],
+ [neutral], [AC_MSG_RESULT([neutral. Defaults: use only user-specified compiler and linker flags])],
+ [release], [AC_MSG_RESULT([release. Defaults: disable asserts, enable compiler optimisations])],
+ [release-compact], [AC_MSG_RESULT([release-compact. Defaults: disable asserts, enable compiler optimisations for size, enable compact code])],
+ [release-hardened], [AC_MSG_RESULT([release-hardened. Defaults: disable asserts, enable compiler optimisations, enable linker and compiler hardening])],
+ [AC_MSG_ERROR([[Unknown build type: ${enable_build_type}]])]
+)
+AS_VAR_IF([enable_build_type], ["neutral"], [:],
+ [
+ # For all non-neutral build types do not use automatic "-g -O2" for CFLAGS
+ AS_IF([test -z "${CFLAGS}"], [CFLAGS=""])
+ ]
+)
+AS_VAR_IF([enable_build_type], ["debugger"],
+ [ # Build only static version unless something else is specified by the user
+ AS_IF([test -z "${enable_static}" || test "x${enable_static}" = "xyes"],
+ [
+ AS_IF([test -z "${enable_shared}"],
+ [
+ enable_shared="no"
+ enable_static="yes"
+ ]
+ )
+ ],
+ [
+ AS_CASE([${enable_static}],[*libmicrohttpd*],
+ [AS_IF([test -z "${enable_shared}"], [enable_shared="no"])],
+ )
+ ]
+ )
+ ]
+)
+AS_CASE([${enable_build_type}],[debug|debugger],
+ [ AS_IF([test -z "${enable_silent_rules}"], [ enable_silent_rules="yes" ])]
+)
+
+AM_INIT_AUTOMAKE([gnu] [check-news] [filename-length-max=99] [tar-v7] [silent-rules] [subdir-objects])
+
+# Checks for programs.
+AC_PROG_AWK
+AC_PROG_GREP
+AC_PROG_FGREP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_CANONICAL_HOST
+m4_version_prereq([2.70],
+ [
+# Find C compiler and compiler options to support
+# the latest C standard (C11). Fallback to C99 and C89
+# if later C versions are not supported.
+AC_PROG_CC
+ ],
+ [
+# Find C compiler and compiler options to support
+# the latest C standard (C99). Fallback to C89
+# if later C versions are not supported.
+AC_PROG_CC_STDC
+ ]
+)
+
+# Workaround for libgcrypt
+AS_IF([[test "x$lt_sysroot" != "x" && test "x$SYSROOT" = "x"]], [[SYSROOT="$lt_sysroot"]])
+user_CFLAGS="$CFLAGS"
+user_LDFLAGS="$LDFLAGS"
+user_CPPFLAGS="$CPPFLAGS"
+
+CFLAGS_ac=""
+LDFLAGS_ac=""
+CPPFLAGS_ac=""
+
+MHD_SYS_EXT([CPPFLAGS_ac])
+CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])
+
+AC_ARG_ENABLE([compact-code],
+ [AS_HELP_STRING([[--enable-compact-code]],
+ [enable use of a reduced size version of the code, resulting in smaller ]
+ [binaries with a slight performance hit [auto]])],
+ [], [enable_compact_code=auto])
+AS_IF([test "x${enable_compact_code}" = "x"], [enable_compact_code="auto"])
+AH_TEMPLATE([[MHD_FAVOR_SMALL_CODE]], [Define to '1' to use compact code version])
+AH_TEMPLATE([[MHD_FAVOR_FAST_CODE]], [Define to '1' to use fast (and larger) code version])
+AS_UNSET([compact_code_MSG])
+AS_CASE([${enable_compact_code}], [auto],
+ [
+ # Parameter not set.
+ # Check preprocessor macros
+ AC_CHECK_DECL([MHD_FAVOR_SMALL_CODE],
+ [
+ enable_compact_code="yes"
+ compact_code_MSG="enabled by preprocessor macro"
+ ],
+ [],[/* no includes */]
+ )
+ AC_CHECK_DECL([MHD_FAVOR_FAST_CODE],
+ [
+ AS_VAR_IF([enable_compact_code],["yes"],
+ [AC_MSG_ERROR([Both MHD_FAVOR_SMALL_CODE and MHD_FAVOR_FAST_CODE macros are defined])]
+ )
+ enable_compact_code="no"
+ compact_code_MSG="set by preprocessor macro"
+ ],[],[/* no includes */]
+ )
+
+ AS_VAR_IF([enable_compact_code], ["auto"],
+ [
+ # No preference by preprocessor macros
+ AC_CACHE_CHECK([whether compiler is configured to optimize for size],
+ [mhd_cv_cc_optim_size],
+ [
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM([[
+#ifndef __OPTIMIZE_SIZE__
+#error Looks like compiler does not optimize for size
+choke me now
+#endif
+ ]],[])
+ ],
+ [mhd_cv_cc_optim_size="yes"],[mhd_cv_cc_optim_size="no"]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_optim_size], ["yes"],
+ [
+ enable_compact_code="yes"
+ compact_code_MSG="enabled automatically as compiler optimizes for size"
+ AC_DEFINE([MHD_FAVOR_SMALL_CODE],[1])
+ ]
+ )
+ ]
+ )
+
+ AS_VAR_IF([enable_compact_code], ["auto"],
+ [
+ # No preference by preprocessor macros and compiler flags
+ AS_CASE([${enable_build_type}],[*-compact],
+ [
+ enable_compact_code="yes"
+ compact_code_MSG="enabled by --enable-build-type=${enable_build_type}"
+ AC_DEFINE([MHD_FAVOR_SMALL_CODE],[1])
+ ]
+ )
+ ]
+ )
+
+ AS_VAR_IF([enable_compact_code], ["auto"],
+ [
+ # No preference
+ enable_compact_code="no"
+ compact_code_MSG="by default"
+ AC_DEFINE([MHD_FAVOR_FAST_CODE],[1])
+ ]
+ )
+ ],
+ [yes],
+ [
+ compact_code_MSG="enabled by configure parameter"
+ AC_CHECK_DECL([MHD_FAVOR_SMALL_CODE],
+ [],
+ [AC_DEFINE([MHD_FAVOR_SMALL_CODE],[1])],[/* no includes */]
+ )
+ AC_CHECK_DECL([MHD_FAVOR_FAST_CODE],
+ [AC_MSG_ERROR([MHD_FAVOR_FAST_CODE macro is defined, --enable-compact-code could not be used])
+ ],
+ [],[/* no includes */]
+ )
+ ],
+ [no],
+ [
+ compact_code_MSG="disabled by configure parameter"
+ AC_CHECK_DECL([MHD_FAVOR_FAST_CODE],
+ [],
+ [AC_DEFINE([MHD_FAVOR_FAST_CODE],[1])],[/* no includes */]
+ )
+ AC_CHECK_DECL([MHD_FAVOR_SMALL_CODE],
+ [AC_MSG_ERROR([MHD_FAVOR_SMALL_CODE macro is defined, --disable-compact-code could not be used])
+ ],
+ [],[/* no includes */]
+ )
+ ],
+ [AC_MSG_ERROR([[Unknown parameter value: --enable-compact-code=${enable_compact_code}]])]
+)
+
+AC_MSG_CHECKING([whether to use a reduced size version of the code])
+AC_MSG_RESULT([${enable_compact_code} (${compact_code_MSG})])
+
+
+CFLAGS="${user_CFLAGS}"
+# Compiler options to always enable (if supported)
+MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-fno-strict-aliasing], [-qnoansialias])
+# '-qlonglong' is XLC option for C89, not used with C99 or later
+MHD_CHECK_ADD_CC_CFLAG([-qlonglong], [CFLAGS_ac])
+
+# Set basic optimisation flags
+AS_VAR_IF([enable_build_type],["neutral"],[],
+ [ # Any non-neutral build types
+ AC_CACHE_CHECK([whether workarounds for clang or clang-based compiler are required],
+ [mhd_cv_cc_clang_based],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#if ! defined(__clang__) && ! defined(__llvm__)
+#error Compiler is not clang-based
+choke me now
+#endif
+ ]]
+ )
+ ],
+ [mhd_cv_cc_clang_based="yes"],[mhd_cv_cc_clang_based="no"]
+ )
+ ]
+ )
+ ]
+)
+AS_CASE([${enable_build_type}],[debug|debugger],
+ [ # Debug build or build for walking with debugger
+ CFLAGS="${user_CFLAGS}"
+ AS_VAR_IF([enable_build_type],["debug"],
+ [
+ # Clang has ASAN (pointer compare) broken when '-Og' optimisations are used
+ AS_IF([test "x${enable_sanitizers}" != "xno" && test "x${mhd_cv_cc_clang_based}" = "xyes"],
+ [MHD_CHECK_ADD_CC_CFLAG([-O0], [CFLAGS_ac])],
+ [MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Og], [-O0])]
+ )
+ ],
+ [MHD_CHECK_ADD_CC_CFLAG([-O0], [CFLAGS_ac])]
+ )
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ]
+)
+AS_CASE([${enable_build_type}],[release|release-*],
+ [ # All release types
+ AS_VAR_IF([enable_build_type],["release-compact"],
+ [
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ AC_CHECK_DECL([MHD_FAVOR_SMALL_CODE],[],
+ [AC_CHECK_DECL([MHD_FAVOR_FAST_CODE],[],
+ [MHD_APPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-DMHD_FAVOR_SMALL_CODE=1])],
+ [/* no includes */])],[/* no includes */])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${user_CFLAGS}"
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Oz], [-Os], [-O])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ],
+ [ # All non-compact release types
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ AC_CHECK_DECL([MHD_FAVOR_SMALL_CODE],[],
+ [AC_CHECK_DECL([MHD_FAVOR_FAST_CODE],[],
+ [MHD_APPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-DMHD_FAVOR_FAST_CODE=1])],
+ [/* no includes */])],[/* no includes */])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${user_CFLAGS}"
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-O2], [-O])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ]
+ )
+ ]
+)
+
+AS_VAR_IF([enable_build_type],["neutral"],[],
+ [ # Any non-neutral build types
+ MHD_CHECK_ADD_CC_CFLAGS([-Wall -Wnull-dereference], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wdeclaration-after-statement -Wimplicit -Wnested-externs], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wredundant-decls -Wtrampolines -Wunsafe-loop-optimizations], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wpoison-system-directories], [CFLAGS_ac])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${user_LDFLAGS}"
+ MHD_CHECK_ADD_CC_LDFLAG([-Wl,--warn-common], [LDFLAGS_ac])
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+)
+AS_CASE([${enable_build_type}],[debug|debugger],
+ [ # Debug build or build for walking with debugger
+ CFLAGS="${user_CFLAGS}"
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-ggdb3], [-g3], [-ggdb], [-g])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wextra -Wdouble-promotion], [CFLAGS_ac])
+ MHD_FIND_ADD_CC_CFLAG_IFELSE(
+ [
+ # clang produce warning when string pointer is used as a format specifier for v*printf() function
+ AS_VAR_IF([mhd_cv_cc_clang_based],["yes"],[MHD_CHECK_ADD_CC_CFLAG([-Wno-format-nonliteral], [CFLAGS_ac])])
+ ],[],
+ [CFLAGS_ac], [-Wformat=2], [-Wformat]
+ )
+ MHD_CHECK_ADD_CC_CFLAGS([-Wformat-overflow -Wformat-truncation -Wformat-security -Wformat-signedness], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wmissing-include-dirs -Wshift-overflow=2 -Wstringop-overflow=4 -Walloc-zero], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wduplicated-branches -Wduplicated-cond -Wfloat-equal -Wshadow -Wpointer-arith], [CFLAGS_ac])
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wshadow-all], [-Wshadow])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wbad-function-cast -Wcast-qual -Wwrite-strings -Wconversion], [CFLAGS_ac])
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wcast-align=strict], [-Wcast-align])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wjump-misses-init -Wlogical-op -Waggregate-return -Wstrict-prototypes], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wold-style-definition -Wmissing-declarations -Wmissing-prototypes], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wuninitialized -Winit-self -Wshift-negative-value -Wswitch-enum], [CFLAGS_ac])
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wstrict-overflow=4], [-Wstrict-overflow])
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac], [-Wnormalized=nfkc], [-Wnormalized])
+ MHD_CHECK_ADD_CC_CFLAGS([-Walloca -Wbidi-chars=any -Warray-bounds -Wpacked -Wvariadic-macros], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wundef], [CFLAGS_ac])
+
+ MHD_CHECK_ADD_CC_CFLAGS([-Wanon-enum-enum-conversion -Warray-bounds-pointer-arithmetic -Wassign-enum], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wbit-int-extension -Wbitfield-enum-conversion -Wparentheses -Wbool-operation], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wcast-function-type -Wcomma -Wcomment -Wcompound-token-split], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wconditional-uninitialized -Wdeprecated], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wdocumentation-pedantic -Wempty-init-stmt -Wenum-conversion -Wexpansion-to-defined], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wflexible-array-extensions -Wloop-analysis -Wformat-pedantic], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wformat-type-confusion -Wfour-char-constants], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wgcc-compat -Wgnu-anonymous-struct -Wgnu-compound-literal-initializer], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wgnu-conditional-omitted-operand -Wgnu-designator -Wgnu-empty-initializer], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wgnu-empty-struct -Wgnu-flexible-array-initializer -Wgnu-folding-constant], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wgnu-null-pointer-arithmetic -Wgnu-pointer-arith -Wgnu-redeclared-enum], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wgnu-union-cast -Wgnu-variable-sized-type-not-at-end -Widiomatic-parentheses], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wmissing-noreturn -Wmissing-variable-declarations -Wnested-anon-types], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wnewline-eof -Wover-aligned -Wredundant-parens], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wshift-sign-overflow -Wtautological-compare -Wunaligned-access], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wunused -Wzero-as-null-pointer-constant -Wzero-length-array], [CFLAGS_ac])
+ MHD_CHECK_CC_CFLAG([-Wused-but-marked-unused],[CFLAGS_ac],
+ [
+ AC_CACHE_CHECK([whether $[]CC -Wused-but-marked-unused works with system headers],
+ [mhd_cv_wused_but_marked_unused_sys_header],
+ [
+ SAVE_ac_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag="yes"
+ CFLAGS="${CFLAGS_ac} -Wused-but-marked-unused ${user_CFLAGS}"
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#include <stdio.h>
+
+int main(void)
+{
+ char buf[16];
+ return (int) snprintf(buf, 16, "test");
+}
+ ]]
+ )
+ ],
+ [mhd_cv_wused_but_marked_unused_sys_header="yes"],
+ [mhd_cv_wused_but_marked_unused_sys_header="no"]
+ )
+ ac_c_werror_flag="$SAVE_ac_c_werror_flag"
+ ]
+ )
+ AS_VAR_IF([mhd_cv_wused_but_marked_unused_sys_header],["yes"],
+ [MHD_APPEND_FLAG_TO_VAR([CFLAGS_ac],[-Wused-but-marked-unused])]
+ )
+ ]
+ )
+ #
+ # Removed flags:
+ #
+ # -Wdisabled-macro-expansion - warns about macros from system headers
+
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${user_LDFLAGS}"
+ MHD_CHECK_ADD_CC_LDFLAG([-Wl,--enable-long-section-names], [LDFLAGS_ac])
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+)
+AS_CASE([${enable_build_type}],[release|release-*],
+ [ # All release types
+ CFLAGS="${user_CFLAGS}"
+ AS_VAR_IF([enable_build_type],["release-compact"],
+ [],
+ [ # All non-compact release types
+ MHD_CHECK_ADD_CC_CFLAGS([-fsched-pressure -fira-loop-pressure -fmerge-all-constants], [CFLAGS_ac]) # These flags may improve size, recheck with LTO and linker garbage collection
+ MHD_CHECK_ADD_CC_CFLAGS([-ftree-partial-pre -fgcse-after-reload -fipa-pta], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-fisolate-erroneous-paths-attribute -ffinite-loops -floop-nest-optimize], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-fpredictive-commoning -frename-registers], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-ftree-loop-distribute-patterns -fpeel-loops -fsplit-loops -ftree-vectorize], [CFLAGS_ac])
+ ]
+ )
+
+ AS_VAR_IF([enable_build_type],["release-hardened"],
+ [
+ MHD_CHECK_ADD_CC_CFLAGS([-Wformat-security -Wstack-protector], [CFLAGS_ac])
+ MHD_CHECK_ADD_CC_CFLAGS([-Wuninitialized -Winit-self -Walloc-zero -Wbidi-chars=any], [CFLAGS_ac])
+ ]
+ )
+ AS_VAR_IF([enable_build_type],["release"],
+ [ # Flags are not suitable for 'compact' and for 'hardened'
+ MHD_CHECK_ADD_CC_CFLAGS([-ffast-math -fno-trapping-math], [CFLAGS_ac])
+ ]
+ )
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ # W32-specific
+ LDFLAGS="${user_LDFLAGS}"
+ MHD_CHECK_ADD_CC_LDFLAG([-Wl,--disable-long-section-names], [LDFLAGS_ac])
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+)
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+# Additional flags are checked and added at the end of 'configure'
+
+# Check for headers that are ALWAYS required
+AC_CHECK_HEADERS_ONCE([stdio.h string.h stdint.h errno.h limits.h fcntl.h], [],
+ [AC_MSG_ERROR([Compiling libmicrohttpd requires standard POSIX headers files])], [AC_INCLUDES_DEFAULT])
+
+# Check for basic optional headers
+AC_CHECK_HEADERS([stddef.h stdlib.h inttypes.h sys/types.h sys/stat.h unistd.h \
+ sys/uio.h], [], [], [AC_INCLUDES_DEFAULT])
+
+# Check for clock-specific optional headers
+AC_CHECK_HEADERS([sys/time.h time.h], [], [], [AC_INCLUDES_DEFAULT])
+
+# Check for system information and parameters optional headers
+AC_CHECK_HEADERS([endian.h machine/endian.h sys/endian.h sys/byteorder.h \
+ sys/machine.h machine/param.h sys/param.h sys/isa_defs.h \
+ sys/ioctl.h], [], [], [AC_INCLUDES_DEFAULT])
+
+# Check for network and sockets optional headers
+AC_CHECK_HEADERS([sys/socket.h sys/select.h netinet/in_systm.h netinet/in.h \
+ arpa/inet.h netinet/ip.h netinet/tcp.h net/if.h \
+ netdb.h sockLib.h inetLib.h], [], [],
+ [AC_INCLUDES_DEFAULT
+ [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif /* HAVE_INTTYPES_H */
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif /* HAVE_NETINET_IP_H */
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif /* HAVE_NETINET_TCP_H */
+ ]]
+)
+
+# Check for other optional headers
+AC_CHECK_HEADERS([sys/msg.h sys/mman.h signal.h], [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_HEADER([[search.h]],
+ [
+ MHD_CHECK_LINK_RUN([[for proper tsearch(), tfind() and tdelete()]],[[mhd_cv_sys_tsearch_usable]],
+ [
+ AS_CASE([$host_os],
+ [openbsd*],
+ [[ # Some OpenBSD versions have wrong return value for tdelete()
+ mhd_cv_sys_tsearch_usable='assuming no'
+ ]],
+ [netbsd*],
+ [[ # NetBSD had leaked root node for years
+ mhd_cv_sys_tsearch_usable='assuming no'
+ ]],
+ [[mhd_cv_sys_tsearch_usable='assuming yes']]
+ )
+ ],
+ [
+ AC_LANG_SOURCE(
+ [[
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif /* HAVE_STDDEF_H */
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+#include <search.h>
+
+static int cmp_func(const void *p1, const void *p2)
+{
+ return (*((const int *)p1)) - (*((const int *)p2));
+}
+
+int main(void)
+{
+ int ret = 0;
+ void *root_ptr = NULL;
+ int element1 = 1;
+ int **element_ptr_ptr1;
+ int **element_ptr_ptr2;
+
+ element_ptr_ptr1 =
+ (int **) tsearch ((void*) &element1, &root_ptr, &cmp_func);
+ if (NULL == element_ptr_ptr1)
+ {
+ fprintf (stderr, "NULL pointer has been returned when tsearch() called for the first time.\n");
+ return ++ret;
+ }
+ if (*element_ptr_ptr1 != &element1)
+ {
+ fprintf (stderr, "Wrong pointer has been returned when tsearch() called for the first time.\n");
+ return ++ret;
+ }
+ if (NULL == root_ptr)
+ {
+ fprintf (stderr, "Root pointer has not been set by tsearch().\n");
+ return ++ret;
+ }
+
+ element_ptr_ptr2 =
+ (int **) tsearch ((void*) &element1, &root_ptr, &cmp_func);
+ if (NULL == element_ptr_ptr2)
+ {
+ fprintf (stderr, "NULL pointer has been returned when tsearch() called for the second time.\n");
+ return ++ret;
+ }
+ if (*element_ptr_ptr2 != &element1)
+ {
+ fprintf (stderr, "Wrong pointer has been returned when tsearch() called for the second time.\n");
+ ++ret;
+ }
+ if (element_ptr_ptr2 != element_ptr_ptr1)
+ {
+ fprintf (stderr, "Wrong element has been returned when tsearch() called for the second time.\n");
+ ++ret;
+ }
+
+ element_ptr_ptr2 =
+ (int **) tfind ((void*) &element1, &root_ptr, &cmp_func);
+ if (NULL == element_ptr_ptr2)
+ {
+ fprintf (stderr, "NULL pointer has been returned by tfind().\n");
+ ++ret;
+ }
+ if (*element_ptr_ptr2 != &element1)
+ {
+ fprintf (stderr, "Wrong pointer has been returned when by tfind().\n");
+ ++ret;
+ }
+ if (element_ptr_ptr2 != element_ptr_ptr1)
+ {
+ fprintf (stderr, "Wrong element has been returned when tsearch() called for the second time.\n");
+ ++ret;
+ }
+
+ element_ptr_ptr1 =
+ (int **) tdelete ((void*) &element1, &root_ptr, &cmp_func);
+ if (NULL == element_ptr_ptr1)
+ {
+ fprintf (stderr, "NULL pointer has been returned by tdelete().\n");
+ ++ret;
+ }
+ if (NULL != root_ptr)
+ {
+ fprintf (stderr, "Root pointer has not been set to NULL by tdelete().\n");
+ ++ret;
+ }
+
+ return ret;
+}
+ ]]
+ )
+ ],
+ [AC_DEFINE([[MHD_USE_SYS_TSEARCH]], [[1]], [Define to 1 if you have properly working tsearch(), tfind() and tdelete() functions.])]
+ )
+ ],
+ [], [AC_INCLUDES_DEFAULT]
+)
+AM_CONDITIONAL([MHD_USE_SYS_TSEARCH], [[test "x$mhd_cv_sys_tsearch_usable" = "xyes" || test "x$mhd_cv_sys_tsearch_usable" = "xassuming yes"]])
+
+# Optional headers used for tests
+AC_CHECK_HEADERS([sys/sysctl.h netinet/ip_icmp.h netinet/icmp_var.h], [], [],
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif /* HAVE_SYS_SYSCTL_H */
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif /* HAVE_NETINET_IP_H */
+#ifdef HAVE_NETINET_IP_ICMP_H
+#include <netinet/ip_icmp.h>
+#endif /* HAVE_NETINET_IP_ICMP_H */
+ ]]
+)
+
+AC_ARG_ENABLE([compiler-hardening],
+ [AS_HELP_STRING([--enable-compiler-hardening], [enable compiler security checks])],
+ [],
+ [AS_CASE([${enable_build_type}],[*-hardened],
+ [enable_compiler_hardening='yes'],[enable_compiler_hardening='no'])]
+)
+AS_VAR_IF([enable_compiler_hardening],["yes"],
+ [
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ AC_CHECK_DECL([_FORTIFY_SOURCE],
+ [MHD_APPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-U_FORTIFY_SOURCE])],
+ [],[/* no includes */])
+ MHD_APPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-D_FORTIFY_SOURCE=2])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${user_CFLAGS}"
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac],[-fstack-protector-strong],[-fstack-protector-all],[-fstack-protector])
+ MHD_CHECK_ADD_CC_CFLAGS([-fstack-clash-protection],[CFLAGS_ac])
+ MHD_FIND_ADD_CC_CFLAG([CFLAGS_ac],[-ftrivial-auto-var-init=pattern],[-ftrivial-auto-var-init=zero])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ AS_IF([test "x${enable_static}" = "xyes" && test "x${pic_mode}" != "xyes"],
+ [
+ # PIE static lib can be used within non-PIE application, but
+ # PIE static lib cannot be used in non-PIE shared lib. Let's assume
+ # that static lib will not be used in shared lib
+ # All "pie" flags will be used automatically by libtool only
+ # for static library objects.
+ CFLAGS="${user_CFLAGS}"
+ # Perform tests here with "-pie" enabled
+ LDFLAGS="${LDFLAGS_ac} -pie ${user_LDFLAGS}"
+ MHD_CHECK_ADD_CC_CFLAG([-fPIE],[CFLAGS_ac],
+ [
+ MHD_APPEND_FLAG_TO_VAR([LDFLAGS_ac],[-pie])
+ ],
+ [
+ MHD_CHECK_ADD_CC_CFLAG([-fpie],[CFLAGS_ac],
+ [
+ MHD_APPEND_FLAG_TO_VAR([LDFLAGS_ac],[-pie])
+ ]
+ )
+ ]
+ )
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+ )
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+)
+
+# Linker hardening options
+# Currently these options are ELF specific, they don't work on Darwin and W32
+AC_ARG_ENABLE([linker-hardening],
+ [AS_HELP_STRING([--enable-linker-hardening], [enable linker security fixups])],
+ [],
+ [AS_CASE([${enable_build_type}],[*-hardened],
+ [enable_linker_hardening='yes'],[enable_linker_hardening='no'])]
+)
+AS_VAR_IF([enable_linker_hardening],["yes"],
+ [
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${user_LDFLAGS}"
+ MHD_CHECK_ADD_CC_LDFLAG([-Wl,-z,relro],[LDFLAGS_ac],
+ [MHD_CHECK_ADD_CC_LDFLAG([-Wl,-z,now],[LDFLAGS_ac])])
+ # Actually should be "noexec" by default, but let's try to enforce it.
+ MHD_CHECK_ADD_CC_LDFLAG([-Wl,-z,noexecstack],[LDFLAGS_ac])
+ # W32-specific. Some are enabled by default, but they will be enfored to be sure.
+ MHD_CHECK_ADD_CC_LDFLAGS([-Wl,--large-address-aware -Wl,--enable-auto-image-base],[LDFLAGS_ac])
+ MHD_CHECK_ADD_CC_LDFLAGS([-Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va],[LDFLAGS_ac])
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+)
+
+
+AH_TEMPLATE([[HAVE_STDBOOL_H]], [Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines 'bool' type.])
+AH_TEMPLATE([[HAVE_BUILTIN_TYPE_BOOL]], [Define to 1 if you have the real boolean type.])
+AH_TEMPLATE([[bool]], [Define to type name which will be used as boolean type.])
+AC_CHECK_HEADER([stdbool.h],
+ [
+ AC_CHECK_TYPE([bool],
+ [
+ AC_DEFINE([[HAVE_STDBOOL_H]], [[1]])
+ AC_DEFINE([[HAVE_BUILTIN_TYPE_BOOL]], [[1]])
+ ],
+ [
+ AC_MSG_WARN([[Header <stdbool.h> is present, but "bool" type cannot be detected. Check compiler flags.]])
+ AC_DEFINE([[bool]], [[int]])
+ ], [
+#include <stdbool.h>
+ ]
+ )
+ ],
+ [
+ AC_CHECK_TYPE([bool],
+ [AC_DEFINE([[HAVE_BUILTIN_TYPE_BOOL]], [[1]])],
+ [
+ AC_CHECK_TYPE([_Bool],
+ [
+ AC_DEFINE([[HAVE_BUILTIN_TYPE_BOOL]], [[1]])
+ AC_DEFINE([[bool]], [[_Bool]])
+ ],
+ [
+ AC_DEFINE([[bool]], [[int]])
+ ], []
+ )
+ ], []
+ )
+ ],
+ [AC_INCLUDES_DEFAULT]
+)
+
+AC_CACHE_CHECK([[whether "true" is defined or builtin]], [[mhd_cv_macro_true_defined]],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+ ]], [[
+#if defined(true)
+ /* dummy */
+#else
+ (void)true;
+#endif
+ ]])
+ ], [[mhd_cv_macro_true_defined='yes']], [[mhd_cv_macro_true_defined='no']])
+ ])
+AS_VAR_IF([[mhd_cv_macro_true_defined]], [["yes"]], [[:]],
+ [AC_DEFINE([[true]],[[(!0)]], [Define to value interpreted by compiler as boolean "true", if "true" is not defined by system headers.])])
+
+AC_CACHE_CHECK([[whether "false" is defined or builtin]], [[mhd_cv_macro_false_defined]],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+ ]], [[
+#if !defined(false)
+ (void)false;
+#else
+ /* dummy */
+#endif
+ ]])
+ ], [[mhd_cv_macro_false_defined='yes']], [[mhd_cv_macro_false_defined='no']])
+ ])
+AS_VAR_IF([[mhd_cv_macro_false_defined]], [["yes"]], [[:]],
+ [AC_DEFINE([[false]],[[0]], [Define to value interpreted by compiler as boolean "false", if "false" is not defined by system headers.])])
+
+AC_CACHE_CHECK([[whether "true" and "false" could be used]], [[mhd_cv_macro_true_false_valid]],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+ ]], [[
+ int var1[true ? 1 : -1] = { 1 };
+ int var2[false ? -1 : 1] = { 2 };
+ int var3[!true ? -1 : 1] = { 3 };
+ int var4[!false ? 1 : -1] = { 4 };
+ if (var1[0] == var2[0] || var3[0] == var4[0])
+ return 1;
+ ]])
+ ], [[mhd_cv_macro_true_false_valid='yes']], [[mhd_cv_macro_true_false_valid='no']])
+ ])
+AS_VAR_IF([[mhd_cv_macro_true_false_valid]], [["yes"]], [[:]],
+ [AC_MSG_ERROR([[Value of "true" or value of "false" is not valid. Check config.log for details.]])])
+
+
+AX_CHECK_COMPILE_FLAG([[-Werror=attributes]],
+ [
+ AC_MSG_CHECKING([[whether -Werror=attributes actually works]])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS} -Werror=attributes"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[__attribute__((non_existing_attrb_dummy)) static int SimpleFunc(void) {return 3;}]],
+ [[int r = SimpleFunc(); if (r) return r;]])],
+ [
+ AC_MSG_RESULT([[no]])
+ errattr_CFLAGS=""
+ ], [
+ AC_MSG_RESULT([[yes]])
+ errattr_CFLAGS="-Werror=attributes"
+ ])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ],
+ [[errattr_CFLAGS=""]], [], [])
+
+AC_MSG_CHECKING([[for function inline keywords supported by $CC]])
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS} $errattr_CFLAGS"
+inln_prfx="none"
+# Prefer always inline functions
+for inln_prfx_chk in InlineWithAttr __forceinline inline __inline__ __inline _inline _Inline
+do
+ # Try to link to avoid "symbol undefined" problems at build time
+ AS_IF([[test "x$inln_prfx_chk" = "xInlineWithAttr"]],
+ [
+ AS_IF([[test "x$errattr_CFLAGS" = "x"]],
+ [[ # Skip test with attribute as negative result can't be detected
+ inln_prfx_chk="__forceinline" # use next value
+ ]],[[inln_prfx_chk="inline __attribute__((always_inline))"]])
+ ])
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef __cplusplus
+#error This test is only for C.
+choke me
+#endif
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#endif
+ static $inln_prfx_chk bool cmpfn(int x, int y)
+ { return x > y; }
+ static $inln_prfx_chk int sumfn(int x, int y)
+ { return x + y; }
+ ]],[[
+ int a = 1, b = 100, c;
+ if (cmpfn(a, b))
+ c = sumfn(a, b);
+ else
+ c = 0 - sumfn(a, b);
+ if (c)
+ return 0;
+ ]])
+ ],
+ [[ inln_prfx="$inln_prfx_chk" ]])
+ test "x$inln_prfx" != "xnone" && break
+done
+AS_IF([[test "x$inln_prfx" != "xnone"]],
+ [
+ AC_DEFINE([INLINE_FUNC],[1],[Define to 1 if your C compiler supports inline functions.])
+ AC_DEFINE_UNQUOTED([_MHD_static_inline],[static $inln_prfx],[Define to prefix which will be used with MHD static inline functions.])
+ ], [
+ AC_DEFINE([_MHD_static_inline],[static],[Define to prefix which will be used with MHD static inline functions.])
+ ])
+AC_MSG_RESULT([[$inln_prfx]])
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+
+AC_CHECK_HEADERS([stdalign.h], [], [], [AC_INCLUDES_DEFAULT])
+AC_CACHE_CHECK([[for C11 'alignof()' support]], [[mhd_cv_c_alignof]],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_STDALIGN_H
+#include <stdalign.h>
+#endif
+ ]], [[
+ int var1[(alignof(int) >= 2) ? 1 : -1];
+ int var2[alignof(unsigned int) - 1];
+ int var3[(alignof(char) > 0) ? 1 : -1];
+ int var4[(alignof(long) >= 4) ? 1 : -1];
+
+ /* Mute compiler warnings */
+ var1[0] = var2[0] = var3[0] = 0;
+ var4[0] = 1;
+ if (var1[0] + var2[0] + var3[0] == var4[0])
+ return 1;
+ ]])
+ ], [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_STDALIGN_H
+#include <stdalign.h>
+#endif
+ ]], [[
+ /* Should fail if 'alignof()' works */
+ int var1[alignof(nonexisting_type) - 1];
+
+ /* Mute compiler warnings */
+ var1[0] = 1;
+ if (var1[0] + 1 == 1)
+ return 1;
+ ]])
+ ], [[mhd_cv_c_alignof='no']], [[mhd_cv_c_alignof='yes']])
+ ], [[mhd_cv_c_alignof='no']])
+ ])
+AS_VAR_IF([mhd_cv_c_alignof], ["yes"],
+ [AC_DEFINE([[HAVE_C_ALIGNOF]], [1], [Define to 1 if your compiler supports 'alignof()'])])
+
+
+# Check system type
+AC_MSG_CHECKING([[for target host OS]])
+os_is_windows="no"
+os_is_native_w32="no"
+AS_CASE(["$host_os"],
+ [*darwin* | *rhapsody* | *macosx*],
+ [AC_DEFINE([OSX],[1],[This is an OS X system])
+ mhd_host_os='Darwin'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [kfreebsd*-gnu],
+ [AC_DEFINE([SOMEBSD],[1],[This is a BSD system])
+ AC_DEFINE([FREEBSD],[1],[This is a FreeBSD system])
+ mhd_host_os='FreeBSD kernel with GNU userland'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [freebsd*],
+ [AC_DEFINE([SOMEBSD],[1],[This is a BSD system])
+ AC_DEFINE([FREEBSD],[1],[This is a FreeBSD system])
+ mhd_host_os='FreeBSD'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [openbsd*],
+ [AC_DEFINE([SOMEBSD],[1],[This is a BSD system])
+ AC_DEFINE([OPENBSD],[1],[This is an OpenBSD system])
+ mhd_host_os='OpenBSD'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [netbsd*],
+ [AC_DEFINE([SOMEBSD],[1],[This is a BSD system])
+ AC_DEFINE([NETBSD],[1],[This is a NetBSD system])
+ mhd_host_os='NetBSD'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [*solaris*],
+ [AC_DEFINE([SOLARIS],[1],[This is a Solaris system])
+ AC_DEFINE([_REENTRANT],[1],[Need with solaris or errno does not work])
+ mhd_host_os='Solaris'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [*linux*],
+ [AC_DEFINE([LINUX],[1],[This is a Linux kernel])
+ mhd_host_os='Linux'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [*cygwin*],
+ [AC_DEFINE([CYGWIN],[1],[This is a Cygwin system])
+ mhd_host_os='Windows/Cygwin'
+ AC_MSG_RESULT([[$mhd_host_os]])
+ os_is_windows="yes"],
+ [*mingw*],
+ [
+ AC_DEFINE([MINGW],[1],[This is a MinGW system])
+ AC_DEFINE([WINDOWS],[1],[This is a Windows system])
+ mhd_host_os='Windows/MinGW'
+ AC_MSG_RESULT([[$mhd_host_os]])
+ AC_CHECK_HEADERS([winsock2.h ws2tcpip.h], [], [AC_MSG_ERROR([[Winsock2 headers are required for W32]])], [AC_INCLUDES_DEFAULT])
+ AC_CACHE_CHECK([for MS lib utility], [ac_cv_use_ms_lib_tool],
+ [mslibcheck=`lib 2>&1`
+ AS_IF([echo "$mslibcheck" | $GREP -e '^Microsoft (R) Library Manager' - >/dev/null],
+ [ac_cv_use_ms_lib_tool=yes],
+ [ac_cv_use_ms_lib_tool=no])
+ ])
+ AS_IF([test "x$ac_cv_use_ms_lib_tool" = "xyes"],
+ [AC_SUBST([MS_LIB_TOOL], [[lib]])])
+ AC_SUBST([lt_cv_objdir])
+ os_is_windows="yes"
+ os_is_native_w32="yes"
+ ],
+ [*openedition*],
+ [AC_DEFINE([OS390],[1],[This is a OS/390 system])
+ mhd_host_os='OS/390'
+ AC_MSG_RESULT([[$mhd_host_os]])],
+ [gnu*],
+ [AC_DEFINE([[GNU_HURD]], [[1]], [Define to `1' if host machine runs on GNU Hurd.])
+ mhd_host_os='GNU Hurd'
+ AC_MSG_RESULT([[$mhd_host_os]])
+ ],
+ [
+ AC_MSG_RESULT([unrecognised OS])
+ mhd_host_os="${host_os}"
+ AC_MSG_WARN([Unrecognised OS $host_os])
+ AC_DEFINE([OTHEROS],1,[Some strange OS])
+ ])
+
+AM_CONDITIONAL([CYGWIN_TARGET], [[test "x$os_is_windows" = "xyes" && \
+ test "x${os_is_native_w32}" != "xyes"]])
+
+AS_VAR_IF([os_is_windows], ["yes"],
+ [
+ AC_MSG_CHECKING([[whether target W32 version is specified by precompiler defines]])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+/* Note: check logic is reversed for easy log reading */
+#ifdef WINVER
+#error WINVER is defined
+choke me now;
+#endif
+#ifdef _WIN32_WINNT
+#error _WIN32_WINNT is defined
+choke me now;
+#endif
+#ifdef NTDDI
+#error NTDDI is defined
+choke me now;
+#endif
+ ]],[[(void)0]])
+ ], [[mhd_w32_ver_preselect=no]], [[mhd_w32_ver_preselect=yes]]
+ )
+ AC_MSG_RESULT([[${mhd_w32_ver_preselect}]])
+ AC_CHECK_HEADERS([windows.h sdkddkver.h], [], [], [AC_INCLUDES_DEFAULT])
+ AS_VAR_IF([mhd_w32_ver_preselect],["yes"],
+ [
+ AC_MSG_CHECKING([[for specified target W32 version]])
+ AS_UNSET([[mhd_w32_ver]])
+ AS_UNSET([[mhd_w32_ver_msg]])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if _WIN32_WINNT+0 < 0x0501
+/* Check before headers inclusion */
+#error _WIN32_WINNT is less than 0x0501
+choke me now;
+#endif
+
+#ifdef HAVE_SDKDDKVER_H
+#include <sdkddkver.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#if _WIN32_WINNT+0 < 0x0501
+#error _WIN32_WINNT is less than 0x0501
+choke me now;
+#endif
+ ]],[[(void)0]])
+ ], [], [
+ AC_MSG_RESULT([[pre-WinXP]])
+ AC_MSG_ERROR([[libmicrohttpd cannot be compiled for Windows version before Windows XP]])
+ ]
+ )
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SDKDDKVER_H
+#include <sdkddkver.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#if _WIN32_WINNT+0 == 0x0501
+#error _WIN32_WINNT is 0x0501
+choke me now;
+#endif
+#if _WIN32_WINNT+0 == 0x0502
+#error _WIN32_WINNT is 0x0502
+choke me now;
+#endif
+ ]],[[(void)0]])
+ ], [], [
+ mhd_w32_ver="WinXP"
+ mhd_w32_ver_msg="WinXP (selected by precompiler flags)"
+ ]
+ )
+ AS_VAR_SET_IF([mhd_w32_ver], [],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SDKDDKVER_H
+#include <sdkddkver.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#if _WIN32_WINNT+0 < 0x0600
+#error _WIN32_WINNT is less than 0x0600 but greater than 0x0502
+choke me now;
+#endif
+ ]],[[(void)0]])
+ ], [], [
+ AC_MSG_ERROR([[_WIN32_WINNT value is wrong (less than 0x0600 but greater than 0x0502)]])
+ ]
+ )
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SDKDDKVER_H
+#include <sdkddkver.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#if _WIN32_WINNT+0 == 0x0600
+#error _WIN32_WINNT is 0x0600
+choke me now;
+#endif
+ ]],[[(void)0]])
+ ], [], [
+ mhd_w32_ver="Vista"
+ mhd_w32_ver_msg="Vista (selected by precompiler flags)"
+ ]
+ )
+ ]
+ )
+
+ AS_VAR_SET_IF([mhd_w32_ver], [],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SDKDDKVER_H
+#include <sdkddkver.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#if _WIN32_WINNT+0 > 0x0600
+#error _WIN32_WINNT is greater than 0x0600
+choke me now;
+#endif
+ ]],[[(void)0]])
+ ], [
+ mhd_w32_ver="unknown"
+ mhd_w32_ver_msg="unknown (cannot be detected)"
+ ], [
+ mhd_w32_ver="newer than Vista"
+ mhd_w32_ver_msg="newer than Vista (selected by precompiler flags)"
+ ]
+ )
+ ]
+ )
+ AC_MSG_RESULT([[${mhd_w32_ver}]])
+ ], [
+ mhd_w32_ver="Vista"
+ mhd_w32_ver_msg="Vista (default, override by CPPFLAGS=-D_WIN32_WINNT=0xNNNN)"
+ CPPFLAGS_ac="${CPPFLAGS_ac} -D_WIN32_WINNT=0x0600"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ AC_MSG_CHECKING([[whether headers accept _WIN32_WINNT=0x0600]])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef HAVE_SDKDDKVER_H
+#include <sdkddkver.h>
+#endif
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+#include <stdio.h>
+ ]],[[(void)0]])
+ ], [
+ AC_MSG_RESULT([[yes]])
+ ], [
+ AC_MSG_RESULT([[no]])
+ AC_MSG_ERROR([Headers do not accept _WIN32_WINNT=0x0600. Consider override target W32 version by CPPFLAGS=-D_WIN32_WINNT=0xNNNN])
+ ]
+ )
+ ]
+ )
+ ]
+)
+
+AS_IF([test "x${os_is_windows}" = "xyes" && test "x${os_is_native_w32}" = "xyes"],
+ [
+ AC_CACHE_CHECK([W32 run-time library type], [mhd_cv_wctr_type],
+ [
+ AC_EGREP_CPP([MHDMARKER: UCRT run-time library in use!], [
+#include <stdio.h>
+#if defined(_UCRT)
+#define CRT_STR "MHDMARKER: UCRT run-time library in use!"
+#endif
+#if defined(__MSVCRT_VERSION__)
+#if (__MSVCRT_VERSION__ >= 0xE00) && (__MSVCRT_VERSION__ < 0x1000)
+#define CRT_STR "MHDMARKER: UCRT run-time library in use!"
+#endif
+#if (__MSVCRT_VERSION__ > 0x1400)
+#define CRT_STR "MHDMARKER: UCRT run-time library in use!"
+#endif
+#endif
+
+#ifndef CRT_STR
+#define CRT_STR "MHDMARKER: MSVCRT run-time library in use!"
+#endif
+
+int main(void)
+{
+ printf ("%\n", CRT_STR);
+ return 0;
+}
+ ],
+ [mhd_cv_wctr_type="ucrt"], [mhd_cv_wctr_type="msvcrt"])
+ ]
+ )
+ mhd_host_os="${mhd_host_os}-${mhd_cv_wctr_type}"
+ AS_VAR_IF([mhd_cv_wctr_type], ["msvcrt"],
+ [
+ # Use CFLAGS here to override user-supplied wrong CPPFLAGS. Durty trick, but choice is limited.
+ AX_APPEND_COMPILE_FLAGS([-U__USE_MINGW_ANSI_STDIO -D__USE_MINGW_ANSI_STDIO=0], [CFLAGS_ac])
+ AC_SUBST([W32CRT], [MSVCRT])
+ ], [AC_SUBST([W32CRT], [UCRT])]
+ )
+
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${user_LDFLAGS}"
+ AS_CASE([$mhd_w32_ver],
+ [WinXP],
+ [MHD_CHECK_ADD_CC_LDFLAG([-Wl,--major-subsystem-version,5,--minor-subsystem-version,1],[LDFLAGS_ac])],
+ [Vista],
+ [MHD_CHECK_ADD_CC_LDFLAG([-Wl,--major-subsystem-version,6,--minor-subsystem-version,0],[LDFLAGS_ac])]
+ )
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+)
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+
+
+AC_ARG_WITH([threads],
+ [AS_HELP_STRING([--with-threads=LIB],[choose threading library (posix, w32, auto, none) [auto]])],
+ [], [with_threads='auto'])
+AS_CASE([[$with_threads]],
+ [[win32]], [[with_threads='w32']],
+ [[pthreads]], [[with_threads='posix']],
+ [[posix]], [[:]],
+ [[w32]], [[:]],
+ [[none]], [[with_threads='none']],
+ [[no]], [[with_threads='none']],
+ [[auto]], [[:]],
+ [AC_MSG_ERROR([[incorrect parameter "$with_threads" specified for --with-threads]])]
+)
+
+# Check for posix threads support, regardless of configure parameters as
+# testsuite uses only posix threads.
+AX_PTHREAD(
+ [
+ mhd_have_posix_threads='yes'
+ AC_DEFINE([[HAVE_PTHREAD_H]],[[1]],[Define to 1 if you have the <pthread.h> header file.])
+ AC_CACHE_CHECK([[whether pthread_sigmask(3) is available]],
+ [[mhd_cv_func_pthread_sigmask]], [dnl
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="${CFLAGS_ac} ${PTHREAD_CFLAGS} ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
+ [[
+ sigset_t nset, oset;
+ sigemptyset (&nset);
+ sigaddset (&nset, SIGPIPE);
+ if (0 != pthread_sigmask(SIG_BLOCK, &nset, &oset)) return 1;
+ ]])],
+ [[mhd_cv_func_pthread_sigmask="yes"]],[[mhd_cv_func_pthread_sigmask="no"]])
+ LIBS="${save_LIBS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ])
+ AS_VAR_IF([mhd_cv_func_pthread_sigmask],["yes"],
+ [AC_DEFINE([[HAVE_PTHREAD_SIGMASK]],[[1]],[Define to 1 if you have the pthread_sigmask(3) function.])])
+ ],[[mhd_have_posix_threads='no']])
+AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$mhd_have_posix_threads" = "xyes"])
+
+mhd_have_w32_threads='no'
+AS_IF([[test "x$with_threads" = "xauto"]],
+ [
+ AS_IF([[test "x$os_is_windows" = "xyes"]],
+ [
+ AC_MSG_CHECKING([[for W32 threads]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <windows.h>
+ ]], [ HANDLE h = CreateThread(NULL, 0, NULL, NULL, 0, NULL);])]
+ , [[mhd_have_w32_threads='yes']], [[mhd_have_w32_threads='no']]
+ )
+ AC_MSG_RESULT([[$mhd_have_w32_threads]])
+ ])
+ ]
+)
+
+AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd ($with_threads)]])
+AS_IF([test "x$with_threads" = "xposix"],
+ [ # forced posix threads
+ AS_IF([test "x$mhd_have_posix_threads" = "xyes"], [USE_THREADS='posix'],
+ [ AS_IF([[test "x$os_is_windows" = "xyes"]] ,
+ [ AC_MSG_ERROR([[Posix threads are not available. Try to configure --with-threads=auto]])],
+ [ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]])] )
+ ])
+ ])
+AS_IF([test "x$with_threads" = "xw32"],
+ [ # forced w32 threads
+ AS_IF([[test "x$mhd_have_w32_threads" = "xyes"]],
+ [[ USE_THREADS='w32' ]],
+ [ AC_MSG_ERROR([[W32 threads are not available. Try to configure --with-threads=auto]])])
+ ])
+AS_IF([test "x$with_threads" = "xauto"],
+ [# automatic threads lib selection
+ AS_IF([[test "x$os_is_native_w32" = "xyes" && test "x$mhd_have_w32_threads" = "xyes"]] ,
+ [[ USE_THREADS='w32' ]] ,
+ [[ test "x$mhd_have_posix_threads" = "xyes" ]], [[ USE_THREADS='posix' ]],
+ [[ test "x$mhd_have_w32_threads" = "xyes" ]], [[ USE_THREADS='w32' ]],
+ [ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]]) ]
+ )])
+AS_IF([test "x$with_threads" = "xnone"],
+ [USE_THREADS='none'])
+
+AS_IF([test "x$USE_THREADS" = "xposix"],
+ [CC="$PTHREAD_CC"
+ AC_DEFINE([MHD_USE_POSIX_THREADS],[1],[define to use pthreads])
+ MHD_LIB_CFLAGS="$MHD_LIB_CFLAGS $PTHREAD_CFLAGS"
+ MHD_LIBDEPS="$PTHREAD_LIBS $MHD_LIBDEPS"
+ MHD_LIBDEPS_PKGCFG="$PTHREAD_LIBS $MHD_LIBDEPS_PKGCFG"],
+ [AS_IF([test "x$USE_THREADS" = "xw32"],
+ [AC_DEFINE([MHD_USE_W32_THREADS],[1],[define to use W32 threads])])])
+AM_CONDITIONAL([USE_POSIX_THREADS], [test "x$USE_THREADS" = "xposix"])
+AM_CONDITIONAL([USE_W32_THREADS], [test "x$USE_THREADS" = "xw32"])
+AM_CONDITIONAL([USE_THREADS], [test "x$USE_THREADS" != "xnone"])
+AM_CONDITIONAL([DISABLE_THREADS], [test "x$USE_THREADS" = "xnone"])
+AC_MSG_RESULT([$USE_THREADS])
+
+AC_ARG_ENABLE([[thread-names]],
+ [AS_HELP_STRING([--disable-thread-names],[do not set names on MHD generated threads [auto]])],
+ [], [enable_thread_names='auto'])
+
+AS_IF([test "x$enable_thread_names" != "xno" && test "x$USE_THREADS" = "xposix"],[
+ # Check for thread name function
+ HAVE_THREAD_NAME_FUNC="no"
+ SAVE_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ CFLAGS="${CFLAGS_ac} $PTHREAD_CFLAGS ${user_CFLAGS}"
+ AC_CHECK_HEADERS([pthread_np.h],[],[],
+ [
+AC_INCLUDES_DEFAULT
+ [
+#include <pthread.h>
+ ]
+ ])
+
+ # Try to find how to set thread name by thread attributes.
+ # If pthread_attr_setname_np(3) is not declared, it's not possible to detect
+ # form of pthread_attr_setname_np(3) due to C "feature" "implicit declaration".
+ AC_CHECK_DECL([[pthread_attr_setname_np]],[],[],[[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]])
+
+ AS_IF([[test "x$ac_cv_have_decl_pthread_attr_setname_np" = "xyes"]],
+ [AC_MSG_CHECKING([[for pthread_attr_setname_np(3) in NetBSD or OSF1 form]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]], [[
+ pthread_attr_t thr_attr;
+ pthread_attr_init(&thr_attr);
+ pthread_attr_setname_np(&thr_attr, "name", 0);
+ pthread_attr_destroy(&thr_attr);
+ ]])],
+ [AC_DEFINE([[HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD]], [[1]], [Define if you have NetBSD form (or OSF1 form) of pthread_attr_setname_np(3) function.])
+ HAVE_THREAD_NAME_FUNC="yes"
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])]
+ )
+ ])
+
+ AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_attr_setname_np" = "xyes"]],
+ [AC_MSG_CHECKING([[for pthread_attr_setname_np(3) in IBM i or Solaris form]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]], [[
+ pthread_attr_t thr_attr;
+ pthread_attr_init(&thr_attr);
+ pthread_attr_setname_np(&thr_attr, "name");
+ pthread_attr_destroy(&thr_attr);
+ ]])],
+ [AC_DEFINE([[HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI]], [[1]], [Define if you have IBM i form (or Solaris form) of pthread_attr_setname_np(3) function.])
+ HAVE_THREAD_NAME_FUNC="yes"
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])]
+ )
+ ])
+
+ # Try to find how to set thread name for started thread - less convenient
+ # than setting name by attributes.
+ # If pthread_setname_np(3) is not declared, it's not possible to detect
+ # form of pthread_setname_np(3) due to C "feature" "implicit declaration".
+ AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes"]],
+ [AC_CHECK_DECL([[pthread_setname_np]],[],[],[[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+ ]])
+ ])
+
+ AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_setname_np" = "xyes"]],
+ [AC_MSG_CHECKING([[for pthread_setname_np(3) in NetBSD or OSF1 form]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]], [[int res = pthread_setname_np(pthread_self(), "name", 0); if (res) return res;]])],
+ [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_NETBSD]], [[1]], [Define if you have NetBSD form (or OSF1 form) of pthread_setname_np(3) function.])
+ HAVE_THREAD_NAME_FUNC="yes"
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])]
+ )
+ ])
+
+ AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_setname_np" = "xyes"]],
+ [AC_MSG_CHECKING([[for pthread_setname_np(3) in GNU/Linux form]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]], [[int res = pthread_setname_np(pthread_self(), "name"); if (res) return res;]])],
+ [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_GNU]], [[1]], [Define if you have GNU/Linux form of pthread_setname_np(3) function.])
+ HAVE_THREAD_NAME_FUNC="yes"
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])]
+ )
+ ])
+
+ AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes" && test "x$ac_cv_have_decl_pthread_setname_np" = "xyes"]],
+ [AC_MSG_CHECKING([[for pthread_setname_np(3) in Darwin form]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]], [[int res = pthread_setname_np("name"); if (res) return res;]])],
+ [AC_DEFINE([[HAVE_PTHREAD_SETNAME_NP_DARWIN]], [[1]], [Define if you have Darwin form of pthread_setname_np(3) function.])
+ HAVE_THREAD_NAME_FUNC="yes"
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])]
+ )
+ ])
+
+ AS_IF([[test "x$HAVE_THREAD_NAME_FUNC" != "xyes"]],
+ [
+ AC_CHECK_DECL([[pthread_set_name_np]],
+ [
+ AC_MSG_CHECKING([[for pthread_set_name_np(3) in FreeBSD form]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+]], [[pthread_set_name_np(pthread_self(), "name");]])],
+ [AC_DEFINE([[HAVE_PTHREAD_SET_NAME_NP_FREEBSD]], [[1]], [Define if you have FreeBSD form of pthread_set_name_np(3) function.])
+ HAVE_THREAD_NAME_FUNC="yes"
+ AC_MSG_RESULT([[yes]])],
+ [AC_MSG_RESULT([[no]])]
+ )
+ ],[],[[
+#include <pthread.h>
+#ifdef HAVE_PTHREAD_NP_H
+#include <pthread_np.h>
+#endif
+ ]]
+ )
+ ])
+
+ LIBS="$SAVE_LIBS"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+])
+
+AS_IF([[test "x$enable_thread_names" != "xno"]],
+ [
+ AC_MSG_CHECKING([[whether to enable thread names]])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([], [[
+#ifdef MHD_NO_THREAD_NAMES
+#error Thread names are disabled.
+choke me
+#endif
+
+/* Keep in sync with mhd_threads.h */
+#if defined(MHD_USE_POSIX_THREADS) && (defined(HAVE_PTHREAD_ATTR_SETNAME_NP_NETBSD) || defined(HAVE_PTHREAD_ATTR_SETNAME_NP_IBMI) || \
+ defined(HAVE_PTHREAD_SETNAME_NP_GNU) || defined(HAVE_PTHREAD_SET_NAME_NP_FREEBSD) || defined(HAVE_PTHREAD_SETNAME_NP_DARWIN) || \
+ defined(HAVE_PTHREAD_SETNAME_NP_NETBSD) )
+(void) 0; /* no-op */
+#elif defined(MHD_USE_W32_THREADS) && defined(_MSC_FULL_VER)
+(void) 0; /* no-op */
+#else
+#error No thread name function is available.
+choke me
+#endif
+ ]])
+ ], [
+ enable_thread_names='yes'
+ ], [
+ AS_IF([[test "x$enable_thread_names" = "xyes"]],
+ [
+ AC_MSG_RESULT([[no]])
+ AC_MSG_ERROR([[thread names was explicitly requested, but thread name function is not available]])
+ ])
+ enable_thread_names='no'
+ ])
+ AC_MSG_RESULT([[$enable_thread_names]])
+ ])
+
+AS_IF([[test "x$enable_thread_names" = "xno"]],
+ [AC_DEFINE([[MHD_NO_THREAD_NAMES]], [[1]], [Define to 1 to disable setting name on generated threads])])
+
+AM_CONDITIONAL(HAVE_W32, [test "x$os_is_native_w32" = "xyes"])
+w32_shared_lib_exp=no
+AS_IF([test "x$enable_shared" = "xyes" && test "x$os_is_native_w32" = "xyes"],
+ [
+ AS_IF([test "x$ac_cv_use_ms_lib_tool" = "xyes" || test -n "$DLLTOOL"],
+ [
+ w32_shared_lib_exp=yes
+ use_expfile="no"
+ AS_VAR_IF([ac_cv_use_ms_lib_tool], ["yes"], [use_expfile="yes"],
+ [
+ AC_CACHE_CHECK([whether $DLLTOOL supports export file generation], [mhd_cv_dlltool_expfile],
+ [
+ AS_IF([AC_RUN_LOG([$DLLTOOL -e conftest.exp >&2 ])],
+ [
+ AS_IF([test -f conftest.exp], [mhd_cv_dlltool_expfile="yes"], [mhd_cv_dlltool_expfile="no"])
+ ], [mhd_cv_dlltool_expfile="no"]
+ )
+ rm -f conftest.exp
+ ]
+ )
+ use_expfile="${mhd_cv_dlltool_expfile}"
+ ]
+ )
+ ],
+ [
+ AC_MSG_WARN([[GNU dlltool or MS lib.exe is required for creating shared library export on W32]])
+ AC_MSG_WARN([[Export library libmicrohttpd.lib will not be created]])
+ ]
+ )
+ ]
+)
+AM_CONDITIONAL([W32_SHARED_LIB_EXP], [test "x$w32_shared_lib_exp" = "xyes"])
+AM_CONDITIONAL([USE_MS_LIB_TOOL], [test "x$ac_cv_use_ms_lib_tool" = "xyes"])
+AM_CONDITIONAL([USE_EXPORT_FILE], [test "x$use_expfile" = "xyes"])
+
+dnl gethostbyname() is not really needed
+dnl AC_SEARCH_LIBS([gethostbyname], [nsl])
+MHD_FIND_LIB([socket],
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+ ]],
+ [(void)socket(0, 0, 0);],
+ [socket ws2_32 xnet],
+ [
+ AS_VAR_IF([[mhd_cv_find_lib_socket]],[["none required"]], [],
+ [
+ MHD_LIBDEPS_PKGCFG="${mhd_cv_find_lib_socket} $MHD_LIBDEPS_PKGCFG"
+ ]
+ )
+ ],
+ [AC_MSG_ERROR([[cannot find header or library required for function socket()]])]
+)
+
+MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER([AC_DEFINE([HAVE_LISTEN_SHUTDOWN],[1],[can use shutdown on listen sockets])])
+AM_CONDITIONAL([HAVE_LISTEN_SHUTDOWN], [test "x$mhd_cv_host_shtdwn_trgr_select" = "xyes"])
+
+AC_CACHE_CHECK([fo][r system default FD_SETSIZE value],[mhd_cv_sys_fd_setsize_value],
+ [
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS} -UFD_SETSIZE"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS} -UFD_SETSIZE"
+ AC_COMPUTE_INT([mhd_cv_sys_fd_setsize_value],[FD_SETSIZE],dnl
+ [[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+ ]], [mhd_cv_sys_fd_setsize_value="unknown"]
+ )
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ AS_IF([test "x${mhd_cv_sys_fd_setsize_value}" != "xunknown" && \
+ test "${mhd_cv_sys_fd_setsize_value}" -eq "0" \
+ ], [mhd_cv_sys_fd_setsize_value="unknown"]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_sys_fd_setsize_value],["unknown"],[:],
+ [
+ AC_DEFINE_UNQUOTED([MHD_SYS_FD_SETSIZE_],[${mhd_cv_sys_fd_setsize_value}],
+ [Define to system default value of FD_SETSIZE macro]
+ )
+ ]
+)
+AM_CONDITIONAL([NEED_SYS_FD_SET_SIZE_VALUE],[test "x${mhd_cv_sys_fd_setsize_value}" = "xunknown"])
+
+AC_CACHE_CHECK([fo][r current FD_SETSIZE value],[mhd_cv_fd_setsize_value],
+ [
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ AS_IF([test "x${cross_compiling}" != "xno" && test "x${mhd_cv_sys_fd_setsize_value}" != "xunknown"],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#define DETECTED_FD_SETZIE_VALUE ${mhd_cv_sys_fd_setsize_value}
+
+#if (FD_SETSIZE) != (DETECTED_FD_SETZIE_VALUE)
+#error The current default FD_SETSIZE value is different from ${mhd_cv_sys_fd_setsize_value}
+choke me here now
+#endif /* (FD_SETSIZE) != (DETECTED_FD_SETZIE_VALUE) */
+
+#if (FD_SETSIZE) != (${mhd_cv_sys_fd_setsize_value})
+#error The current default FD_SETSIZE value is different from ${mhd_cv_sys_fd_setsize_value}
+choke me here now
+#endif /* (FD_SETSIZE) != (${mhd_cv_sys_fd_setsize_value}) */
+ ]],[]
+ )
+ ],
+ [mhd_cv_fd_setsize_value="${mhd_cv_sys_fd_setsize_value}"]
+ )
+ ]
+ )
+ AS_VAR_SET_IF([mhd_cv_fd_setsize_value],[:],
+ [
+ AC_COMPUTE_INT([mhd_cv_fd_setsize_value],[FD_SETSIZE],dnl
+ [[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+ ]], [mhd_cv_fd_setsize_value="unknown"]
+ )
+ ]
+ )
+ AS_IF([test "x${mhd_cv_fd_setsize_value}" != "xunknown" && \
+ test "${mhd_cv_fd_setsize_value}" -eq "0"],
+ [mhd_cv_fd_setsize_value="unknown"]
+ )
+ ]
+)
+
+
+AC_CACHE_CHECK([whether FD_SETSIZE is overridable],[mhd_cv_fd_setsize_overridable],
+ [
+ AS_VAR_IF([mhd_cv_fd_setsize_value],["unknown"],
+ [
+ AS_VAR_IF([mhd_cv_sys_fd_setsize_value],["unknown"],
+ [
+ # Assume the most popular FD_SETSIZE value
+ base_fd_setsize=1024
+ ],
+ [base_fd_setsize="${mhd_cv_sys_fd_setsize_value}"]
+ )
+ base_min_fd_setsize="${base_fd_setsize}"
+ ],
+ [
+ AS_VAR_IF([mhd_cv_sys_fd_setsize_value],["unknown"],
+ [
+ base_fd_setsize="${mhd_cv_fd_setsize_value}"
+ base_min_fd_setsize="${base_fd_setsize}"
+ ],
+ [
+ AS_IF([test "${mhd_cv_fd_setsize_value}" -ge "${mhd_cv_sys_fd_setsize_value}"],
+ [
+ base_fd_setsize="${mhd_cv_fd_setsize_value}"
+ base_min_fd_setsize="${mhd_cv_sys_fd_setsize_value}"
+ ],
+ [
+ base_fd_setsize="${mhd_cv_sys_fd_setsize_value}"
+ base_min_fd_setsize="${mhd_cv_fd_setsize_value}"
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ # Use two times larger FD_SETSIZE value for test
+ AS_VAR_ARITH([test_fd_setsize],[${base_fd_setsize} '+' ${base_fd_setsize}])
+ AS_IF([test "${test_fd_setsize}" -lt "128"],[test_fd_setsize=128])
+ test_type_fd_setsize="larger"
+
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+
+ _AS_ECHO_LOG([testing whether FD_SETSIZE test value (${test_fd_setsize}) is suitable for 'int' type])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+ [[
+ static int test_arr1[(((long long)${test_fd_setsize}) != ((int)${test_fd_setsize})) ? -1 : 1];
+ static int test_arr2[(0 > ((int)${test_fd_setsize})) ? -1 : 1];
+ test_arr1[0] = 0;
+ test_arr2[0] = 0;
+ i][f (test_arr1[0] != test_arr2[0]) return 1;
+ ]]
+ )
+ ],[],
+ [
+ _AS_ECHO_LOG([The selected test FD_SETSIZE value (${test_fd_setsize}) is too large for 'int' type])
+ AS_VAR_ARITH([test_fd_setsize],[${base_min_fd_setsize} '/' '2'])
+ test_type_fd_setsize="smaller"
+ ]
+ )
+
+ _AS_ECHO_LOG([will try ${test_fd_setsize} as FD_SETSIZE value])
+
+ AS_IF([test "x${cross_compiling}" = "xno" && test "x${test_type_fd_setsize}" = "xlarger"],
+ [
+ _AS_ECHO_LOG([will try ${test_fd_setsize} as FD_SETSIZE value with run test])
+ AC_RUN_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+#ifdef FD_SETSIZE
+#undef FD_SETSIZE
+#endif /* FD_SETSIZE */
+
+#define FD_SETSIZE ${test_fd_setsize}
+#define MY_TEST_FD_SETSIZE ${test_fd_setsize}
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#define MHD_TEST_SOCKET_TYPE SOCKET
+#else
+#define MHD_TEST_SOCKET_TYPE int
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+
+/* Test fo][r mismatch by macro check */
+#if (FD_SETSIZE) != (MY_TEST_FD_SETSIZE)
+#error System headers ignore custom FD_SETSIZE value, FD_SETSIZE is NOT ${test_fd_setsize}
+choke me here now;
+#endif /* (FD_SETSIZE) != (MY_TEST_FD_SETSIZE) */
+
+/* Additional test fo][r mismatch by macro check */
+#if (FD_SETSIZE) != (${test_fd_setsize})
+#error System headers ignore custom FD_SETSIZE value, FD_SETSIZE is NOT ${test_fd_setsize}
+choke me here now;
+#endif /* (FD_SETSIZE) != (${test_fd_setsize}) */
+
+static unsigned long var_fd_setsize_value = FD_SETSIZE;
+static unsigned long var_my_test_fd_setsize_value = MY_TEST_FD_SETSIZE;
+
+int main(void)
+{
+ fd_set fds_num_one_copy;
+ fd_set fds_num_three_copy;
+ fd_set test_fdsets[6];
+ int i;
+ int ret = 0;
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+ WSADATA wsa_data;
+
+ if (0 != WSAStartup(MAKEWORD(2, 2), &wsa_data))
+ return 21;
+ if (MAKEWORD(2, 2) != wsa_data.wVersion)
+ {
+ WSACleanup();
+ return 22;
+ }
+#endif /* _WIN32 && ! __CYGWIN__ */
+
+ /* Init with zeros to make sure that slack areas are equal */
+ memset(test_fdsets, 0, sizeof(test_fdsets));
+
+ /* Correctly init fd_sets */
+ for (i = 0; i < 6; ++i)
+ FD_ZERO(test_fdsets + i);
+
+ /* Make copies of zero-inited fd_sets */
+ memcpy(&fds_num_one_copy, test_fdsets + 1, sizeof(fd_set));
+ memcpy(&fds_num_three_copy, test_fdsets + 3, sizeof(fd_set));
+
+ if (var_fd_setsize_value != var_my_test_fd_setsize_value)
+ {
+ fprintf (stderr, "System headers redefined FD_SETSIZE to another value (%lu).\n",
+ (unsigned long) FD_SETSIZE);
+ ret = 2;
+ }
+ else
+ {
+ /* Set (almost) all FDs in test_fdset[2] */
+ for (i = 1; i < FD_SETSIZE; ++i)
+ FD_SET((MHD_TEST_SOCKET_TYPE)i, test_fdsets + 2);
+
+ if (! FD_ISSET((MHD_TEST_SOCKET_TYPE)1, test_fdsets + 2))
+ {
+ fprintf (stderr, "FD number one in original fd_set is unset, while should be set.\n");
+ ret |= 3;
+ }
+ if (! FD_ISSET((MHD_TEST_SOCKET_TYPE)(FD_SETSIZE - 1), test_fdsets + 2))
+ {
+ fprintf (stderr, "FD number %lu in original fd_set is unset, while should be set.\n",
+ (unsigned long) FD_SETSIZE);
+ ret |= 3;
+ }
+
+ if (FD_ISSET((MHD_TEST_SOCKET_TYPE)1, test_fdsets + 1))
+ {
+ fprintf (stderr, "FD number one in the first fd_set is unset, while should be set.\n");
+ ret |= 4;
+ }
+ if (FD_ISSET((MHD_TEST_SOCKET_TYPE)(FD_SETSIZE - 1), test_fdsets + 1))
+ {
+ fprintf (stderr, "FD number %lu in the first fd_set is unset, while should be set.\n",
+ (unsigned long) FD_SETSIZE);
+ ret |= 4;
+ }
+ if (0 != memcmp (&fds_num_one_copy, test_fdsets + 1, sizeof(fd_set)))
+ {
+ fprintf (stderr, "The first fd_set has been altered.\n");
+ ret |= 4;
+ }
+
+ if (FD_ISSET((MHD_TEST_SOCKET_TYPE)1, test_fdsets + 3))
+ {
+ fprintf (stderr, "FD number one in the third fd_set is unset, while should be set.\n");
+ ret |= 8;
+ }
+ if (FD_ISSET((MHD_TEST_SOCKET_TYPE)(FD_SETSIZE - 1), test_fdsets + 3))
+ {
+ fprintf (stderr, "FD number %lu in the third fd_set is unset, while should be set.\n",
+ (unsigned long) FD_SETSIZE);
+ ret |= 8;
+ }
+ if (0 != memcmp (&fds_num_three_copy, test_fdsets + 3, sizeof(fd_set)))
+ {
+ fprintf (stderr, "The third fd_set has been altered.\n");
+ ret |= 8;
+ }
+ }
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+ WSACleanup();
+#endif /* _WIN32 && ! __CYGWIN__ */
+ return ret;
+}
+ ]]
+ )
+ ],
+ [mhd_cv_fd_setsize_overridable="yes"],
+ [mhd_cv_fd_setsize_overridable="no"],
+ [[# Not used when cross-compiling ]]
+ )
+ ],
+ [
+ _AS_ECHO_LOG([will try ${test_fd_setsize} as FD_SETSIZE with simple compile test])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+#ifdef FD_SETSIZE
+#undef FD_SETSIZE
+#endif /* FD_SETSIZE */
+
+#define FD_SETSIZE ${test_fd_setsize}
+#define MY_TEST_FD_SETSIZE ${test_fd_setsize}
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+/* Test fo][r mismatch by macro check */
+#if (FD_SETSIZE) != (MY_TEST_FD_SETSIZE)
+#error System headers ignore custom FD_SETSIZE value, FD_SETSIZE is NOT ${test_fd_setsize}
+choke me here now
+#endif /* (FD_SETSIZE) != (MY_TEST_FD_SETSIZE) */
+
+/* Additional test fo][r mismatch by macro check */
+#if (FD_SETSIZE) != (${test_fd_setsize})
+#error System headers ignore custom FD_SETSIZE value, FD_SETSIZE is NOT ${test_fd_setsize}
+choke me here now
+#endif /* (FD_SETSIZE) != (${test_fd_setsize}) */
+ ]],[]
+ )
+ ],
+ [
+ _AS_ECHO_LOG([comple test succeed, will check whether another FD_SETSIZE value changes the size of 'fd_set'])
+
+ # Check current size of fd_set
+ _AS_ECHO_LOG([find the sizeof(fd_setsize) with current default (${mhd_cv_fd_setsize_value}) FD_SETSIZE value])
+ AC_COMPUTE_INT([sizeof_cur_fd_set],[sizeof(fd_set)],dnl
+ [[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+ ]], [sizeof_cur_fd_set="unknown"]
+ )
+ _AS_ECHO_LOG([the sizeof(fd_setsize) with current default (${mhd_cv_fd_setsize_value}) FD_SETSIZE value is ${sizeof_cur_fd_set}])
+
+ # Check the size of fd_set with redefined FD_SETSIZE
+ _AS_ECHO_LOG([find the sizeof(fd_setsize) with redefined (${test_fd_setsize}) FD_SETSIZE value])
+ AC_COMPUTE_INT([sizeof_mod_fd_set],[sizeof(fd_set)],dnl
+ [[
+#ifdef FD_SETSIZE
+#undef FD_SETSIZE
+#endif /* FD_SETSIZE */
+
+#define FD_SETSIZE ${test_fd_setsize}
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+ ]], [sizeof_mod_fd_set="unknown"]
+ )
+ _AS_ECHO_LOG([the sizeof(fd_setsize) with redefined (${test_fd_setsize}) FD_SETSIZE value is ${sizeof_mod_fd_set}])
+ _AS_ECHO_LOG([detected sizes of 'fd_set': '${sizeof_cur_fd_set}' (by default), '${sizeof_mod_fd_set}' with modified FD_SETSIZE])
+ AS_IF([test "x${sizeof_cur_fd_set}" != "x${sizeof_mod_fd_set}"],
+ [mhd_cv_fd_setsize_overridable="yes"],
+ [mhd_cv_fd_setsize_overridable="no"]
+ )
+ AS_UNSET([sizeof_mod_fd_set])
+ AS_UNSET([sizeof_cur_fd_set])
+ ],
+ [mhd_cv_fd_setsize_overridable="no"]
+ )
+ ]
+ )
+ AS_UNSET([test_type_fd_setsize])
+ AS_UNSET([test_fd_setsize])
+ AS_UNSET([base_min_fd_setsize])
+ AS_UNSET([base_fd_setsize])
+ ]
+)
+
+AS_VAR_IF([mhd_cv_fd_setsize_overridable],["no"],
+ [
+ AS_VAR_IF([os_is_native_w32],["yes"],
+ [AC_MSG_ERROR([Non-overridable FD_SETSIZE detected for native W32 build. FD_SETSIZE is overridable on W32.])]
+ )
+ AS_IF([test "x${mhd_cv_fd_setsize_value}" != "xunknown" && test "x${mhd_cv_sys_fd_setsize_value}" != "xunknown" && test "${mhd_cv_fd_setsize_value}" -ne "${mhd_cv_sys_fd_setsize_value}"],
+ [AC_MSG_WARN([Detected non-overridable FD_SETSIZE, but the toolchain uses FD_SETSIZE (${mhd_cv_fd_setsize_value}) different from system default (${mhd_cv_sys_fd_setsize_value})])]
+ )
+ ],
+ [AC_DEFINE([HAS_FD_SETSIZE_OVERRIDABLE],[1],[Define to 1 i][f your system allow overriding the value of FD_SETSIZE macro])]
+)
+
+AC_CACHE_CHECK([whether socket value is a signed type],[mhd_cv_socket_signed],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#if defined(_WIN32) && ! defined(__CYGWIN__)
+#include <winsock2.h>
+#endif
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+
+/* Keep in sync with microhttpd.h */
+#if ! defined(_WIN32) || defined(_SYS_TYPES_FD_SET)
+typedef int MHD_socket;
+#else /* defined(_WIN32) && ! defined(_SYS_TYPES_FD_SET) */
+typedef SOCKET MHD_socket;
+#endif /* defined(_WIN32) && ! defined(_SYS_TYPES_FD_SET) */
+
+int main(void)
+{
+ int test_arr[2 - 5*(!!(0 < ((MHD_socket)-1)))];
+ test_arr[1] = 0;
+ return test_arr[1];
+}
+ ]]
+ )
+ ],
+ [mhd_cv_socket_signed="yes"],
+ [mhd_cv_socket_signed="no"]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_socket_signed],["yes"],
+ [AC_DEFINE([HAS_SIGNED_SOCKET],[1],[Define to 1 i][f your socket type is signed])]
+)
+
+MHD_CHECK_FUNC([writev],
+ [[#include <sys/uio.h>]],
+ [[
+ struct iovec iov[2];
+ char some_str[4] = "OK\n";
+ iov[0].iov_base = (void *) some_str;
+ iov[0].iov_len = 3;
+ i][f (0 > writev(1, iov, 1))
+ return 2;
+ ]]
+)
+MHD_FIND_LIB([sendmsg],
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_SOCKLIB_H
+#include <sockLib.h>
+#endif
+#ifdef HAVE_SYS_UIO_H
+#include <sys/uio.h>
+#endif
+ ]],
+ [[
+ struct msghdr msg;
+ struct iovec iov;
+ unsigned int i;
+ char some_str[5] = "test";
+
+ iov.iov_base = (void*)some_str;
+ iov.iov_len = 4;
+
+ for (i = 0; i < (unsigned int) sizeof(msg); i++)
+ {
+ *(((unsigned char *)&msg) + i) = 0;
+ }
+ msg.msg_iov = &iov;
+ msg.msg_iovlen = 1;
+
+ i][f (0 > sendmsg(1, &msg, 0))
+ return -1;
+ ]],
+ [socket],
+ [
+ AC_DEFINE([HAVE_SENDMSG],[1],[Define to '1' if your have sendmsg() function])
+ AS_VAR_IF([[mhd_cv_find_lib_sendmsg]],[["none required"]], [],
+ [
+ MHD_LIBDEPS_PKGCFG="${mhd_cv_find_lib_sendmsg} $MHD_LIBDEPS_PKGCFG"
+ ]
+ )
+ ],[],
+ [MHD_LIBDEPS]
+)
+
+AC_C_BIGENDIAN
+AC_C_VARARRAYS
+
+AC_CACHE_CHECK([[whether __func__ magic-macro is available]],
+ [[mhd_cv_macro___func___avail]], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char *funcname = __func__ ; if (NULL == funcname) return 1;]])],
+ [[mhd_cv_macro___func___avail="yes"]],[[mhd_cv_macro___func___avail="no"]])
+])
+AS_VAR_IF([mhd_cv_macro___func___avail], ["yes"],
+ [AC_DEFINE([HAVE___FUNC__], [1], [Define to 1 if your compiler supports __func__ magic-macro.])],
+ [
+ AC_CACHE_CHECK([[whether __FUNCTION__ magic-macro is available]],
+ [[mhd_cv_macro___function___avail]], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char *funcname = __FUNCTION__ ; if (NULL == funcname) return 1;]])],
+ [[mhd_cv_macro___function___avail="yes"]],[[mhd_cv_macro___function___avail="no"]])
+ ])
+ AS_VAR_IF([mhd_cv_macro___function___avail], ["yes"],
+ [AC_DEFINE([HAVE___FUNCTION__], [1], [Define to 1 if your compiler supports __FUNCTION__ magic-macro.])],
+ [
+ AC_CACHE_CHECK([[whether __PRETTY_FUNCTION__ magic-macro is available]],
+ [[mhd_cv_macro___pretty_function___avail]], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>]],[[const char *funcname = __PRETTY_FUNCTION__ ; if (NULL == funcname) return 1;]])],
+ [[mhd_cv_macro___pretty_function___avail="yes"]],[[mhd_cv_macro___pretty_function___avail="no"]])
+ ])
+ AS_VAR_IF([mhd_cv_macro___pretty_function___avail], ["yes"],
+ [AC_DEFINE([HAVE___PRETTY_FUNCTION__], [1], [Define to 1 if your compiler supports __PRETTY_FUNCTION__ magic-macro.])],
+ )
+ ]
+ )
+ ]
+)
+AC_CACHE_CHECK([[whether __builtin_bswap32() is available]],
+ [[mhd_cv_func___builtin_bswap32_avail]], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<stdint.h>]], [[uint32_t a = 1; uint32_t b = __builtin_bswap32(a); a = b; (void) a;]])],
+ [[mhd_cv_func___builtin_bswap32_avail="yes"]],[[mhd_cv_func___builtin_bswap32_avail="no"]])
+])
+AS_IF([[test "x$mhd_cv_func___builtin_bswap32_avail" = "xyes"]],
+ [AC_DEFINE([[MHD_HAVE___BUILTIN_BSWAP32]], [[1]], [Define to 1 if you have __builtin_bswap32() builtin function])])
+AC_CACHE_CHECK([[whether __builtin_bswap64() is available]],
+ [[mhd_cv_func___builtin_bswap64_avail]], [dnl
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include<stdint.h>]], [[uint64_t a = 1; uint64_t b = __builtin_bswap64(a); a = b; (void) a;]])],
+ [[mhd_cv_func___builtin_bswap64_avail="yes"]], [[mhd_cv_func___builtin_bswap64_avail="no"]])
+])
+AS_IF([[test "x$mhd_cv_func___builtin_bswap64_avail" = "xyes"]],
+ [AC_DEFINE([[MHD_HAVE___BUILTIN_BSWAP64]], [[1]], [Define to 1 if you have __builtin_bswap64() builtin function])])
+
+AC_CHECK_PROG([HAVE_CURL_BINARY],[curl],[yes],[no])
+AM_CONDITIONAL([HAVE_CURL_BINARY],[test "x$HAVE_CURL_BINARY" = "xyes"])
+AC_CHECK_PROG([HAVE_MAKEINFO_BINARY],[makeinfo],[yes],[no])
+AM_CONDITIONAL([HAVE_MAKEINFO_BINARY],[test "x$HAVE_MAKEINFO_BINARY" = "xyes"])
+AM_CONDITIONAL(W32_STATIC_LIB, [test "x$os_is_native_w32" = "xyes" && test "x$enable_static" = "xyes"])
+
+
+AC_ARG_ENABLE([[doc]],
+ [AS_HELP_STRING([[--disable-doc]], [do not build any documentation])], ,
+ [enable_doc=yes])
+test "x$enable_doc" = "xno" || enable_doc=yes
+AM_CONDITIONAL([BUILD_DOC], [test "x$enable_doc" = "xyes"])
+
+AC_ARG_ENABLE([[examples]],
+ [AS_HELP_STRING([[--disable-examples]], [do not build any examples])], ,
+ [enable_examples=yes])
+test "x$enable_examples" = "xno" || enable_examples=yes
+AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" = "xyes"])
+
+AC_ARG_ENABLE([[tools]],
+ [AS_HELP_STRING([[--disable-tools]], [do not build testing and demo tools])], ,
+ [enable_tools=yes])
+test "x$enable_tools" = "xyes" || enable_tools=no
+AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
+
+AC_ARG_ENABLE([[heavy-tests]],
+ [AS_HELP_STRING([[--enable-heavy-tests[=SCOPE]]], [use SCOPE of heavy tests in test-suite. WARNING:]
+ [a dedicated host with minimal number of background processes and no network]
+ [activity is recommended to enable. (basic, full)])], [],
+ [enable_heavy_tests=no])
+use_heavy_tests="no"
+use_vheavy_tests="no"
+use_heavy_tests_MSG="no"
+AS_CASE([${enable_heavy_tests}],
+ [yes|basic],
+ [
+ enable_heavy_tests="basic"
+ use_heavy_tests="yes"
+ use_vheavy_tests="no"
+ use_heavy_tests_MSG="yes, basic heavy tests (a dedicated host is recommended)"
+ ],
+ [all|full],
+ [
+ enable_heavy_tests="full"
+ use_heavy_tests="yes"
+ use_vheavy_tests="yes"
+ use_heavy_tests_MSG="yes, full set of heavy tests (a dedicated host is recommended)"
+ ],
+ [no],
+ [
+ use_heavy_tests="no"
+ use_vheavy_tests="no"
+ use_heavy_tests_MSG="no"
+ ],
+ [AC_MSG_ERROR([[Unknown parameter value: --enable-heavy-tests=${enable_heavy_tests}]])]
+)
+AS_VAR_IF([use_heavy_tests], ["yes"],
+ [
+ HEAVY_TESTS_NOTPARALLEL='.NOTPARALLEL:'
+ AC_DEFINE([_MHD_HEAVY_TESTS], [1], [Define to 1 to enable "heavy" test paths.])
+ AS_VAR_IF([use_vheavy_tests], ["yes"],
+ [AC_DEFINE([_MHD_VHEAVY_TESTS], [1], [Define to 1 to enable "very heavy" test paths.])]
+ )
+ ],
+ [
+ HEAVY_TESTS_NOTPARALLEL=" "
+ ]
+)
+AM_CONDITIONAL([HEAVY_TESTS],[test "x$use_heavy_tests" = "xyes"])
+AM_CONDITIONAL([VHEAVY_TESTS],[test "x$use_vheavy_tests" = "xyes"])
+AM_CONDITIONAL([TESTS_STRESS_OS],[false])
+
+AC_ARG_ENABLE([[poll]],
+ [AS_HELP_STRING([[--enable-poll[=ARG]]], [enable poll support (yes, no, auto) [auto]])],
+ [enable_poll=${enableval}],
+ [enable_poll='auto']
+ )
+
+AS_IF([test "$enable_poll" != "no"],
+ [
+ AS_IF([test "$os_is_native_w32" != "yes"],
+ [
+ AC_CHECK_HEADERS([poll.h],
+ [
+ MHD_CHECK_FUNC([poll],
+ [[
+#include <poll.h>
+ ]],
+ [[
+ struct pollfd fds[2];
+
+ fds[0].fd = 0;
+ fds[0].events = POLLIN;
+ if (0 > poll(fds, 1, 0))
+ return 2;
+ ]],
+ [have_poll='yes'], [have_poll='no']
+ )
+ ], [], [AC_INCLUDES_DEFAULT]
+ )
+ ],
+ [
+ MHD_CHECK_FUNC([WSAPoll],
+ [[
+#include <winsock2.h>
+ ]],
+ [[
+ WSAPOLLFD fda[2];
+ WSAPoll(fda, 2, 0);
+ ]],
+ [
+ have_poll='yes'
+ AC_DEFINE([HAVE_POLL],[1])
+ ],
+ [have_poll='no']
+ )
+ ]
+ )
+ AS_IF([test "$enable_poll" = "yes" && test "$have_poll" != "yes"],
+ [AC_MSG_ERROR([[Support for poll was explicitly requested but cannot be enabled on this platform.]])])
+ enable_poll="$have_poll"
+ ]
+)
+
+AC_ARG_ENABLE([[epoll]],
+ [AS_HELP_STRING([[--enable-epoll[=ARG]]], [enable epoll support (yes, no, auto) [auto]])],
+ [enable_epoll=${enableval}],
+ [enable_epoll='auto']
+ )
+
+AS_IF([test "$enable_epoll" != "no"],
+ [
+ AX_HAVE_EPOLL
+ AS_IF([test "${ax_cv_have_epoll}" = "yes"],
+ [
+ AC_DEFINE([[EPOLL_SUPPORT]],[[1]],[Define to 1 to enable epoll support])
+ enable_epoll='yes'
+ ],
+ [
+ AS_IF([test "$enable_epoll" = "yes"],
+ [AC_MSG_ERROR([[Support for epoll was explicitly requested but cannot be enabled on this platform.]])]
+ )
+ enable_epoll='no'
+ ]
+ )
+ ]
+)
+
+AM_CONDITIONAL([MHD_HAVE_EPOLL], [[test "x$enable_epoll" = xyes]])
+
+AS_IF([test "x$enable_epoll" = "xyes"],
+ [
+ MHD_CHECK_FUNC([epoll_create1],
+ [[
+#include <sys/epoll.h>
+ ]],
+ [[
+ i][f (0 > epoll_create1(EPOLL_CLOEXEC))
+ return 3;
+ ]]
+ )
+ ]
+)
+
+AC_CACHE_CHECK([for supported 'noreturn' keyword], [mhd_cv_decl_noreturn],
+ [
+ mhd_cv_decl_noreturn="none"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS} ${errattr_CFLAGS}"
+ for decl_noret in '_Noreturn' '__attribute__((__noreturn__))' '__declspec(noreturn)'
+ do
+ AC_LINK_IFELSE([AC_LANG_SOURCE(
+ [[
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+${decl_noret} static void myexitfunc(int code)
+{
+#ifdef HAVE_STDLIB_H
+ exit (code);
+#else
+ (void)code;
+#endif
+}
+
+int main (int argc, char *const *argv)
+{
+ (void) argv;
+ if (argc > 2)
+ myexitfunc (2);
+ return 0;
+}
+ ]]
+ )], [mhd_cv_decl_noreturn="${decl_noret}"]
+ )
+ AS_IF([test "x${mhd_cv_decl_noreturn}" != "xnone"], [break])
+ done
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ]
+)
+AS_VAR_IF([mhd_cv_decl_noreturn], ["none"],
+ [AC_DEFINE([_MHD_NORETURN], [], [Define to supported 'noreturn' function declaration])],
+ [AC_DEFINE_UNQUOTED([_MHD_NORETURN], [${mhd_cv_decl_noreturn}], [Define to supported 'noreturn' function declaration])]
+)
+
+# Check for types sizes
+# Types sizes are used as an indirect indication of maximum allowed values for types
+# which is used to exclude by preprocessor some compiler checks for values clips
+# Assuming no staffing or uniform staffing for integer types
+AC_CACHE_CHECK([size of tv_sec member of struct timeval], [mhd_cv_size_timeval_tv_sec],
+ [
+ AC_COMPUTE_INT([mhd_cv_size_timeval_tv_sec], [((long int)sizeof(test_var.tv_sec))],
+ [[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif /* HAVE_SYS_TIME_H */
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif /* HAVE_TIME_H */
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+static struct timeval test_var;
+ ]],
+ [
+ # The size is used only to exclude additional checks/comparison in code
+ # to avoid compiler warnings. With larger size MHD code will use
+ # additional checks which ensure that value will fit but it may produce
+ # a harmless compiler warning.
+ AC_MSG_WARN([The size cannot be determined, assuming 8.])
+ mhd_cv_size_timeval_tv_sec=8
+ ]
+ )
+ ]
+)
+AC_DEFINE_UNQUOTED([SIZEOF_STRUCT_TIMEVAL_TV_SEC], [$mhd_cv_size_timeval_tv_sec],
+ [The size of `tv_sec' member of `struct timeval', as computed by sizeof])
+AC_CHECK_SIZEOF([int64_t], [], [[#include <stdint.h>]])
+AC_CHECK_SIZEOF([uint64_t], [], [[#include <stdint.h>]])
+AC_CHECK_SIZEOF([int], [], [[#include <stdint.h>]])
+AC_CHECK_SIZEOF([unsigned int], [], [[#include <stdint.h>]])
+AC_CHECK_SIZEOF([unsigned long long], [], [[#include <stdint.h>]])
+AC_CHECK_SIZEOF([size_t], [],
+ [[
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif /* HAVE_STDDEF_H */
+#include <stdio.h>
+ ]]
+)
+
+AC_CHECK_HEADERS([dlfcn.h],[have_tlsplugin=yes],[have_tlsplugin=no], [AC_INCLUDES_DEFAULT])
+AM_CONDITIONAL([MHD_HAVE_TLS_PLUGIN], [[test "x$have_tlsplugin" = xyes]])
+
+AC_CHECK_HEADERS([zlib.h],[have_zlib=yes],[have_zlib=no], [AC_INCLUDES_DEFAULT])
+AM_CONDITIONAL([HAVE_ZLIB], [[test "x$have_zlib" = xyes]])
+
+# Check for generic functions
+MHD_CHECK_FUNC([random],
+ [
+AC_INCLUDES_DEFAULT
+[#include <stdlib.h>
+ ]],
+ [[long int r = random(); (void)r;]],
+ [],
+ [
+ MHD_CHECK_FUNC([rand],
+ [
+AC_INCLUDES_DEFAULT
+[#include <stdlib.h>
+ ]],
+ [[int r = rand(); (void)r;]],
+ )
+ ]
+)
+
+AC_CHECK_MEMBERS([struct sockaddr.sa_len, struct sockaddr_storage.ss_len,
+ struct sockaddr_in.sin_len, struct sockaddr_in6.sin6_len],
+ [], [],
+ [
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+ ])
+
+MHD_CHECK_LINK_RUN([[f][or working getsockname()]],[[mhd_cv_getsockname_usable]],
+ [[mhd_cv_getsockname_usable='assuming yes']],
+ [
+ AC_LANG_SOURCE(
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+
+
+static void zr_mem(void *ptr, socklen_t size)
+{ char *mem = ptr; while(size--) {mem[0] = 0; mem++;} }
+
+int main(void)
+{
+ const socklen_t c_addr_size = (socklen_t)sizeof(struct sockaddr_in);
+ struct sockaddr_in sa;
+ socklen_t addr_size;
+ int ret = 1;
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ int sckt;
+ const int invld_sckt = -1;
+#else
+ SOCKET sckt;
+ const SOCKET invld_sckt = INVALID_SOCKET;
+ WSADATA wsa_data;
+
+ if (0 != WSAStartup(MAKEWORD(2, 2), &wsa_data) || MAKEWORD(2, 2) != wsa_data.wVersion)
+ return 20;
+#endif
+
+ sckt = socket (PF_INET, SOCK_STREAM, 0);
+ if (invld_sckt != sckt)
+ {
+ zr_mem(&sa, c_addr_size);
+ sa.sin_family = AF_INET;
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
+ sa.sin_len = c_addr_size;
+#endif
+ if (0 == bind (sckt, (struct sockaddr *)&sa, c_addr_size))
+ {
+ if (0 == listen (sckt, 1))
+ {
+ addr_size = c_addr_size;
+ if (0 == getsockname (sckt, (struct sockaddr *)&sa, &addr_size))
+ {
+ if (c_addr_size >= addr_size)
+ {
+ if (0 != ntohs(sa.sin_port))
+ { ret = 0;
+ } else ret = 7;
+ } else ret = 6;
+ } else ret = 5;
+ } else ret = 4;
+ } else ret = 3;
+ } else ret = 2;
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ close (sckt);
+#else
+ closesocket (sckt);
+ WSACleanup();
+#endif
+ return ret;
+}
+ ]]
+ )
+ ],
+ [AC_DEFINE([[MHD_USE_GETSOCKNAME]], [[1]], [Define if you have usable `getsockname' function.])]
+)
+
+AC_CACHE_CHECK([for usable PAGESIZE macro], [mhd_cv_macro_pagesize_usable],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifndef PAGESIZE
+#error No PAGESIZE macro defined
+choke me now
+#endif
+ ]],
+ [[
+ long pgsz = PAGESIZE + 0;
+ if (1 > pgsz) return 1;
+ ]]
+ )
+ ],
+ [[mhd_cv_macro_pagesize_usable="yes"]], [[mhd_cv_macro_pagesize_usable="no"]]
+ )
+ ]
+)
+AS_VAR_IF([[mhd_cv_macro_pagesize_usable]], [["yes"]],
+ [
+ AC_DEFINE([[MHD_USE_PAGESIZE_MACRO]],[[1]],[Define if you have usable PAGESIZE macro])
+ AC_CACHE_CHECK([whether PAGESIZE macro could be used for static init], [mhd_cv_macro_pagesize_usable_static],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifndef PAGESIZE
+#error No PAGESIZE macro defined
+choke me now
+#endif
+static long ac_pgsz = PAGESIZE + 0;
+ ]],
+ [[
+ if (1 > ac_pgsz) return 1;
+ ]]
+ )
+ ],
+ [[mhd_cv_macro_pagesize_usable_static="yes"]], [[mhd_cv_macro_pagesize_usable_static="no"]]
+ )
+ ]
+ )
+ AS_VAR_IF([[mhd_cv_macro_pagesize_usable_static]], [["yes"]],
+ [AC_DEFINE([[MHD_USE_PAGESIZE_MACRO_STATIC]],[[1]],[Define if you have PAGESIZE macro usable for static init])]
+ )
+ ],
+ [
+ AC_CACHE_CHECK([for usable PAGE_SIZE macro], [mhd_cv_macro_page_size_usable],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifndef PAGE_SIZE
+#error No PAGE_SIZE macro defined
+choke me now
+#endif
+ ]],
+ [[
+ long pgsz = PAGE_SIZE + 0;
+ if (1 > pgsz) return 1;
+ ]]
+ )
+ ],
+ [[mhd_cv_macro_page_size_usable="yes"]], [[mhd_cv_macro_page_size_usable="no"]]
+ )
+ ]
+ )
+ AS_VAR_IF([[mhd_cv_macro_page_size_usable]], [["yes"]],
+ [
+ AC_DEFINE([[MHD_USE_PAGE_SIZE_MACRO]],[[1]],[Define if you have usable PAGE_SIZE macro])
+ AC_CACHE_CHECK([whether PAGE_SIZE macro could be used for static init], [mhd_cv_macro_page_size_usable_static],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifndef PAGE_SIZE
+#error No PAGE_SIZE macro defined
+choke me now
+#endif
+static long ac_pgsz = PAGE_SIZE + 0;
+ ]],
+ [[
+ if (1 > ac_pgsz) return 1;
+ ]]
+ )
+ ],
+ [[mhd_cv_macro_page_size_usable_static="yes"]], [[mhd_cv_macro_page_size_usable_static="no"]]
+ )
+ ]
+ )
+ AS_VAR_IF([[mhd_cv_macro_page_size_usable_static]], [["yes"]],
+ [AC_DEFINE([[MHD_USE_PAGE_SIZE_MACRO_STATIC]],[[1]],[Define if you have PAGE_SIZE macro usable for static init])]
+ )
+ ]
+ )
+ ]
+)
+
+# Check for inter-thread signaling type
+AC_ARG_ENABLE([[itc]],
+ [AS_HELP_STRING([[--enable-itc=TYPE]], [use TYPE of inter-thread communication (pipe, socketpair, eventfd) [auto]])], [],
+ [[enable_itc='auto']]
+)
+
+AS_CASE([[$enable_itc]],
+ [[pipe]], [[:]],
+ [[socketpair]], [[:]],
+ [[eventfd]], [[:]],
+ [[auto]], [AS_VAR_IF([[os_is_windows]], [["yes"]], [[enable_itc='socketpair']])],
+ [[eventFD]], [[enable_itc='eventfd']],
+ [[socket]], [[enable_itc='socketpair']],
+ [[no]], [AC_MSG_ERROR([[inter-thread communication cannot be disabled]])],
+ [AC_MSG_ERROR([[unrecognized type "$enable_itc" of inter-thread communication specified by "--enable-itc=$enable_itc"]])]
+)
+AS_UNSET([[use_itc]])
+
+AS_IF([[test "x$enable_itc" = "xeventfd" || test "x$enable_itc" = "xauto"]],
+ [
+ MHD_CHECK_LINK_RUN([[f][or working eventfd(2)]],[[mhd_cv_eventfd_usable]],[[mhd_cv_eventfd_usable='assuming no']],
+ [
+ AC_LANG_SOURCE([[
+#include <sys/eventfd.h>
+#include <unistd.h>
+
+int main(void)
+{
+ unsigned char buf[8];
+ int ret;
+ int efd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+ if (0 > efd)
+ return 2;
+ ret = 0;
+ buf[3] = 1;
+ if (8 != write(efd, buf, 8))
+ ret = 3;
+ else
+ {
+ if (8 != read(efd, buf, 8))
+ ret = 4;
+ }
+ close(efd);
+ return ret;
+}
+ ]]
+ )
+ ],
+ [
+ use_itc='eventfd'
+ enable_itc="$use_itc"
+ AC_DEFINE([[_MHD_ITC_EVENTFD]], [[1]], [Define to use eventFD for inter-thread communication])
+ ],
+ [
+ AS_VAR_IF([[enable_itc]], [["eventfd"]], [AC_MSG_ERROR([[eventfd(2) is not usable, consider using other type of inter-thread communication]])])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_eventfd_usable],["assuming no"],
+ [AC_MSG_WARN([if you have 'eventfd' support enabled on your target system consider overriding test result by "mhd_cv_eventfd_usable=yes" configure parameter])]
+ )
+ ]
+)
+
+AS_IF([[test "x$enable_itc" = "xpipe" || test "x$enable_itc" = "xauto"]], [
+ AS_VAR_IF([[os_is_native_w32]], [["yes"]], [], [
+ AC_CACHE_CHECK([[whether pipe(3) is usable]], [[mhd_cv_pipe_usable]], [
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+AC_INCLUDES_DEFAULT
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+ ], [[
+ int arr[2];
+ int res;
+ res = pipe(arr);
+ if (res != 0) return 33;
+ close (arr[0]);
+ close (arr[1]);
+ ]])
+ ], [[mhd_cv_pipe_usable='yes']], [[mhd_cv_pipe_usable='no']])
+ ])
+ AS_VAR_IF([[mhd_cv_pipe_usable]], [["yes"]], [
+ use_itc='pipe'
+ enable_itc="$use_itc"
+ AC_DEFINE([[_MHD_ITC_PIPE]], [[1]], [Define to use pipe for inter-thread communication])
+ MHD_CHECK_LINK_RUN([[whether pipe2(2) is usable]],[[mhd_cv_pipe2_usable]],
+ [
+ # Cross-compiling
+ AS_CASE([${host_os}], [kfreebsd*-gnu], [[mhd_cv_pipe2_usable='assuming no']],
+ [[mhd_cv_pipe2_usable='assuming yes']])
+ ],
+ [
+ AC_LANG_PROGRAM([
+AC_INCLUDES_DEFAULT
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+ ], [[
+ int arr[2];
+ int res;
+ res = pipe2(arr, O_CLOEXEC | O_NONBLOCK);
+ if (res != 0) return 33;
+ close (arr[0]);
+ close (arr[1]);
+ ]]
+ )
+ ],
+ [AC_DEFINE([[HAVE_PIPE2_FUNC]], [[1]], [Define if you have usable pipe2(2) function])]
+ )
+ ], [
+ AS_VAR_IF([[enable_itc]], [["pipe"]], [AC_MSG_ERROR([[pipe(3) is not usable, consider using other type of inter-thread communication]])])
+ ])
+ ])
+])
+
+AS_IF([[test "x$enable_itc" = "xsocketpair" || test "x$enable_itc" = "xauto"]], [
+ AS_VAR_IF([[os_is_native_w32]], [["yes"]], [[mhd_cv_socketpair_usable='yes']], [
+ AC_CACHE_CHECK([[whether socketpair(3) is usable]], [[mhd_cv_socketpair_usable]], [
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([
+AC_INCLUDES_DEFAULT
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+ ], [[
+ int arr[2];
+ int res;
+#if defined(AF_LOCAL)
+ res = socketpair(AF_LOCAL, SOCK_STREAM, 0, arr);
+#elif defined(AF_UNIX)
+ res = socketpair(AF_UNIX, SOCK_STREAM, 0, arr);
+#else
+#error AF_LOCAL and AF_UNIX are both undefined
+ choke me now;
+#endif
+ if (res != 0) return 1
+ ]])
+ ], [[mhd_cv_socketpair_usable='yes']], [[mhd_cv_socketpair_usable='no']])
+ ])
+ ])
+ AS_VAR_IF([[mhd_cv_socketpair_usable]], [["yes"]], [
+ use_itc='socketpair'
+ enable_itc="$use_itc"
+ AC_DEFINE([[_MHD_ITC_SOCKETPAIR]], [[1]], [Define to use socketpair for inter-thread communication])
+ ], [
+ AS_VAR_IF([[enable_itc]], [["socketpair"]], [AC_MSG_ERROR([[socketpair(3) is not usable, consider using other type of inter-thread communication]])])
+ ])
+])
+
+AS_IF([[test -z "$use_itc"]], [AC_MSG_ERROR([[cannot find usable type of inter-thread communication]])])
+
+
+MHD_CHECK_FUNC([accept4],
+ [[
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#include <sys/socket.h>
+ ]],
+ [[
+ struct sockaddr sk_addr;
+ socklen_t addr_size;
+ i][f (0 > accept4(0, &sk_addr, &addr_size, 0))
+ return 3;
+ ]]
+)
+MHD_CHECK_FUNC([gmtime_r],
+ [[
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#include <time.h>
+ ]],
+ [[
+ time_t timer = (time_t) 0;
+ struct tm res;
+
+ i][f (&res != gmtime_r(&timer, &res))
+ return 3;
+ ]]
+)
+MHD_CHECK_FUNC([memmem],
+ [[
+#if defined(HAVE_STDDEF_H)
+# include <stddef.h>
+#elif defined(HAVE_STDLIB_H)
+# include <stdlib.h>
+#endif /* HAVE_STDLIB_H */
+#include <string.h>
+ ]],
+ [[
+ const char *haystack = "abc";
+ size_t hslen = 3;
+ const char *needle = "b";
+ size_t needlelen = 1;
+
+ i][f ((haystack + 1) != memmem(haystack, hslen, needle, needlelen))
+ return 3;
+ ]]
+)
+MHD_CHECK_FUNC([snprintf],
+ [[
+#include <stdio.h>
+ ]],
+ [[
+ char buf[2];
+
+ i][f (1 != snprintf(buf, 2, "a"))
+ return 3;
+ /* Do not use the next check to avoid compiler warning */
+ /* i][f (4 != snprintf(buf, 2, "abcd"))
+ return 4; */
+ ]]
+)
+AC_CHECK_DECL([gmtime_s],
+ [
+ AC_MSG_CHECKING([[whether gmtime_s is in C11 form]])
+ AC_LINK_IFELSE(
+ [ AC_LANG_PROGRAM(
+ [[
+#define __STDC_WANT_LIB_EXT1__ 1
+#include <time.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+ struct tm* gmtime_s(const time_t* time, struct tm* result);
+ ]], [[
+ static struct tm res;
+ static time_t t = 0;
+ gmtime_s (&t, &res);
+ ]])
+ ],
+ [
+ AC_DEFINE([HAVE_C11_GMTIME_S], [1], [Define to 1 if you have the `gmtime_s' function in C11 form.])
+ AC_MSG_RESULT([[yes]])
+ ],
+ [
+ AC_MSG_RESULT([[no]])
+ AC_MSG_CHECKING([[whether gmtime_s is in W32 form]])
+ AC_LINK_IFELSE(
+ [ AC_LANG_PROGRAM(
+ [[
+#include <time.h>
+#ifdef __cplusplus
+extern "C"
+#endif
+errno_t gmtime_s(struct tm* _tm, const time_t* time);
+ ]], [[
+ static struct tm res;
+ static time_t t = 0;
+ gmtime_s (&res, &t);
+ ]])
+ ],
+ [
+ AC_DEFINE([HAVE_W32_GMTIME_S], [1], [Define to 1 if you have the `gmtime_s' function in W32 form.])
+ AC_MSG_RESULT([[yes]])
+ ],
+ [AC_MSG_RESULT([[no]])
+ ])
+ ])
+ ], [],
+ [[#define __STDC_WANT_LIB_EXT1__ 1
+#include <time.h>]])
+
+
+AC_CHECK_DECL([SOCK_NONBLOCK], [AC_DEFINE([HAVE_SOCK_NONBLOCK], [1], [SOCK_NONBLOCK is defined in a socket header])], [],
+ [[
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#if defined(HAVE_SYS_SOCKET_H)
+# include <sys/socket.h>
+#elif defined(HAVE_WINSOCK2_H)
+# include <winsock2.h>
+#endif
+ ]]
+)
+
+MHD_FIND_LIB([clock_gettime],[[#include <time.h>]],
+ [[
+ struct timespec tp;
+ i][f (0 > clock_gettime(CLOCK_REALTIME, &tp))
+ return 3;
+ ]],
+ [rt],
+ [
+ AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define to '1' if you have clock_gettime() function])
+ AS_VAR_IF([[mhd_cv_find_lib_clock_gettime]],[["none required"]], [],
+ [
+ MHD_LIBDEPS_PKGCFG="${mhd_cv_find_lib_clock_gettime} $MHD_LIBDEPS_PKGCFG"
+ ]
+ )
+ ],[],
+ [MHD_LIBDEPS]
+)
+
+MHD_CHECK_FUNC([clock_get_time],
+ [[
+#include <mach/clock.h>
+#include <mach/mach.h>
+ ]],
+ [[
+ clock_serv_t cs;
+ mach_timespec_t mt;
+ host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cs);
+ clock_get_time(cs, &mt);
+ mach_port_deallocate(mach_task_self(), cs);
+ ]]
+)
+
+MHD_CHECK_FUNC([gethrtime],
+ [[
+#ifdef HAVE_SYS_TIME_H
+/* Solaris define gethrtime() in sys/time.h */
+#include <sys/time.h>
+#endif /* HAVE_SYS_TIME_H */
+#ifdef HAVE_TIME_H
+/* HP-UX define gethrtime() in time.h */
+#include <time.h>
+#endif /* HAVE_TIME_H */
+ ]],
+ [[
+ hrtime_t hrt = gethrtime();
+ i][f (0 == hrt)
+ return 3;
+ ]]
+)
+
+AS_VAR_IF([ac_cv_header_time_h], ["yes"],
+ [
+ MHD_CHECK_FUNC([timespec_get],
+ [[
+#include <time.h>
+
+#ifndef TIME_UTC
+#error TIME_UTC must be defined to use timespec_get()
+choke me now
+#endif
+ ]],
+ [[
+ struct timespec ts;
+ i][f (TIME_UTC != timespec_get (&ts, TIME_UTC))
+ return 3;
+ ]]
+ )
+ ]
+)
+
+MHD_CHECK_FUNC_GETTIMEOFDAY
+
+# IPv6
+AC_CACHE_CHECK([for IPv6],[mhd_cv_have_inet6],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+ ]], [[
+ int af=AF_INET6;
+ int pf=PF_INET6;
+ struct sockaddr_in6 sa;
+ printf("%d %d %p\n", af, pf, (void*) &sa);
+ ]]
+ )
+ ],
+ [AS_VAR_SET([mhd_cv_have_inet6],["yes"])],
+ [AS_VAR_SET([mhd_cv_have_inet6],["no"])]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_have_inet6],["yes"],
+ [AC_DEFINE([HAVE_INET6], [1], [Define to '1' if you have IPv6 headers])]
+)
+
+MHD_CHECK_FUNC([[sysconf]], [[#include <unistd.h>]], [[long a = sysconf(0); if (a) return 1;]])
+
+MHD_CHECK_FUNC([[sysctl]], [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif
+#if defined(HAVE_STDDEF_H)
+#include <stddef.h>
+#elif defined(HAVE_STDLIB_H)
+#include <stdlib.h>
+#endif
+ ]], [[
+ int mib[2] = {0, 0}; /* Avoid any platform-specific values */
+ i][f (sysctl(mib, 2, NULL, NULL, NULL, 0)) return 1;
+ ]],
+ [
+ AC_CHECK_DECLS([CTL_NET,PF_INET,IPPROTO_ICMP,ICMPCTL_ICMPLIM],[],[],
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif /* HAVE_SYS_SYSCTL_H */
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif /* HAVE_SYS_SYSCTL_H */
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif /* HAVE_SYS_SOCKET_H */
+#ifdef HAVE_NETINET_IN_SYSTM_H
+#include <netinet/in_systm.h>
+#endif /* HAVE_NETINET_IN_SYSTM_H */
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif /* HAVE_NETINET_IP_H */
+#ifdef HAVE_NETINET_IP_ICMP_H
+#include <netinet/ip_icmp.h>
+#endif /* HAVE_NETINET_IP_ICMP_H */
+#ifdef HAVE_NETINET_ICMP_VAR_H
+#include <netinet/icmp_var.h>
+#endif /* HAVE_NETINET_ICMP_VAR_H */
+ ]]
+ )
+ ]
+)
+
+MHD_CHECK_FUNC([[sysctlbyname]], [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif
+#if defined(HAVE_STDDEF_H)
+#include <stddef.h>
+#elif defined(HAVE_STDLIB_H)
+#include <stdlib.h>
+#endif
+ ]], [[sysctlbyname("test", NULL, NULL, NULL, 0);]]
+)
+
+MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]])
+MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]])
+
+HIDDEN_VISIBILITY_CFLAGS=""
+AH_TEMPLATE([_MHD_EXTERN],[defines how to decorate public symbols w][hile building the library])
+CFLAGS="${user_CFLAGS}"
+MHD_CHECK_CC_CFLAG([-fvisibility=hidden],[CFLAGS_ac],
+ [
+ # NOTE: require setting of errattr_CFLAGS above
+ CFLAGS="${CFLAGS_ac} -fvisibility=hidden ${user_CFLAGS} ${errattr_CFLAGS}"
+ AC_CACHE_CHECK([whether $CC supports __attribute__((visibility("default")))],[mhd_cv_cc_attr_visibility],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+extern __attribute__((visibility("default"))) int test_extrn_func(void);
+
+int test_extrn_func(void) {return 0;}
+ ]])
+ ],
+ [mhd_cv_cc_attr_visibility="yes"],[mhd_cv_cc_attr_visibility="no"]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_attr_visibility],["yes"],
+ [
+ HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"
+ AS_IF([test "x$os_is_native_w32" = "xyes" && test "x$enable_shared" = "xyes"],
+ [AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern])],
+ [AC_DEFINE([_MHD_EXTERN], [__attribute__((visibility("default"))) extern])]
+ )
+ ],
+ [
+ AC_MSG_WARN([$CC supports -fvisibility, but does not support __attribute__((visibility("default"))). Check compiler and compiler flags.])
+ AC_DEFINE([_MHD_EXTERN], [extern])
+ ]
+ )
+ ],[AC_DEFINE([_MHD_EXTERN], [extern])]
+)
+CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+AC_SUBST([HIDDEN_VISIBILITY_CFLAGS])
+
+# libcurl (required for testing)
+AC_ARG_ENABLE([curl],
+ [AS_HELP_STRING([--disable-curl],[disable cURL based testcases])],
+ [enable_curl=${enableval}])
+curl=0
+AS_IF([test "$enable_curl" != "no"],
+ [LIBCURL_CHECK_CONFIG([yes],[7.16.4],[enable_curl=yes],
+ [
+ AS_IF([test "x$enable_curl" = "xyes"],
+ [AC_MSG_WARN([[cURL-based tests cannot be enabled because libcurl is missing]])])
+ enable_curl=no
+ ])
+])
+AM_CONDITIONAL([RUN_LIBCURL_TESTS], [test "x$enable_curl" = "xyes"])
+AS_IF([test "x$enable_curl" = "xyes"],
+ [MSG_CURL="yes"],
+ [MSG_CURL="no, many unit tests will not run"]
+)
+
+MHD_CHECK_FUNC([magic_open],
+ [[
+#include <magic.h>
+ ]],
+ [[
+ char var_data[256];
+ const char *var_mime;
+ magic_t var_magic = magic_open (MAGIC_MIME_TYPE);
+ (void)magic_load (var_magic, "filename");
+ var_data[0] = 0;
+ var_mime = magic_buffer (var_magic, var_data, 1);
+ i][f (! var_mime)
+ return 1;
+ magic_close (var_magic);
+ ]],
+ [AC_DEFINE([MHD_HAVE_LIBMAGIC], [1], [Define to 1 if you have suitable libmagic.])],
+ [],
+ [-lmagic]
+)
+AM_CONDITIONAL([MHD_HAVE_LIBMAGIC], [[test "x$mhd_cv_func_magic_open" = "xyes"]])
+
+# large file support (> 4 GB)
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+MHD_CHECK_FUNC([lseek64],
+ [[
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#include <unistd.h>
+ ]],
+ [[
+ i][f (((off64_t) -1) == lseek64(0, (off64_t) 0, SEEK_SET))
+ return 3;
+ ]]
+)
+MHD_CHECK_FUNC([pread64],
+ [[
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#include <unistd.h>
+ ]],
+ [[
+ char buf[5];
+ i][f (0 > pread64(0, (void *) buf, 1, (off64_t) 0))
+ return 3;
+ ]]
+)
+MHD_CHECK_FUNC([pread],
+ [[
+#if defined(HAVE_SYS_TYPES_H)
+# include <sys/types.h>
+#endif
+#include <unistd.h>
+ ]],
+ [[
+ char buf[5];
+ i][f (0 > pread(0, (void *) buf, 1, 0))
+ return 3;
+ ]]
+)
+
+
+# check for various sendfile functions
+AC_ARG_ENABLE([sendfile],
+ [AS_HELP_STRING([--disable-sendfile],
+ [disable usage of sendfile() for HTTP connections [auto]])],
+ [],
+ [enable_sendfile="auto"])
+AS_CASE([$enable_sendfile],
+ [[auto | yes]],[[found_sendfile="no"]],
+ [[no]],[[found_sendfile="disabled"]],
+ [AC_MSG_ERROR([[unknown value specified: --enable-sendfile=$enable_sendfile]])]
+)
+AS_VAR_IF([[found_sendfile]], [["no"]],
+ [
+ AC_MSG_CHECKING([[for Linux-style sendfile(2)]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/sendfile.h>
+
+static void empty_func(void)
+{
+/* Check for declaration */
+ (void)sendfile;
+}
+/* Declare again to check form match */
+ssize_t sendfile(int, int, off_t*, size_t);
+ ]],
+ [[
+ int fd1=0, fd2=2;
+ off_t o = 0;
+ size_t s = 5;
+ ssize_t r;
+ r = sendfile (fd1, fd2, &o, s);
+ if (r)
+ empty_func();
+ ]]
+ )
+ ],
+ [
+ AC_DEFINE([HAVE_LINUX_SENDFILE], [1], [Define to 1 if you have linux-style sendfile(2).])
+ found_sendfile="yes, Linux-style"
+ AC_MSG_RESULT([[yes]])
+ MHD_CHECK_FUNC([sendfile64],
+ [[
+#include <sys/sendfile.h>
+ ]],
+ [[
+ off64_t f_offset = (off64_t) 0;
+ if (0 > sendfile64 (0, 1, &f_offset, 1))
+ return 3;
+ ]]
+ )
+ ],
+ [AC_MSG_RESULT([[no]])
+ ]
+ )
+ ]
+)
+AS_VAR_IF([[found_sendfile]], [["no"]],
+ [
+ AC_MSG_CHECKING([[for FreeBSD-style sendfile(2)]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+
+static void empty_func(void)
+{
+/* Check for declaration */
+ (void)sendfile;
+}
+/* Declare again to check form match */
+int sendfile(int, int, off_t, size_t,
+ struct sf_hdtr*, off_t*, int);
+ ]],
+ [[
+ int fd1=0, fd2=1;
+ off_t o = 0;
+ size_t s = 5;
+ off_t r1;
+ int r2;
+ r2 = sendfile (fd1, fd2, o, s, (void*)0, &r1, 0);
+ if (r2)
+ empty_func();
+ ]]
+ )
+ ],
+ [
+ AC_DEFINE([HAVE_FREEBSD_SENDFILE], [1], [Define to 1 if you have FreeBSD-style sendfile(2).])
+ found_sendfile="yes, FreeBSD-style"
+ AC_MSG_RESULT([[yes]])
+ ],
+ [AC_MSG_RESULT([[no]])
+ ]
+ )
+ ]
+)
+AS_VAR_IF([[found_sendfile]], [["no"]],
+ [
+ AC_MSG_CHECKING([[for Darwin-style sendfile(2)]])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
+
+static void empty_func(void)
+{
+/* Check for declaration */
+ (void)sendfile;
+}
+/* Declare again to check form match */
+int sendfile(int, int, off_t, off_t*,
+ struct sf_hdtr *, int);
+ ]],
+ [[
+ int fd=0, s=1;
+ off_t o = 0;
+ off_t l = 5;
+ int r;
+ r = sendfile (fd, s, o, &l, (void*)0, 0);
+ if (r)
+ empty_func();
+ ]]
+ )
+ ],
+ [
+ AC_DEFINE([HAVE_DARWIN_SENDFILE], [1], [Define to 1 if you have Darwin-style sendfile(2).])
+ found_sendfile="yes, Darwin-style"
+ AC_MSG_RESULT([[yes]])
+ ],
+ [AC_MSG_RESULT([[no]])
+ ]
+ )
+ ]
+)
+
+AS_VAR_IF([[found_sendfile]], [["no"]],
+ [
+ AC_MSG_CHECKING([[for Solaris-style sendfile(3)]])
+ SAVE_LIBS="$LIBS"
+ LIBS="-lsendfile $LIBS"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/sendfile.h>
+
+static void empty_func(void)
+{
+/* Check for declaration */
+ (void)sendfile;
+}
+/* Declare again to check form match */
+ssize_t sendfile(int out_fd, int in_fd,
+ off_t *off, size_t len);
+ ]],
+ [[
+ int fd1=0, fd2=1;
+ off_t o = 0;
+ size_t l = 5;
+ ssize_t r;
+ r = sendfile (fd1, fd2, &o, l);
+ if (r)
+ empty_func();
+ ]]
+ )
+ ],
+ [
+ AC_DEFINE([HAVE_SOLARIS_SENDFILE], [1], [Define to 1 if you have Solaris-style sendfile(3).])
+ found_sendfile="yes, Solaris-style"
+ MHD_LIBDEPS="-lsendfile $MHD_LIBDEPS"
+ MHD_LIBDEPS_PKGCFG="-lsendfile $MHD_LIBDEPS_PKGCFG"
+ AC_MSG_RESULT([[yes]])
+ MHD_CHECK_FUNC([sendfile64],
+ [[
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/sendfile.h>
+ ]],
+ [[
+ off64_t f_offset = (off64_t) 0;
+ if (0 > sendfile64 (0, 1, &f_offset, 1))
+ return 3;
+ ]]
+ )
+ ],
+ [AC_MSG_RESULT([[no]])
+ ]
+ )
+ LIBS="$SAVE_LIBS"
+ ]
+)
+AS_IF([[test "x$found_sendfile" = "xno" && test "x$enable_sendfile" = "xyes"]],
+ [AC_MSG_ERROR([[sendfile() usage was requested by configure parameter, but no usable sendfile() function is detected]])]
+)
+
+# optional: enable error and informational messages
+AC_MSG_CHECKING([[whether to generate text messages]])
+AC_ARG_ENABLE([messages],
+ [AS_HELP_STRING([--disable-messages],
+ [disable error, warning messages and text bodies for ]
+ [automatic HTTP responses (to reduce the binary size)])],
+ [enable_messages=${enableval}],
+ [enable_messages=yes])
+AS_IF([[test "x$enable_messages" = "xyes"]],
+ [ AC_DEFINE([HAVE_MESSAGES],[1],[Define to 1 to enable support for text messages.]) ],
+ [[ enable_messages=no ]])
+AC_MSG_RESULT([[$enable_messages]])
+AM_CONDITIONAL([HAVE_MESSAGES], [test "x$enable_messages" != "xno"])
+
+
+# optional: have postprocessor?
+AC_MSG_CHECKING([[whether to enable postprocessor]])
+AC_ARG_ENABLE([postprocessor],
+ [AS_HELP_STRING([--disable-postprocessor],
+ [disable MHD PostProcessor functionality])],
+ [enable_postprocessor=${enableval}],
+ [enable_postprocessor=yes])
+AS_IF([[test "x$enable_postprocessor" != "xno"]],
+ [ enable_postprocessor=yes
+ AC_DEFINE([HAVE_POSTPROCESSOR],[1],[Define to 1 if libmicrohttpd is compiled with postprocessor support.]) ])
+AM_CONDITIONAL([HAVE_POSTPROCESSOR], [test "x$enable_postprocessor" != "xno"])
+AC_MSG_RESULT([[$enable_postprocessor]])
+
+have_gnutls=no
+have_gnutls_sni=no
+have_gcrypt=no
+AS_UNSET([GNUTLS_CPPFLAGS])
+AS_UNSET([GNUTLS_LDFLAGS])
+
+# optional: HTTPS support. Enabled by default
+AC_ARG_ENABLE([https],
+ [AS_HELP_STRING([--enable-https],
+ [enable HTTPS support (yes, no, auto)[auto]])],
+ [enable_https=${enableval}])
+AS_IF([test "x$enable_https" != "xno"],[
+#
+# Next block is large unindented block
+#
+
+# gnutls
+have_gnutls_pkgcfg=no
+AC_MSG_CHECKING([[how to find GnuTLS library]])
+AC_ARG_WITH([[gnutls]],
+ [AS_HELP_STRING([[--with-gnutls[=PFX]]],[use GnuTLS for HTTPS support, optional PFX overrides pkg-config data for GnuTLS headers (PFX/include) and libs (PFX/lib)])],
+ [
+ AS_CASE([$with_gnutls],
+ [no],[
+ AC_MSG_RESULT([[GnuTLS disabled]])
+ AS_UNSET([GNUTLS_CPPFLAGS])
+ AS_UNSET([GNUTLS_CFLAGS])
+ AS_UNSET([GNUTLS_LDFLAGS])
+ AS_UNSET([GNUTLS_LIBS])
+ ],
+ [yes],[
+ AC_MSG_RESULT([[automatically, forced]])
+ ],
+ [
+ AC_MSG_RESULT([[-I$with_gnutls/include -L$with_gnutls/lib -lgnutls]])
+ SAVE_LIBS="$LIBS"
+ LDFLAGS="${LDFLAGS_ac} -L$with_gnutls/lib ${user_LDFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} -I$with_gnutls/include ${user_CPPFLAGS}"
+ have_gnutls_pkgcfg=no
+ MHD_CHECK_FUNC([gnutls_check_version],[[#include <gnutls/gnutls.h>]],
+ [
+ if(!gnutls_check_version("2.0.0"))
+ return 3;
+ ],
+ [
+ GNUTLS_CPPFLAGS="-I$with_gnutls/include"
+ GNUTLS_LDFLAGS="-L$with_gnutls/lib"
+ GNUTLS_LIBS="-lgnutls"
+ have_gnutls=yes
+ ],
+ [AC_MSG_ERROR([can't find usable libgnutls at specified prefix $with_gnutls])],
+ [-lgnutls]
+ )
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ LIBS="$SAVE_LIBS"
+ ])
+ ],
+ [AC_MSG_RESULT([[automatically]])
+ ])
+
+AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"],
+ [
+ PKG_CHECK_MODULES(GNUTLS, [[gnutls]],
+ [
+ have_gnutls_pkgcfg='yes'
+ SAVE_LIBS="$LIBS"
+ CFLAGS="${CFLAGS_ac} $GNUTLS_CFLAGS ${user_CFLAGS}"
+ LIBS="$GNUTLS_LIBS $LIBS"
+ AC_MSG_CHECKING([[whether GnuTLS is usable]])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <gnutls/gnutls.h>
+ ]], [[
+ gnutls_session_t session;
+ gnutls_priority_t priorities;
+ gnutls_global_init();
+ gnutls_priority_init(&priorities, "NORMAL", NULL);
+ gnutls_init(&session, GNUTLS_SERVER);
+ gnutls_priority_set(session, priorities);
+ ]])],
+ [
+ AC_MSG_RESULT([[yes]])
+ have_gnutls=yes
+ # GNUTLS_CFLAGS is actually CPPFLAGS
+ GNUTLS_CPPFLAGS="$GNUTLS_CFLAGS"
+ # GNUTLS_LDFLAGS is a combination of LDFLAGS and LIBS
+ GNUTLS_LDFLAGS="$GNUTLS_LIBS"
+ ],
+ [
+ AC_MSG_RESULT([[no]])
+ have_gnutls=no
+ ])
+
+ AS_IF([test "x$have_gnutls" != "xyes"],
+ [
+ AC_MSG_WARN([pkg-config reports that GnuTLS is present, but GnuTLS can't be used])
+ AS_UNSET([GNUTLS_CPPFLAGS])
+ AS_UNSET([GNUTLS_CFLAGS])
+ AS_UNSET([GNUTLS_LDFLAGS])
+ AS_UNSET([GNUTLS_LIBS])
+ ]
+ )
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ LIBS="$SAVE_LIBS"
+ ],
+ [
+ # check for GnuTLS at default paths
+ have_gnutls_pkgcfg='no'
+ AC_CHECK_HEADERS([gnutls/gnutls.h],
+ [AC_CHECK_LIB([gnutls], [gnutls_priority_set],
+ [
+ GNUTLS_LIBS="-lgnutls"
+ have_gnutls=yes
+ ])], [], [AC_INCLUDES_DEFAULT])
+ ])
+ ])
+
+have_gcrypt='unknown'
+AS_IF([test "x$with_gnutls" != "xno" && test "x$have_gnutls" != "xyes"],
+ [
+ AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no])
+ AS_IF([[test "x$have_gcrypt" = "xyes"]],
+ [
+ SAVE_LIBS="$LIBS"
+ CFLAGS="${CFLAGS_ac} $LIBGCRYPT_CFLAGS ${user_CFLAGS}"
+ # LIBGCRYPT_CFLAGS can be actually a CPPFLAGS, so check them both
+ CPPFLAGS="${CPPFLAGS_ac} $LIBGCRYPT_CFLAGS ${user_CPPFLAGS}"
+ AC_CHECK_HEADERS([gcrypt.h], [], [have_gcrypt=no], [AC_INCLUDES_DEFAULT])
+ # Check for GnuTLS with gcrypt flags
+ LDFLAGS="${LDFLAGS_ac} ${LIBGCRYPT_LIBS} ${user_LDFLAGS}"
+ # A bit of hack: unset cache variable to force recheck
+ AS_UNSET([ac_cv_header_gnutls_gnutls_h])
+ AC_CHECK_HEADERS([gnutls/gnutls.h],
+ [AS_UNSET([ac_cv_lib_gnutls_gnutls_priority_set]) # A bit of hack: unset cache variable to force recheck
+ AC_CHECK_LIB([gnutls], [gnutls_priority_set],
+ [
+ GNUTLS_CPPFLAGS="$LIBGCRYPT_CFLAGS"
+ GNUTLS_CFLAGS="$LIBGCRYPT_CFLAGS"
+ GNUTLS_LDFLAGS="$LIBGCRYPT_LIBS"
+ GNUTLS_LIBS="-lgnutls"
+ have_gnutls=yes
+ ])], [], [AC_INCLUDES_DEFAULT])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ LIBS="$SAVE_LIBS"
+ ]
+ )
+ ]
+)
+AS_IF([test "x$have_gnutls" != "xyes" && test "x$with_gnutls" = "xyes"],
+ [AC_MSG_ERROR([[can't find usable libgnutls]])])
+
+ AS_IF([test "x$have_gnutls" = "xyes"],
+ [
+ SAVE_LIBS="$LIBS"
+ CPPFLAGS="${CPPFLAGS_ac} ${GNUTLS_CPPFLAGS} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${GNUTLS_CFLAGS} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${GNUTLS_LDFLAGS} ${user_LDFLAGS}"
+ LIBS="$GNUTLS_LIBS $LIBS"
+ AC_MSG_CHECKING([[for gnutls_privkey_import_x509_raw()]])
+ AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <gnutls/gnutls.h>
+#include <gnutls/abstract.h>
+ ]], [[
+ gnutls_datum_t data;
+ gnutls_privkey_t key = 0;
+#ifndef gnutls_load_file
+ (void)gnutls_load_file; /* Check for declaration. */
+#endif
+#ifndef gnutls_privkey_import_x509_raw
+ (void)gnutls_privkey_import_x509_raw; /* Check for declaration. */
+#endif
+ gnutls_load_file("key.pem", &data);
+ gnutls_privkey_import_x509_raw(key, &data, GNUTLS_X509_FMT_PEM, NULL, 0);
+ gnutls_free(data.data);
+ ]])], [[have_gnutls_sni=yes]], [[have_gnutls_sni=no]])
+ AC_MSG_RESULT([[$have_gnutls_sni]])
+ AC_CACHE_CHECK([[whether GnuTLS require libgcrypt initialisation]], [mhd_cv_gcrypt_required],
+ [
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [
+#include <gnutls/gnutls.h>
+ ],
+ [
+#if !defined(GNUTLS_VERSION_NUMBER) || GNUTLS_VERSION_NUMBER+0 <= 0x020c14
+#error Old versions of GnuTLS require libgcript initialisation
+choke me now
+#endif
+ ]
+ )
+ ],
+ [[mhd_cv_gcrypt_required='no']], [[mhd_cv_gcrypt_required='yes']]
+ )
+ ]
+ )
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ LIBS="$SAVE_LIBS"
+ ],
+ [
+ AS_UNSET([GNUTLS_CPPFLAGS])
+ AS_UNSET([GNUTLS_LDFLAGS])
+ ]
+ )
+
+ AS_IF([[test "x$mhd_cv_gcrypt_required" = "xyes" && test "x$have_gcrypt" = "xunknown"]],
+ [
+ AM_PATH_LIBGCRYPT([1.2.2], [have_gcrypt=yes], [have_gcrypt=no])
+ AS_IF([[test "x$have_gcrypt" = "xyes"]],
+ [
+ CFLAGS="${CFLAGS_ac} ${LIBGCRYPT_CFLAGS} ${user_CFLAGS}"
+ # LIBGCRYPT_CFLAGS can be actually a CPPFLAGS, so check them both
+ CPPFLAGS="${CPPFLAGS_ac} ${LIBGCRYPT_CFLAGS} ${user_CPPFLAGS}"
+ AC_CHECK_HEADERS([gcrypt.h], [], [have_gcrypt=no], [AC_INCLUDES_DEFAULT])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ]
+ )
+ ]
+ )
+
+ AS_UNSET([[crypt_missing]])
+ AS_IF([[test "x$have_gnutls" = "xyes"]],
+ [
+ AS_IF([[test "x$mhd_cv_gcrypt_required" = "xyes" && test "x$have_gcrypt" != "xyes"]],
+ [
+ crypt_missing="required libgcrypt"
+ AS_IF([[test "x$enable_https" = "xyes" ]], [AC_MSG_ERROR([[HTTPS support cannot be enabled without $crypt_missing.]])])
+ enable_https=no
+ MSG_HTTPS="no (lacking $crypt_missing)"
+ AS_UNSET([LIBGCRYPT_CFLAGS])
+ AS_UNSET([LIBGCRYPT_LIBS])
+ AS_UNSET([GNUTLS_CPPFLAGS])
+ AS_UNSET([GNUTLS_CFLAGS])
+ AS_UNSET([GNUTLS_LDFLAGS])
+ AS_UNSET([GNUTLS_LIBS])
+ ],
+ [
+ AC_DEFINE([[HTTPS_SUPPORT]],[[1]],[Define to 1 if libmicrohttpd is compiled with HTTPS support.])
+ enable_https=yes
+ AS_IF([[test "x$mhd_cv_gcrypt_required" = "xyes"]],
+ [
+ MSG_HTTPS="yes (using libgnutls and libgcrypt)"
+ MHD_TLS_LIB_CPPFLAGS="$LIBGCRYPT_CFLAGS $GNUTLS_CPPFLAGS"
+ MHD_TLS_LIB_CFLAGS="$LIBGCRYPT_CFLAGS $GNUTLS_CFLAGS"
+ MHD_TLS_LIB_LDFLAGS="$GNUTLS_LDFLAGS"
+ MHD_TLS_LIBDEPS="$GNUTLS_LIBS $LIBGCRYPT_LIBS"
+ AC_DEFINE([[MHD_HTTPS_REQUIRE_GCRYPT]], [[1]], [Define to `1' if HTTPS require initialisation of libgcrypt])
+ ],
+ [
+ MSG_HTTPS="yes (using libgnutls)"
+ AS_UNSET([LIBGCRYPT_CFLAGS])
+ AS_UNSET([LIBGCRYPT_LIBS])
+ MHD_TLS_LIB_CPPFLAGS="$GNUTLS_CPPFLAGS"
+ MHD_TLS_LIB_CFLAGS="$GNUTLS_CFLAGS"
+ MHD_TLS_LIB_LDFLAGS="$GNUTLS_LDFLAGS"
+ MHD_TLS_LIBDEPS="$GNUTLS_LIBS"
+ ]
+ )
+ AS_IF([[ test "x$have_gnutls_pkgcfg" = "xyes" ]],
+ [ # remove GnuTLS from private libs in .pc file as it defined in Requires.private
+ MHD_REQ_PRIVATE='gnutls'
+ AS_IF([[test "x$mhd_cv_gcrypt_required" = "xyes"]],
+ [[MHD_LIBDEPS_PKGCFG="$LIBGCRYPT_LIBS $MHD_LIBDEPS_PKGCFG"]]
+ )
+ ],
+ [
+ MHD_REQ_PRIVATE=''
+ AS_IF([[test "x$mhd_cv_gcrypt_required" = "xyes"]],
+ [[MHD_LIBDEPS_PKGCFG="$LIBGCRYPT_LIBS $MHD_LIBDEPS_PKGCFG"]]
+ )
+ MHD_LIBDEPS_PKGCFG="$GNUTLS_LIBS $MHD_LIBDEPS_PKGCFG"
+ ])
+ ]
+ )
+ ],
+ [
+ crypt_missing="libgnutls"
+ AS_IF([[test "x$enable_https" = "xyes" ]], [AC_MSG_ERROR([[HTTPS support cannot be enabled without $crypt_missing.]])])
+ enable_https=no
+ MSG_HTTPS="no (lacking $crypt_missing)"
+ AS_UNSET([LIBGCRYPT_CFLAGS])
+ AS_UNSET([LIBGCRYPT_LIBS])
+ AS_UNSET([GNUTLS_CPPFLAGS])
+ AS_UNSET([GNUTLS_CFLAGS])
+ AS_UNSET([GNUTLS_LDFLAGS])
+ AS_UNSET([GNUTLS_LIBS])
+ ]
+ )
+],[
+ MSG_HTTPS="no (disabled)"
+])
+
+#
+# End of large unindented block
+#
+
+
+AC_MSG_CHECKING(whether to support HTTPS)
+AC_MSG_RESULT([$MSG_HTTPS])
+
+AM_CONDITIONAL([HAVE_GNUTLS], [[test "x$have_gnutls" = "xyes"]])
+AM_CONDITIONAL([HAVE_GNUTLS_SNI], [[test "x$have_gnutls_sni" = "xyes"]])
+AM_CONDITIONAL([ENABLE_HTTPS], [test "x$enable_https" = "xyes"])
+AM_CONDITIONAL([HTTPS_REQUIRE_GCRYPT], [[test "x$enable_https" = "xyes" && test "x$mhd_cv_gcrypt_required" = "xyes"]])
+AC_SUBST([GNUTLS_CPPFLAGS])
+AC_SUBST([GNUTLS_CFLAGS])
+AC_SUBST([GNUTLS_LDFLAGS])
+AC_SUBST([GNUTLS_LIBS])
+
+AS_VAR_IF([have_gnutls], ["yes"],
+ [
+ AC_CACHE_CHECK([for GnuTLS quirks], [mhd_cv_gnutls_mthread_broken],
+ [
+ mhd_cv_gnutls_mthread_broken="no"
+ AS_IF([test -r /etc/redhat-release],
+ [
+ AS_IF([$FGREP ' release 6.' /etc/redhat-release >/dev/null || $FGREP '(Santiago)' /etc/redhat-release >/dev/null],
+ [mhd_cv_gnutls_mthread_broken="found"],
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_gnutls_mthread_broken], ["no"],
+ [
+ AS_IF([command -v rpm >/dev/null],
+ [
+ AS_IF([test "r`rpm -E '%{rhel}' 2>/dev/null`" = "r6"],
+ [mhd_cv_gnutls_mthread_broken="found"],
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ AC_CACHE_CHECK([for gnutls-cli binary], [mhd_cv_gnutls_cli],
+ [
+ mhd_cv_gnutls_cli="no"
+ AS_IF([command -v gnutls-cli >/dev/null 2>&1],
+ [AS_IF([AC_RUN_LOG([gnutls-cli --version >&2])], [mhd_cv_gnutls_cli="yes"])]
+ )
+ ]
+ )
+ ]
+)
+AM_CONDITIONAL([HAVE_GNUTLS_MTHREAD_BROKEN], [[test "x${mhd_cv_gnutls_mthread_broken}" = "xfound"]])
+AM_CONDITIONAL([USE_UPGRADE_TLS_TESTS], [[test "x${mhd_cv_gnutls_mthread_broken}" = "xno" || test "x${mhd_cv_gnutls_cli}" = "xyes"]])
+
+# optional: HTTP Basic Auth support. Enabled by default
+AC_MSG_CHECKING([[whether to support HTTP Basic authentication]])
+AC_ARG_ENABLE([bauth],
+ [AS_HELP_STRING([--disable-bauth],[disable HTTP Basic Authentication support])],
+ [enable_bauth=${enableval}],
+ [enable_bauth=yes])
+AS_IF([[test "x$enable_bauth" != "xno"]],
+ [ enable_bauth=yes
+ AC_DEFINE([BAUTH_SUPPORT],[1],[Define to 1 if libmicrohttpd is compiled with Basic Auth support.]) ])
+AM_CONDITIONAL([ENABLE_BAUTH], [test "x$enable_bauth" != "xno"])
+AC_MSG_RESULT([[$enable_bauth]])
+
+# optional: HTTP Digest Auth support. Enabled by default
+AC_MSG_CHECKING([[whether to support HTTP Digest authentication]])
+AC_ARG_ENABLE([dauth],
+ [AS_HELP_STRING([--disable-dauth], [disable HTTP Digest Authentication support])],
+ [enable_dauth="${enableval}"],
+ [enable_dauth="yes"])
+AS_IF([[test "x$enable_dauth" != "xno"]],
+ [ enable_dauth=yes
+ AC_DEFINE([DAUTH_SUPPORT],[1],[Define to 1 if libmicrohttpd is compiled with Digest Auth support.]) ])
+AM_CONDITIONAL([ENABLE_DAUTH], [test "x$enable_dauth" != "xno"])
+AC_MSG_RESULT([[$enable_dauth]])
+
+AS_VAR_IF([enable_dauth], ["yes"],
+ [
+ AC_MSG_CHECKING([[for Digest Authentication default nonce timeout value]])
+ AC_ARG_ENABLE([dauth-def-timeout],
+ [AS_HELP_STRING([--enable-dauth-def-timeout=NNN],
+ [set default Digest Auth nonce validity time to NNN seconds])],
+ [enable_dauth_def_timeout="${enableval}"],
+ [enable_dauth_def_timeout=""]
+ )
+ AS_VAR_IF([enable_dauth_def_timeout], ["no"],
+ [
+ AC_MSG_WARN([Default Diget Auth nonce validity time cannot be disabled, --disable-dauth-def-timeout parameter is ignored])
+ enable_dauth_def_timeout=""
+ ]
+ )
+ AS_IF([test -z "${enable_dauth_def_timeout}"],
+ [
+ enable_dauth_def_timeout="90"
+ enable_dauth_def_timeout_MSG="${enable_dauth_def_timeout} seconds (default)"
+ ],
+ [
+ AS_IF([[test "x${enable_dauth_def_timeout}" = "x`echo ${enable_dauth_def_timeout}|${SED-sed} 's/[^0-9]//g'`" && \
+ test "${enable_dauth_def_timeout}" -ge "0" 2>/dev/null ]],[:],
+ [AC_MSG_ERROR([Invalid parameter --enable-dauth-def-timeout=${enable_dauth_def_timeout}. Timeout value must be a positive integer.])
+ ]
+ )
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM([],
+ [[
+ static int arr[((int) 2) - 4 * (int)(${enable_dauth_def_timeout} != ((unsigned int)${enable_dauth_def_timeout}))];
+ (void) arr;
+ ]]
+ )
+ ],
+ [],
+ [AC_MSG_ERROR([The value specified by --enable-dauth-def-timeout=${enable_dauth_def_timeout} is too large.])]
+ )
+ enable_dauth_def_timeout_MSG="${enable_dauth_def_timeout} seconds (set by parameter)"
+ ]
+ )
+ AC_DEFINE_UNQUOTED([MHD_DAUTH_DEF_TIMEOUT_],[${enable_dauth_def_timeout}],
+ [The default HTTP Digest Auth default nonce timeout value (in seconds)])
+ AC_MSG_RESULT([[${enable_dauth_def_timeout_MSG}]])
+
+ AC_MSG_CHECKING([[for Digest Authentication default maximum nc value]])
+ AC_ARG_ENABLE([dauth-def-max-nc],
+ [AS_HELP_STRING([--enable-dauth-def-max-nc=NNN],
+ [set default Digest Auth maximum nc (nonce count) value to NNN])],
+ [enable_dauth_def_max_nc="${enableval}"],
+ [enable_dauth_def_max_nc=""]
+ )
+ AS_VAR_IF([enable_dauth_def_max_nc], ["no"],
+ [
+ AC_MSG_WARN([Default Diget Auth maximum nc cannot be disabled, --disable-dauth-def-max-nc parameter is ignored])
+ enable_dauth_def_max_nc=""
+ ]
+ )
+ AS_IF([test -z "${enable_dauth_def_max_nc}"],
+ [
+ enable_dauth_def_max_nc="1000"
+ enable_dauth_def_max_nc_MSG="${enable_dauth_def_max_nc} (default)"
+ ],
+ [
+ AS_IF([[test "x${enable_dauth_def_max_nc}" = "x`echo ${enable_dauth_def_max_nc}|${SED-sed} 's/[^0-9]//g'`" && \
+ test "${enable_dauth_def_max_nc}" -ge "0" 2>/dev/null ]],[:],
+ [AC_MSG_ERROR([Invalid parameter --enable-dauth-def-max-nc=${enable_dauth_def_max_nc}. The value must be a positive integer.])
+ ]
+ )
+ AC_COMPILE_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#include <stdint.h>
+ ]],
+ [[
+ static int arr[((int) 2) - 4 * (int)(${enable_dauth_def_max_nc} != ((uint32_t)${enable_dauth_def_max_nc}))];
+ (void) arr;
+ ]]
+ )
+ ],
+ [],
+ [AC_MSG_ERROR([The value specified by --enable-dauth-def-max-nc=${enable_dauth_def_max_nc} is too large.])]
+ )
+ enable_dauth_def_max_nc_MSG="${enable_dauth_def_max_nc} (set by parameter)"
+ ]
+ )
+ AC_DEFINE_UNQUOTED([MHD_DAUTH_DEF_MAX_NC_],[${enable_dauth_def_max_nc}],
+ [The default HTTP Digest Auth default maximum nc (nonce count) value])
+ AC_MSG_RESULT([[${enable_dauth_def_max_nc_MSG}]])
+
+ dauth_defs_MSG="timeout: ${enable_dauth_def_timeout_MSG}, max nc: ${enable_dauth_def_max_nc_MSG}"
+ ],
+ [
+ dauth_defs_MSG="N/A"
+ ]
+)
+
+AM_CONDITIONAL([HAVE_ANYAUTH],[test "x$enable_bauth" != "xno" || test "x$enable_dauth" != "xno"])
+
+# optional: HTTP "Upgrade" support. Enabled by default
+AC_MSG_CHECKING([[whether to support HTTP "Upgrade"]])
+AC_ARG_ENABLE([[httpupgrade]],
+ [AS_HELP_STRING([[--disable-httpupgrade]], [disable HTTP "Upgrade" support])],
+ [AS_VAR_IF([[enable_httpupgrade]],[["no"]],[],[[enable_httpupgrade='yes']])],
+ [[enable_httpupgrade='yes']])
+AS_VAR_IF([[enable_httpupgrade]],[["yes"]],
+ [
+ AC_DEFINE([[UPGRADE_SUPPORT]],[[1]],[Define to 1 if libmicrohttpd is compiled with HTTP Upgrade support.]) ])
+AM_CONDITIONAL([ENABLE_UPGRADE], [[test "x$enable_httpupgrade" = "xyes"]])
+AC_MSG_RESULT([[$enable_httpupgrade]])
+
+# optional: HTTP cookie parsing support. Enabled by default
+AC_MSG_CHECKING([[whether to support HTTP cookie parsing]])
+AC_ARG_ENABLE([[cookie]],
+ [AS_HELP_STRING([[--disable-cookie]], [disable HTTP cookie parsing support])],
+ [AS_VAR_IF([[enable_cookie]],[["no"]],[],[[enable_cookie='yes']])],
+ [[enable_cookie='yes']])
+AS_VAR_IF([[enable_cookie]],[["yes"]],
+ [
+ AC_DEFINE([[COOKIE_SUPPORT]],[[1]],[Define to 1 if libmicrohttpd is compiled with HTTP cookie parsing support.]) ])
+AM_CONDITIONAL([ENABLE_COOKIE], [[test "x$enable_cookie" = "xyes"]])
+AC_MSG_RESULT([[$enable_cookie]])
+
+# optional: MD5 support for Digest Auth. Enabled by default.
+AC_ARG_ENABLE([[md5]],
+ [AS_HELP_STRING([[--enable-md5=TYPE]],
+ [enable TYPE of MD5 hashing code (yes, no, builtin, tlslib) [yes if dauth enabled]])],
+ [
+ AS_VAR_IF([enable_md5],["internal"],[enable_md5='builtin'])
+ AS_VAR_IF([enable_md5],["built-in"],[enable_md5='builtin'])
+ AS_VAR_IF([enable_dauth],["yes"],[],
+ [
+ AS_VAR_IF([enable_md5],["no"],[],
+ [
+ AC_MSG_WARN([The parameter --enable-md5=${enable_md5} is ignored as Digest Authentication is disabled])
+ enable_md5='no'
+ ]
+ )
+ ]
+ )
+ ], [[enable_md5="${enable_dauth}"]]
+)
+AS_CASE([${enable_md5}],[yes|tlslib],
+ [
+ AS_IF([test "x${enable_compact_code}" != "xno" || test "x$enable_md5" = "xtlslib"],
+ [
+ AS_IF([test "x$enable_https" = "xyes"],
+ [
+ AC_CACHE_CHECK([whether GnuTLS supports MD5 hashing],[mhd_cv_gnutls_md5],
+ [
+ CFLAGS="${CFLAGS_ac} ${GNUTLS_CFLAGS} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${MHD_TLS_LIB_CPPFLAGS} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${MHD_TLS_LIB_CFLAGS} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${MHD_TLS_LIB_LDFLAGS} ${user_LDFLAGS}"
+ save_LIBS="$LIBS"
+ LIBS="${MHD_TLS_LIBDEPS} ${LIBS}"
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#include <gnutls/crypto.h>
+ ]],
+ [[
+ gnutls_hash_hd_t hash_handle;
+ unsigned char digest[16];
+ int exit_code;
+
+ if (0 == gnutls_hash_init(&hash_handle, GNUTLS_DIG_MD5))
+ {
+ if (0 == gnutls_hash(hash_handle, "", 1))
+ {
+ gnutls_hash_output(hash_handle, digest);
+ if (0x93 == digest[0])
+ exit_code = 0;
+ else
+ exit_code = 7;
+ }
+ else
+ exit_code = 5;
+ gnutls_hash_deinit(hash_handle, (void *)0);
+ }
+ else
+ exit_code = 2;
+ if (exit_code)
+ return exit_code;
+ ]]
+ )
+ ],
+ [mhd_cv_gnutls_md5='yes'],[mhd_cv_gnutls_md5='no']
+ )
+ LIBS="${save_LIBS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+ )
+ AS_VAR_IF([mhd_cv_gnutls_md5],["no"],
+ [
+ AS_VAR_IF([enable_md5],["tlslib"],
+ [AC_MSG_FAILURE([TLS library MD5 implementation is not available])]
+ )
+ enable_md5="builtin"
+ ],
+ [enable_md5="tlslib"]
+ )
+ ],
+ [
+ AS_VAR_IF([enable_md5],["tlslib"],
+ [AC_MSG_ERROR([HTTPS is not enabled, TLS library MD5 implementation cannot be used])]
+ )
+ enable_md5="builtin"
+ ]
+ )
+ ],
+ [
+ enable_md5="builtin"
+ ]
+ )
+ ]
+)
+AC_MSG_CHECKING([[whether to support MD5]])
+AS_UNSET([enable_md5_MSG])
+AS_CASE([${enable_md5}],
+ [builtin],[enable_md5_MSG='yes, built-in'],
+ [tlslib],[enable_md5_MSG='yes, external (TLS library)'],
+ [no],[enable_md5_MSG='no'],
+ [yes],[AC_MSG_ERROR([configure internal error: unexpected variable value])],
+ [AC_MSG_ERROR([Unrecognized parameter --enable-md5=${enable_md5}])]
+)
+AS_IF([test "x${enable_md5}" = "xbuiltin" || test "x${enable_md5}" = "xtlslib" ],
+ [
+ AC_DEFINE([[MHD_MD5_SUPPORT]],[[1]],
+ [Define to 1 if libmicrohttpd is compiled with MD5 hashing support.])
+ ]
+)
+AS_IF([test "x${enable_md5}" = "xtlslib" ],
+ [
+ AC_DEFINE([[MHD_MD5_TLSLIB]],[[1]],
+ [Define to 1 if libmicrohttpd is compiled with MD5 hashing by TLS library.])
+ ]
+)
+AM_CONDITIONAL([ENABLE_MD5], [[test "x${enable_md5}" = "xbuiltin" || test "x${enable_md5}" = "xtlslib" ]])
+AM_CONDITIONAL([ENABLE_MD5_EXT], [[test "x${enable_md5}" = "xtlslib" ]])
+AC_MSG_RESULT([[${enable_md5_MSG}]])
+
+# optional: SHA-256 support for Digest Auth. Enabled by default.
+AC_ARG_ENABLE([[sha256]],
+ [AS_HELP_STRING([[--enable-sha256=TYPE]],
+ [enable TYPE of SHA-256 hashing code (yes, no, builtin, tlslib) [yes if dauth enabled]])],
+ [
+ AS_VAR_IF([enable_sha256],["internal"],[enable_sha256='builtin'])
+ AS_VAR_IF([enable_sha256],["built-in"],[enable_sha256='builtin'])
+ AS_VAR_IF([enable_dauth],["yes"],[],
+ [
+ AS_VAR_IF([enable_sha256],["no"],[],
+ [
+ AC_MSG_WARN([The parameter --enable-sha256=${enable_sha256} is ignored as Digest Authentication is disabled])
+ enable_sha256='no'
+ ]
+ )
+ ]
+ )
+ ], [[enable_sha256="${enable_dauth}"]]
+)
+AS_CASE([${enable_sha256}],[yes|tlslib],
+ [
+ AS_IF([test "x${enable_compact_code}" != "xno" || test "x$enable_sha256" = "xtlslib"],
+ [
+ AS_IF([test "x$enable_https" = "xyes"],
+ [
+ AC_CACHE_CHECK([whether GnuTLS supports sha256 hashing],[mhd_cv_gnutls_sha256],
+ [
+ CFLAGS="${CFLAGS_ac} ${GNUTLS_CFLAGS} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${MHD_TLS_LIB_CPPFLAGS} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${MHD_TLS_LIB_CFLAGS} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${MHD_TLS_LIB_LDFLAGS} ${user_LDFLAGS}"
+ save_LIBS="$LIBS"
+ LIBS="${MHD_TLS_LIBDEPS} ${LIBS}"
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#include <gnutls/crypto.h>
+ ]],
+ [[
+ gnutls_hash_hd_t hash_handle;
+ unsigned char digest[32];
+ int exit_code;
+
+ if (0 == gnutls_hash_init(&hash_handle, GNUTLS_DIG_SHA256))
+ {
+ if (0 == gnutls_hash(hash_handle, "", 1))
+ {
+ gnutls_hash_output(hash_handle, digest);
+ if (0x6e == digest[0])
+ exit_code = 0;
+ else
+ exit_code = 7;
+ }
+ else
+ exit_code = 5;
+ gnutls_hash_deinit(hash_handle, (void *)0);
+ }
+ else
+ exit_code = 2;
+ if (exit_code)
+ return exit_code;
+ ]]
+ )
+ ],
+ [mhd_cv_gnutls_sha256='yes'],[mhd_cv_gnutls_sha256='no']
+ )
+ LIBS="${save_LIBS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ LDFLAGS="${LDFLAGS_ac} ${user_LDFLAGS}"
+ ]
+ )
+ AS_VAR_IF([mhd_cv_gnutls_sha256],["no"],
+ [
+ AS_VAR_IF([enable_sha256],["tlslib"],
+ [AC_MSG_FAILURE([TLS library SHA-256 implementation is not available])]
+ )
+ enable_sha256="builtin"
+ ],
+ [enable_sha256="tlslib"]
+ )
+ ],
+ [
+ AS_VAR_IF([enable_sha256],["tlslib"],
+ [AC_MSG_ERROR([HTTPS is not enabled, TLS library SHA-256 implementation cannot be used])]
+ )
+ enable_sha256="builtin"
+ ]
+ )
+ ],
+ [
+ enable_sha256="builtin"
+ ]
+ )
+ ]
+)
+AC_MSG_CHECKING([[whether to support SHA-256]])
+AS_UNSET([enable_sha256_MSG])
+AS_CASE([${enable_sha256}],
+ [builtin],[enable_sha256_MSG='yes, built-in'],
+ [tlslib],[enable_sha256_MSG='yes, external (TLS library)'],
+ [no],[enable_sha256_MSG='no'],
+ [yes],[AC_MSG_ERROR([configure internal error: unexpected variable value])],
+ [AC_MSG_ERROR([Unrecognized parameter --enable-sha256=${enable_sha256}])]
+)
+AS_IF([test "x${enable_sha256}" = "xbuiltin" || test "x${enable_sha256}" = "xtlslib" ],
+ [
+ AC_DEFINE([[MHD_SHA256_SUPPORT]],[[1]],
+ [Define to 1 if libmicrohttpd is compiled with SHA-256 hashing support.])
+ ]
+)
+AS_IF([test "x${enable_sha256}" = "xtlslib" ],
+ [
+ AC_DEFINE([[MHD_SHA256_TLSLIB]],[[1]],
+ [Define to 1 if libmicrohttpd is compiled with SHA-256 hashing by TLS library.])
+ ]
+)
+AM_CONDITIONAL([ENABLE_SHA256], [[test "x${enable_sha256}" = "xbuiltin" || test "x${enable_sha256}" = "xtlslib" ]])
+AM_CONDITIONAL([ENABLE_SHA256_EXT], [[test "x${enable_sha256}" = "xtlslib" ]])
+AC_MSG_RESULT([[${enable_sha256_MSG}]])
+
+# optional: SHA-512/256 support for Digest Auth. Enabled by default.
+AC_ARG_ENABLE([[sha512-256]],
+ [AS_HELP_STRING([[--disable-sha512-256]],
+ [disable SHA-512/256 hashing support for Digest Authentication])],
+ [
+ AS_VAR_IF([[enable_sha512_256]],[["yes"]],
+ [
+ AS_VAR_IF([enable_dauth],["yes"],[],
+ [
+ AC_MSG_WARN([The parameter --enable-sha512-256 is ignored as Digest Authentication is disabled])
+ enable_sha512_256='no'
+ ]
+ )
+ ],[[enable_sha512_256='no']]
+ )
+ ], [[enable_sha512_256="${enable_dauth}"]]
+)
+AC_MSG_CHECKING([[whether to support SHA-512/256]])
+AS_UNSET([enable_sha512_256_MSG])
+AS_CASE([${enable_sha512_256}],
+ [yes],[enable_sha512_256_MSG='yes, built-in'],
+ [no],[enable_sha512_256_MSG='no'],
+ [AC_MSG_ERROR([Unrecognized parameter --enable-sha512-256=${enable_sha512_256}])]
+)
+AS_VAR_IF([[enable_sha512_256]],[["yes"]],
+ [
+ AC_DEFINE([[MHD_SHA512_256_SUPPORT]],[[1]],
+ [Define to 1 if libmicrohttpd is compiled with SHA-512/256 hashing support.])
+ ]
+)
+AM_CONDITIONAL([ENABLE_SHA512_256], [[test "x${enable_sha512_256}" = "xyes"]])
+AC_MSG_RESULT([[${enable_sha512_256_MSG}]])
+
+AS_IF([test "x$enable_dauth" != "xno"],
+ [
+ AS_IF([test "x${enable_md5}" = "xno" && test "x${enable_sha256}" = "xno" && test "x${enable_sha512_256}" != "xyes"],
+ [AC_MSG_ERROR([At least one hashing algorithm must be enabled if Digest Auth is enabled])]
+ )
+ ]
+)
+
+
+AC_CACHE_CHECK([[for calloc()]], [[mhd_cv_have_func_calloc]],
+ [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+ ]],[[void * ptr = calloc(1, 2); if (ptr) return 1;]])
+ ],
+ [[mhd_cv_have_func_calloc='yes']],
+ [[mhd_cv_have_func_calloc='no']]
+ )
+ ]
+)
+AS_VAR_IF([[mhd_cv_have_func_calloc]], [["yes"]],
+ [AC_DEFINE([[HAVE_CALLOC]], [[1]], [Define to 1 if you have the usable `calloc' function.])])
+
+# Some systems have IPv6 disabled in kernel at run-time
+AS_IF([[test "x${mhd_cv_have_inet6}" = "xyes" && test "x${cross_compiling}" = "xno"]],
+ [
+ AC_CACHE_CHECK([whether IPv6 could be used for testing],[mhd_cv_ipv6_for_testing],
+ [
+ AC_RUN_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_IP_H
+#include <netinet/ip.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETINET_TCP_H
+#include <netinet/tcp.h>
+#endif
+
+static void zr_mem(void *ptr, socklen_t size)
+{ char *mem = ptr; while(size--) {mem[0] = 0; mem++;} }
+
+int main(void)
+{
+ int ret = 30;
+ struct sockaddr_in6 sa;
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ int sckt;
+ const int invld_sckt = -1;
+#else
+ SOCKET sckt;
+ const SOCKET invld_sckt = INVALID_SOCKET;
+ WSADATA wsa_data;
+
+ WSAStartup(MAKEWORD(2, 2), &wsa_data);
+#endif
+ zr_mem(&sa, sizeof(sa));
+ sa.sin6_family = AF_INET6;
+ sa.sin6_port = 0;
+ sa.sin6_addr = in6addr_loopback;
+#ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN
+ sa.sin6_len = sizeof(sa);
+#endif
+ sckt = socket (PF_INET6, SOCK_STREAM, 0);
+ if (invld_sckt != sckt)
+ {
+ if (0 == bind (sckt, (struct sockaddr *)&sa, sizeof(sa)))
+ {
+ if (0 == listen (sckt, 1))
+ ret = 0;
+ else
+ ret = 1; /* listen() failed */
+ } else ret = 2; /* bind() failed */
+#if !defined(_WIN32) || defined(__CYGWIN__)
+ close (sckt);
+#else
+ closesocket (sckt);
+#endif
+ } else ret = 3; /* socket() failed */
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ WSACleanup();
+#endif
+ return ret;
+}
+ ]])
+ ], [[mhd_cv_ipv6_for_testing="yes"]], [[mhd_cv_ipv6_for_testing="no"]], [[mhd_cv_ipv6_for_testing="no"]]
+ )
+ ]
+ )
+ ]
+)
+AS_VAR_IF([mhd_cv_ipv6_for_testing],["yes"],
+ [AC_DEFINE([[USE_IPV6_TESTING]], [[1]], [Define to 1 if your kernel supports IPv6 and IPv6 is enabled and useful for testing.])]
+)
+
+AS_VAR_IF([enable_tools],["yes"],
+ [
+ AC_CHECK_HEADERS([features.h sys/pstat.h vxCpuLib.h],[],[],[AC_INCLUDES_DEFAULT])
+ AC_CHECK_DECLS(
+ [_SC_NPROCESSORS_ONLN,_SC_NPROC_ONLN,_SC_CRAY_NCPU,_SC_NPROCESSORS_CONF,CTL_HW,HW_NCPUONLINE,HW_NCPU,HW_AVAILCPU],
+ [],[],
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS_SYSCTL_H
+#include <sys/sysctl.h>
+#endif /* HAVE_SYS_SYSCTL_H */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+ ]]
+ )
+ MHD_CHECK_FUNC([pstat_getdynamic],[[
+#include <sys/param.h>
+#include <sys/pstat.h>
+ ]],
+ [[
+ struct pst_dynamic psd_data;
+ i][f (1 != pstat_getdynamic(&psd_data, sizeof(psd_data), (size_t)1, 0))
+ return 2;
+ i][f (0 >= psd_data.psd_proc_cnt)
+ return 3;
+ ]]
+ )
+ MHD_CHECK_FUNC([vxCpuEnabledGet],[[#include <vxCpuLib.h>]],
+ [[
+ cpuset_t enb_set;
+ enb_set = vxCpuEnabledGet();
+ (void) enb_set;
+ ]]
+ )
+ AC_CHECK_HEADERS([sched.h sys/_cpuset.h sys/cpuset.h],[],[],[AC_INCLUDES_DEFAULT])
+ # glibc / Linux kernel
+ MHD_CHECK_FUNC([getpid],[[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#include <unistd.h>
+ ]],
+ [[
+ pid_t cur_pid;
+ cur_pid = getpid();
+ (void) &cur_pid; /* Mute possible warning */
+ ]],
+ [
+ MHD_CHECK_FUNC([sched_getaffinity],[[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#include <unistd.h>
+#include <sched.h>
+ ]],
+ [[
+ cpu_set_t cur_set;
+ i][f (0 != sched_getaffinity(getpid(), sizeof(cur_set), &cur_set))
+ return 2;
+ i][f (0 == CPU_SET (0, &cur_set))
+ return 3; /* Actually this could be a valid result */
+ ]],
+ [
+ MHD_CHECK_FUNC([CPU_COUNT],[[
+#include <stddef.h>
+#include <sched.h>
+ ]],
+ [[
+ cpu_set_t cur_set;
+ CPU_ZERO(&cur_set);
+ i][f (0 != CPU_COUNT(&cur_set))
+ return 2;
+ ]],
+ [
+ MHD_CHECK_FUNC([CPU_COUNT_S],[[
+#include <stddef.h>
+#include <sched.h>
+ ]],
+ [[
+ static const unsigned int set_size_cpus = 2048u;
+ const size_t set_size_bytes = (size_t) CPU_ALLOC_SIZE(set_size_cpus);
+ cpu_set_t *p_set;
+ p_set = CPU_ALLOC(set_size_cpus);
+ i][f (!p_set)
+ return 2;
+ CPU_ZERO_S(set_size_bytes, p_set);
+ i][f (0 != CPU_COUNT_S(set_size_bytes, p_set))
+ {
+ CPU_FREE(p_set);
+ return 3;
+ }
+ CPU_FREE(p_set);
+ ]],
+ [AC_CHECK_DECLS([CPU_SETSIZE],[],[],[#include <sched.h>])]
+ )
+ ]
+ )
+ ]
+ )
+ # NetBSD
+ # Should work only with -lrt, but actually works without it.
+ MHD_CHECK_FUNC([sched_getaffinity_np],[[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#include <unistd.h>
+#include <sched.h>
+ ]],
+ [[
+ cpuset_t *cpuset_ptr;
+ cpuid_t cpu_num = 0;
+ cpuset_ptr = cpuset_create();
+ i][f (!cpuset_ptr)
+ return 2;
+ i][f (0 != sched_getaffinity_np(getpid(), cpuset_size(cpuset_ptr), cpuset_ptr))
+ {
+ cpuset_destroy(cpuset_ptr);
+ return 3;
+ }
+ i][f (0 >= cpuset_isset(cpu_num, cpuset_ptr))
+ {
+ cpuset_destroy(cpuset_ptr);
+ return 4; /* Actually this could be a valid result */
+ }
+ cpuset_destroy(cpuset_ptr);
+ ]]
+ )
+ ]
+ )
+ # FreeBSD
+ MHD_CHECK_FUNC([cpuset_getaffinity],[[
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+#include <sys/cpuset.h>
+ ]],
+ [[
+ cpuset_t cur_mask;
+ i][f (0 != cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, (id_t) -1, sizeof(cur_mask), &cur_mask))
+ return 2;
+ ]],
+ [
+ MHD_CHECK_FUNC([CPU_COUNT],[[
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS__CPUSET_H
+#include <sys/_cpuset.h>
+#endif /* HAVE_SYS_PARAM_H */
+#include <sys/cpuset.h>
+ ]],
+ [[
+ cpuset_t test_mask;
+ CPU_ZERO(&test_mask);
+ i][f (0 != CPU_COUNT(&test_mask))
+ return 2;
+ ]],
+ [
+ MHD_CHECK_FUNC([CPU_COUNT_S],[[
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS__CPUSET_H
+#include <sys/_cpuset.h>
+#endif /* HAVE_SYS_PARAM_H */
+#include <sys/cpuset.h>
+ ]],
+ [[
+ static const unsigned int max_cpu_num = 2048u;
+ cpuset_t *mask_ptr;
+ mask_ptr = CPU_ALLOC(max_cpu_num);
+ i][f (! mask_ptr)
+ return 2;
+ i][f (0 != cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, (id_t) -1,
+ CPU_ALLOC_SIZE(max_cpu_num), mask_ptr))
+ {
+ CPU_FREE(mask_ptr);
+ return 3;
+ }
+ i][f (0 == CPU_COUNT_S(CPU_ALLOC_SIZE(max_cpu_num), &test_mask))
+ {
+ CPU_FREE(mask_ptr);
+ return 4;
+ }
+ CPU_FREE(mask_ptr);
+ ]]
+ )
+ ]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_func_CPU_COUNT_S],["yes"],
+ [
+ AC_CACHE_CHECK([whether CPU_COUNT_S() expects max CPU number as 'size' parameter],[mhd_cv_func_cpu_count_s_cpus],
+ [
+ AS_VAR_IF([cross-compiling],["yes"],[mhd_cv_func_cpu_count_s_cpus="assuming no"],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM([[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif /* HAVE_SYS_TYPES_H */
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS__CPUSET_H
+#include <sys/_cpuset.h>
+#endif /* HAVE_SYS_PARAM_H */
+#ifdef HAVE_SYS_CPUSET_H
+#include <sys/cpuset.h>
+#endif /* HAVE_SYS_CPUSET_H */
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif /* HAVE_STDDEF_H */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_SCHED_H
+#include <sched.h>
+#endif /* HAVE_SCHED_H */
+#include <stdio.h>
+
+#ifdef HAVE_SCHED_GETAFFINITY
+#define TEST_CPUSET_TYPE cpu_set_t
+#else /* ! HAVE_SCHED_GETAFFINITY */
+#define TEST_CPUSET_TYPE cpuset_t
+#endif /* ! HAVE_SCHED_GETAFFINITY */
+ ]],
+ [[
+ TEST_CPUSET_TYPE *p_testset;
+ /* The size of the cpuset that is larger then the test cpuset (in CPUs) */
+ static const unsigned int testset_size_oversized_cpus = (8 * sizeof(long)) * 1024;
+ const size_t testset_size_oversized_bytes = CPU_ALLOC_SIZE(testset_size_oversized_cpus);
+ /* The size of the test cpuset in number of CPUs */
+ const unsigned int testset_size_cpus = (unsigned int) testset_size_oversized_bytes;
+ /* The size of the test cpuset in bytes */
+ const size_t testset_size_bytes = CPU_ALLOC_SIZE(testset_size_cpus);
+ /* The last one CPU in the test set */
+ const unsigned int test_cpu_num1 = testset_size_cpus - 1;
+ /* The penultimate CPU in the test set */
+ const unsigned int test_cpu_num2 = testset_size_cpus - 2;
+ /* The CPU numbers that should be cleared */
+ const unsigned int test_cpu_clear1 = testset_size_cpus - 3;
+ const unsigned int test_cpu_clear2 = testset_size_cpus - 4;
+ unsigned int count_res;
+ int ret = 0;
+
+ /* Allocate oversize area to ensure that memory outside the buffer is not used */
+ p_testset = CPU_ALLOC(testset_size_oversized_cpus);
+ if (! p_testset)
+ {
+ fprintf (stderr, "Error allocating memory.\n");
+ return 99;
+ }
+ /* Set the some CPU numbers and then clear them */
+ CPU_SET_S(test_cpu_clear1, testset_size_bytes, p_testset);
+ CPU_SET_S(test_cpu_clear2, testset_size_bytes, p_testset);
+ CPU_ZERO_S(testset_size_bytes, p_testset);
+ /* Set two CPUs on */
+ CPU_SET_S(test_cpu_num1, testset_size_bytes, p_testset);
+ CPU_SET_S(test_cpu_num2, testset_size_bytes, p_testset);
+ count_res = (unsigned int) CPU_COUNT_S(testset_size_bytes, p_testset);
+ if (0 == count_res)
+ {
+ fprintf (stderr, "Full cpuset cannot be read by CPU_COUNT_S() when using the number of bytes as the size parameter.\n");
+ /* Set the some CPU numbers and then clear them */
+ CPU_SET_S(test_cpu_clear1, testset_size_cpus, p_testset);
+ CPU_SET_S(test_cpu_clear2, testset_size_cpus, p_testset);
+ CPU_ZERO_S(testset_size_cpus, p_testset);
+ /* Set two CPUs on */
+ CPU_SET_S(test_cpu_num1, testset_size_cpus, p_testset);
+ CPU_SET_S(test_cpu_num2, testset_size_cpus, p_testset);
+ count_res = (unsigned int) CPU_COUNT_S(testset_size_cpus, p_testset);
+ if (2 == count_res)
+ {
+ fprintf (stderr, "Full cpuset is read by CPU_COUNT_S() only when using the maximum CPU number as the size parameter.\n");
+ ret = 3;
+ }
+ else
+ {
+ fprintf (stderr, "Wrong result returned by CPU_COUNT_S() when using the maximum CPU number as the size parameter.\n");
+ fprintf (stderr, "Number of 'enabled' CPUs: 2\n");
+ fprintf (stderr, "Number of counted CPUs: %u\n", count_res);
+ fprintf (stderr, "CPU_COUNT_S() could be unreliable.\n");
+ ret = 70;
+ }
+ }
+ else if (2 == count_res)
+ {
+ fprintf (stderr, "Full cpuset is read by CPU_COUNT_S() when using the number of bytes as the size parameter.\n");
+ }
+ else
+ {
+ fprintf (stderr, "Wrong result returned by CPU_COUNT_S() when using the number of bytes as the size parameter.\n");
+ fprintf (stderr, "Number of 'enabled' CPUs: 2\n");
+ fprintf (stderr, "Number of counted CPUs: %u\n", count_res);
+ fprintf (stderr, "CPU_COUNT_S() could be unreliable.\n");
+ ret = 71;
+ }
+ CPU_FREE(p_testset);
+ if (0 != ret)
+ return ret;
+ ]]
+ )
+ ],
+ [
+ AM_RUN_LOG([./conftest$EXEEXT])
+ count_test_res=$?
+ AS_IF([test $count_test_res -eq 0],[mhd_cv_func_cpu_count_s_cpus="no"],
+ [test $count_test_res -eq 3],[mhd_cv_func_cpu_count_s_cpus="yes"],
+ [
+ AC_MSG_WARN([Unexpected value returned by CPU_COUNT_S() test program. Please report to ${PACKAGE_BUGREPORT}])
+ mhd_cv_func_cpu_count_s_cpus="assuming no"
+ ]
+ )
+ ],
+ [
+ AC_MSG_WARN([Cannot build CPU_COUNT_S() test program. Please report to ${PACKAGE_BUGREPORT}])
+ mhd_cv_func_cpu_count_s_cpus="assuming no"
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_func_cpu_count_s_cpus],["yes"],
+ [AC_DEFINE([MHD_FUNC_CPU_COUNT_S_GETS_CPUS],[1],
+ [Define to '1' if CPU_COUNT_S() function expects max CPU number as 'size' parameter])
+ ]
+ )
+ ]
+ )
+ ]
+)
+
+# Check for fork() and waitpid(). They are used for tests.
+AC_MSG_CHECKING([[for fork()]])
+mhd_have_fork_waitpid='no'
+AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+ ]], [[
+ pid_t p = fork ();
+ if (0 == p)
+ return 1;
+ ]])
+ ], [
+ AC_DEFINE([[HAVE_FORK]], [[1]], [Define to 1 if you have the usable `fork' function.])
+ AC_MSG_RESULT([[yes]])
+
+ AC_MSG_CHECKING([[for waitpid()]])
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/wait.h>
+ ]], [[
+ pid_t p = fork ();
+ if (0 == p)
+ return 1;
+ waitpid (p, (void*)0, 0)
+ ]])
+ ], [
+ AC_DEFINE([[HAVE_WAITPID]], [[1]], [Define to 1 if you have the usable `waitpid' function.])
+ AC_MSG_RESULT([[yes]])
+ mhd_have_fork_waitpid='yes'
+ ],[
+ AC_MSG_RESULT([[no]])
+ ])
+],[
+ AC_MSG_RESULT([[no]])
+])
+
+AM_CONDITIONAL([HAVE_FORK_WAITPID], [test "x$mhd_have_fork_waitpid" = "xyes"])
+
+# gcov compilation
+AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
+AC_ARG_ENABLE([coverage],
+ AS_HELP_STRING([--enable-coverage],
+ [compile the library with code coverage support]),
+ [use_gcov=${enableval}],
+ [use_gcov=no])
+AC_MSG_RESULT($use_gcov)
+AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
+
+AX_COUNT_CPUS
+AC_SUBST([MHD_REAL_CPU_COUNT],[${CPU_COUNT}])
+AM_SUBST_NOTMAKE([MHD_REAL_CPU_COUNT])
+AC_MSG_CHECKING([for number of CPU cores to use in tests])
+AS_VAR_IF([use_heavy_tests], ["yes"],
+ [
+ # Enable usage of many core if heavy tests are enabled
+ AS_IF([[test "$CPU_COUNT" -gt "32"]], [[CPU_COUNT="32"]])dnl Limit resource usage
+ ],
+ [
+ # Limit usage to just a few cores if heavy tests are not enabled
+ AS_IF([[test "$CPU_COUNT" -gt "6"]], [[CPU_COUNT="6"]])
+ AS_IF([[test "$CPU_COUNT" -lt "2"]], [[CPU_COUNT="2"]])
+ ]
+)
+AC_MSG_RESULT([$CPU_COUNT])
+
+
+AC_ARG_ENABLE([[asserts]],
+ [AS_HELP_STRING([[--enable-asserts]],
+ [enable test build with debug asserts])],
+ [],
+ [enable_asserts='auto']
+)
+AS_UNSET([use_asserts_MSG])
+AC_CACHE_CHECK([[whether NDEBUG macro is defined]], [mhd_cv_macro_ndebug_def],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#ifndef NDEBUG
+#error NDEBUG is NOT defined
+chome me now
+#endif
+
+int main(void)
+{
+ return 0;
+}
+ ]]
+ )
+ ],
+ [[mhd_cv_macro_ndebug_def='yes']],
+ [[mhd_cv_macro_ndebug_def='no']]
+ )
+ ]
+)
+AS_VAR_IF([enable_asserts],["yes"],
+ [
+ AS_VAR_IF([mhd_cv_macro_ndebug_def],["yes"],
+ [
+ AC_MSG_FAILURE([Parameter --enable-asserts is specified, but NDEBUG macro is defined as well])
+ ]
+ )
+ use_asserts_MSG="yes, enabled by configure parameter"
+ ]
+)
+AC_CACHE_CHECK([[whether _DEBUG macro is defined]], [mhd_cv_macro__debug_def],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#ifndef _DEBUG
+#error _DEBUG is NOT defined
+chome me now
+#endif
+
+int main(void)
+{
+ return 0;
+}
+ ]]
+ )
+ ],
+ [[mhd_cv_macro__debug_def='yes']],
+ [[mhd_cv_macro__debug_def='no']]
+ )
+ ]
+)
+AS_VAR_IF([enable_asserts],["no"],
+ [
+ AS_VAR_IF([mhd_cv_macro__debug_def],["yes"],
+ [
+ AC_MSG_FAILURE([Parameter --disable-asserts is specified, but _DEBUG macro is defined as well])
+ ]
+ )
+ use_asserts_MSG="no, set by configure parameter"
+ ]
+)
+AS_IF([test "x${mhd_cv_macro_ndebug_def}" = "xyes" && test "x${mhd_cv_macro__debug_def}" = "xyes"],
+ [AC_MSG_FAILURE([Both NDEBUG and _DEBUG macros are defined])]
+)
+AS_VAR_IF([enable_asserts],["auto"],
+ [
+ AS_VAR_IF([mhd_cv_macro_ndebug_def],["yes"],
+ [
+ enable_asserts="no"
+ use_asserts_MSG="no, set by NDEBUG preprocessor macro"
+ ]
+ )
+ ]
+)
+AS_VAR_IF([enable_asserts],["auto"],
+ [
+ AS_VAR_IF([mhd_cv_macro__debug_def],["yes"],
+ [
+ enable_asserts="yes"
+ use_asserts_MSG="yes, enabled by _DEBUG preprocessor macro"
+ ]
+ )
+ ]
+)
+AS_VAR_IF([enable_asserts],["auto"],
+ [
+ AC_CACHE_CHECK([[whether DEBUG macro is defined]], [mhd_cv_macro_debug_def],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#ifndef DEBUG
+#error DEBUG is NOT defined
+chome me now
+#endif
+
+int main(void)
+{
+ return 0;
+}
+ ]]
+ )
+ ],
+ [[mhd_cv_macro_debug_def='yes']],
+ [[mhd_cv_macro_debug_def='no']]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_macro_debug_def],["yes"],
+ [
+ enable_asserts="yes"
+ use_asserts_MSG="yes, enabled by DEBUG preprocessor macro"
+ ]
+ )
+ ]
+)
+AC_MSG_CHECKING([[whether to enable debug asserts]])
+AS_VAR_IF([enable_asserts],["auto"],
+ [
+ AS_CASE([${enable_build_type}],
+ [debug|debugger],
+ [
+ enable_asserts="yes"
+ use_asserts_MSG="yes, enabled by --enable-bulid-type=${enable_build_type}"
+ ],
+ [
+ enable_asserts="no"
+ use_asserts_MSG="no"
+ ]
+ )
+ ]
+)
+AS_CASE([[$enable_asserts]], [[yes]], [[:]], [[no]], [[:]], [[enable_asserts='no']])
+AC_MSG_RESULT([[${use_asserts_MSG=no}]])
+
+AS_VAR_IF([[enable_asserts]], [["yes"]],
+ [
+ AS_VAR_IF([[mhd_cv_macro__debug_def]], [["yes"]], [:],
+ [
+ MHD_PREPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-D_DEBUG=1])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ ]
+ )
+ AC_CACHE_CHECK([[whether system assert() is available]], [mhd_cv_sys_assert_avail],
+ [
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_SOURCE([[
+#include <assert.h>
+
+static int pos_val(void) {return 5;}
+static int neg_val(void) {return -5;}
+int main(void)
+{
+ int pos_var = pos_val(), neg_var = neg_val();
+ assert(neg_var > pos_var); /* Must trigger assert. */
+ return pos_var + neg_var;
+}
+ ]])
+ ],
+ [[mhd_cv_sys_assert_avail='yes']],
+ [[mhd_cv_sys_assert_avail='no']]
+ )
+ ]
+ )
+ AS_VAR_IF([[mhd_cv_sys_assert_avail]], [["no"]], [],
+ [AC_DEFINE([[HAVE_ASSERT]], [[1]], [Define if you have usable assert() and assert.h])])
+ ],
+ [
+ AS_VAR_IF([[mhd_cv_macro_ndebug_def]], [["yes"]], [:],
+ [
+ MHD_PREPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-DNDEBUG=1])
+ CPPFLAGS="${CPPFLAGS_ac} ${user_CPPFLAGS}"
+ ]
+ )
+ ]
+)
+
+AS_UNSET([enabled_sanitizers])
+TESTS_ENVIRONMENT_ac=""
+AM_ASAN_OPTIONS=""
+AM_UBSAN_OPTIONS=""
+AM_LSAN_OPTIONS=""
+AS_UNSET([ASAN_OPTIONS])
+AS_UNSET([UBSAN_OPTIONS])
+AS_UNSET([LSAN_OPTIONS])
+
+AC_MSG_CHECKING([whether to enable run-time sanitizers])
+AC_ARG_ENABLE([sanitizers],
+ [AS_HELP_STRING([[--enable-sanitizers[=address,undefined,leak,user-poison]]],
+ [enable run-time sanitizers, specify the list of types of sanitizers to enable, ]
+ [leave the list empty (or set to "auto") to enable all supported and available ]
+ [sanitizers, or specify "auto-fallback" to use sanitizers even without ]
+ [installed sanitizer run-time library])],
+ [], [AS_CASE([${enable_build_type}],[debug],
+ [enable_sanitizers='auto-optional'],[enable_sanitizers='no'])]
+)
+AS_IF([test "x${enable_sanitizers}" = "x"], [enable_sanitizers="auto"])
+AS_VAR_IF([enable_sanitizers], ["yes"], [enable_sanitizers="auto"])
+AS_VAR_IF([enable_sanitizers], ["autofallback"], [enable_sanitizers="auto-fallback"])
+AS_VAR_IF([enable_sanitizers], ["autooptional"], [enable_sanitizers="auto-optional"])
+AS_IF([test "x${enable_sanitizers}" = "xno"],
+ [
+ enable_sanitizers="no"
+ enable_san_address="no"
+ enable_san_undef="no"
+ enable_san_leak="no"
+ enable_san_upoison="no"
+ ],
+ [test "x${enable_sanitizers}" = "xauto" || test "x${enable_sanitizers}" = "xauto-optional"],
+ [
+ AS_VAR_IF([enable_compiler_hardening],["yes"],
+ [
+ AS_VAR_IF([enable_sanitizers],["auto"],
+ [AC_MSG_ERROR([sanitizers cannot be enabled with compiler hardnening])],
+ [AC_MSG_WARN([sanitizers cannot be enabled with compiler hardnening])]
+ )
+ enable_sanitizers="no"
+ enable_san_address="no"
+ enable_san_undef="no"
+ enable_san_leak="no"
+ enable_san_upoison="no"
+ ],
+ [
+ enable_san_address="auto"
+ enable_san_undef="auto"
+ enable_san_leak="auto"
+ enable_san_upoison="auto"
+ ]
+ )
+ ],
+ [test "x${enable_sanitizers}" = "xauto-fallback"],
+ [
+ enable_san_address="auto"
+ enable_san_undef="auto-fallback"
+ enable_san_leak="auto"
+ enable_san_upoison="auto"
+ ],
+ [
+ AS_UNSET([san])
+ enable_san_address="no"
+ enable_san_undef="no"
+ enable_san_leak="no"
+ enable_san_upoison="no"
+ f][or san in `AS_ECHO([${enable_sanitizers}]) | tr ',' ' '`
+ do
+ AS_CASE([$san],
+ [address], [enable_san_address="yes"],
+ [undefined], [enable_san_undef="yes"],
+ [leak], [enable_san_leak="yes"],
+ [user-poison|user_poison], [enable_san_upoison="yes"],
+ [no|yes|auto|auto-fallback|autofallback], [AC_MSG_ERROR(["$san" cannot be used with other options for --enable-sanitizers=])],
+ [AC_MSG_ERROR([Unknown parameter "$san" for --enable-sanitizers=])]
+ )
+ done
+ AS_IF([test "x${enable_san_upoison}" = "xyes" && test "x${enable_san_address}" = "xno"],
+ [AC_MSG_ERROR([User memory poisoning cannot be used without address sanitizer])]
+ )
+ enable_sanitizers="selected"
+ ]
+)
+AS_CASE([${enable_sanitizers}],
+ [selected], [AC_MSG_RESULT([selected])],
+ [auto], [AC_MSG_RESULT([yes, detect and use supported sanitizers])],
+ [auto-fallback], [AC_MSG_RESULT([yes, detect and use supported sanitizers even without run-time lib])],
+ [auto-optional], [AC_MSG_RESULT([yes, detect and use supported sanitizers if any])],
+ [AC_MSG_RESULT([no])]
+)
+AS_VAR_IF([enable_sanitizers], ["no"], [:],
+ [
+ AS_UNSET([san_FLAGS]) # the sanitizer flags to be added to both CFLAGS and LDFLAGS
+ AS_UNSET([san_CFLAGS]) # the sanitizer flags to be added to CFLAGS
+ AC_CACHE_CHECK([whether '-fsanitize=' works for $CC],
+ [mhd_cv_cc_sanitizer_works],
+ [
+ CFLAGS="${CFLAGS_ac} -fsanitize=wrongFeatureName ${user_CFLAGS}"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+ [mhd_cv_cc_sanitizer_works=no], [mhd_cv_cc_sanitizer_works=yes])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_works], ["yes"],
+ [
+ AS_VAR_IF([enable_san_address], ["no"], [:],
+ [
+ AC_CACHE_CHECK([for address sanitizer], [mhd_cv_cc_sanitizer_address],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} -fsanitize=address ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [mhd_cv_cc_sanitizer_address=yes], [mhd_cv_cc_sanitizer_address=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_address],["yes"],
+ [
+ AC_DEFINE([MHD_ASAN_ACTIVE], [1], [Define to '1' if you have address sanitizer enabled])
+ AX_APPEND_FLAG([-fsanitize=address], [san_FLAGS])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }address"
+ AS_VAR_IF([enable_san_leak], ["no"], [:],
+ [
+ AC_CACHE_CHECK([whether leak detect is not rejected by address sanitizer], [mhd_cv_cc_sanitizer_address_leak],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} ${user_CFLAGS}"
+ ASAN_OPTIONS="exitcode=88:detect_leaks=1:halt_on_error=1"
+ export ASAN_OPTIONS
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([],[])],
+ [mhd_cv_cc_sanitizer_address_leak=yes], [mhd_cv_cc_sanitizer_address_leak=no],
+ [
+ # Cross-compiling with sanitizers?
+ mhd_cv_cc_sanitizer_address_leak='assuming no'
+ ]
+ )
+ AS_UNSET([ASAN_OPTIONS])
+ ]
+ )
+ ]
+ )
+ AC_CACHE_CHECK([for pointer compare sanitizer], [mhd_cv_cc_sanitizer_pointer_compare],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} -fsanitize=pointer-compare ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [mhd_cv_cc_sanitizer_pointer_compare=yes], [mhd_cv_cc_sanitizer_pointer_compare=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_pointer_compare],["yes"],
+ [
+ AX_APPEND_FLAG([-fsanitize=pointer-compare], [san_FLAGS])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }pointer compare"
+ ]
+ )
+ AC_CACHE_CHECK([for pointer subtract sanitizer], [mhd_cv_cc_sanitizer_pointer_subtract],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} -fsanitize=pointer-subtract ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [mhd_cv_cc_sanitizer_pointer_subtract=yes], [mhd_cv_cc_sanitizer_pointer_subtract=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_pointer_subtract],["yes"],
+ [
+ AX_APPEND_FLAG([-fsanitize=pointer-subtract], [san_FLAGS])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }pointer subtract"
+ ]
+ )
+ AS_VAR_IF([enable_san_upoison], ["no"], [:],
+ [
+ AC_CHECK_HEADERS([sanitizer/asan_interface.h], [], [], [AC_INCLUDES_DEFAULT])
+ AS_VAR_IF([ac_cv_header_sanitizer_asan_interface_h],["yes"],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} ${errattr_CFLAGS} ${user_CFLAGS}"
+ MHD_CHECK_FUNC([__asan_address_is_poisoned],[[#include <sanitizer/asan_interface.h>]],
+ [[int a_var=1; i][f(__asan_address_is_poisoned((void*) &a_var)) return 3;]]
+ )
+ MHD_CHECK_FUNC([__asan_region_is_poisoned],[[#include <sanitizer/asan_interface.h>]],
+ [[int a_var=1; i][f(((void*) 0) != __asan_region_is_poisoned((void*) &a_var, sizeof(a_var))) return 3;]]
+ )
+ AC_CACHE_CHECK([whether special function attribute is needed for user-poison], [mhd_cv_func_u_p_attribute_needed],
+ [
+ ASAN_OPTIONS="exitcode=88:detect_invalid_pointer_pairs=3:halt_on_error=1"
+ export ASAN_OPTIONS
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} ${errattr_CFLAGS} ${user_CFLAGS}"
+ AC_RUN_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+#include <stdint.h>
+#include <stdlib.h>
+#include <sanitizer/asan_interface.h>
+
+static const size_t first_pos = 0;
+static const size_t mid_pos = 64;
+static const size_t last_pos = 128;
+static const size_t zone_size = 16;
+static const size_t buf_size = 128 + 16;
+
+static int ptr_compare(void *ptr1, uint8_t *ptr2)
+{
+ if ((((uintptr_t) (uint8_t *)ptr1) >= ((uintptr_t)ptr2)))
+ return ((char *) ptr1)[0] < ((char *) ptr2)[0];
+ return ((char *) ptr1)[0] > ((char *) ptr2)[0];
+}
+
+static int ptr_subtract(void *ptr1, uint8_t *ptr2)
+{
+ return ((size_t)(((uintptr_t)(uint8_t*)ptr1) - ((uintptr_t)ptr2))) <= last_pos;
+}
+
+int main(int argc, char *argv[])
+{
+ char *buf = (char*) malloc (buf_size);
+ char *a;
+ char *b;
+ int ret;
+
+ (void) argv;
+ if (NULL == buf)
+ return 10;
+ ASAN_POISON_MEMORY_REGION (buf + first_pos + zone_size, mid_pos - first_pos - zone_size);
+ ASAN_POISON_MEMORY_REGION (buf + mid_pos + zone_size, last_pos - mid_pos - zone_size);
+
+ if (0 < argc)
+ a = buf + last_pos;
+ else
+ a = buf + first_pos;
+ b = buf + mid_pos;
+
+ *a = '0';
+ *b = '9';
+
+ if (ptr_compare((void *)a, (uint8_t*) b))
+ {
+ if (ptr_subtract((void *)a, (uint8_t*) b))
+ ret = 0;
+ else
+ ret = 10;
+ }
+ else
+ ret = 5;
+ ASAN_UNPOISON_MEMORY_REGION (buf, buf_size);
+ free (buf);
+
+ return ret;
+}
+ ]]
+ )
+ ],
+ [mhd_cv_func_u_p_attribute_needed="no"], [mhd_cv_func_u_p_attribute_needed="yes"],
+ [
+ # Cross-compiling with sanitizers??
+ mhd_cv_func_up_attribute_needed='assuming no'
+ ]
+ )
+ AS_UNSET([ASAN_OPTIONS])
+ ]
+ )
+ ]
+ )
+ AS_VAR_IF([mhd_cv_func_u_p_attribute_needed],["yes"],[:],
+ [
+ AC_DEFINE([FUNC_PTRCOMPARE_CAST_WORKAROUND_WORKS],[1],[Define to '1' if cast to 'uintptr_t' works for safely processing user-poisoned pointer])
+ ]
+ )
+ AS_IF([test "x${mhd_cv_func_u_p_attribute_needed}" = "xyes" && test "x${ac_cv_header_sanitizer_asan_interface_h}" = "xyes"],
+ [
+ AC_CACHE_CHECK([whether '__attribute__((no_sanitize("pointer-compare")))' and '__attribute__((no_sanitize("pointer-subtract")))' work],
+ [mhd_cv_func_attribute_nosanitize_ptr],
+ [
+ ASAN_OPTIONS="exitcode=88:detect_invalid_pointer_pairs=3:halt_on_error=1"
+ export ASAN_OPTIONS
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} ${errattr_CFLAGS} ${user_CFLAGS}"
+ AC_RUN_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+#include <stdint.h>
+#include <stdlib.h>
+#include <sanitizer/asan_interface.h>
+
+static const size_t first_pos = 0;
+static const size_t mid_pos = 64;
+static const size_t last_pos = 128;
+static const size_t zone_size = 16;
+static const size_t buf_size = 128 + 16;
+
+__attribute__((no_sanitize("pointer-compare")))
+static int ptr_compare(void *ptr1, uint8_t *ptr2)
+{
+ if ((((const uint8_t*)ptr1) >= ((const uint8_t*)ptr2)))
+ return ((char *) ptr1)[0] < ((char *) ptr2)[0];
+ return ((char *) ptr1)[0] > ((char *) ptr2)[0];
+}
+
+__attribute__((no_sanitize("pointer-subtract")))
+static int ptr_subtract(void *ptr1, uint8_t *ptr2)
+{
+ return ((size_t)(((const uint8_t*)ptr1) - \
+ ((const uint8_t*)ptr2))) <= last_pos;
+}
+
+int main(int argc, char *argv[])
+{
+ char *buf = (char*) malloc (buf_size);
+ char *a;
+ char *b;
+ int ret;
+
+ (void) argv;
+ if (NULL == buf)
+ return 10;
+ ASAN_POISON_MEMORY_REGION (buf + first_pos + zone_size, mid_pos - first_pos - zone_size);
+ ASAN_POISON_MEMORY_REGION (buf + mid_pos + zone_size, last_pos - mid_pos - zone_size);
+
+ if (0 < argc)
+ a = buf + last_pos;
+ else
+ a = buf + first_pos;
+ b = buf + mid_pos;
+
+ *a = '0';
+ *b = '9';
+
+ if (ptr_compare((void *)a, (uint8_t*) b))
+ {
+ if (ptr_subtract((void *)a, (uint8_t*) b))
+ ret = 0;
+ else
+ ret = 10;
+ }
+ else
+ ret = 5;
+ ASAN_UNPOISON_MEMORY_REGION (buf, buf_size);
+ free (buf);
+
+ return ret;
+}
+ ]]
+ )
+ ],
+ [mhd_cv_func_attribute_nosanitize_ptr=yes], [mhd_cv_func_attribute_nosanitize_ptr=no],
+ [
+ # Cross-compiling with sanitizers??
+ mhd_cv_func_attribute_nosanitize_ptr='assuming no'
+ ]
+ )
+ AS_UNSET([ASAN_OPTIONS])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_func_attribute_nosanitize_ptr], ["yes"],
+ [
+ AC_DEFINE([FUNC_ATTR_PTRCOMPARE_WORKS],[1],[Define to '1' if '__attribute__((no_sanitize("pointer-compare")))' works])
+ AC_DEFINE([FUNC_ATTR_PTRSUBTRACT_WORKS],[1],[Define to '1' if '__attribute__((no_sanitize("pointer-subtract")))' works])
+ ],
+ [
+ AC_CACHE_CHECK([whether '__attribute__((no_sanitize("address")))' works for pointers compare], [mhd_cv_func_attribute_nosanitize_addr],
+ [
+ ASAN_OPTIONS="exitcode=88:detect_invalid_pointer_pairs=3:halt_on_error=1"
+ export ASAN_OPTIONS
+ CFLAGS="${CFLAGS_ac} ${san_CFLAGS} ${san_FLAGS} ${errattr_CFLAGS} ${user_CFLAGS}"
+ AC_RUN_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+#include <stdint.h>
+#include <stdlib.h>
+#include <sanitizer/asan_interface.h>
+
+static const size_t first_pos = 0;
+static const size_t mid_pos = 64;
+static const size_t last_pos = 128;
+static const size_t zone_size = 16;
+static const size_t buf_size = 128 + 16;
+
+__attribute__((no_sanitize("address")))
+static int ptr_compare(void *ptr1, uint8_t *ptr2)
+{
+ if ((((const uint8_t*)ptr1) >= ((const uint8_t*)ptr2)))
+ return ((char *) ptr1)[0] < ((char *) ptr2)[0];
+ return ((char *) ptr1)[0] > ((char *) ptr2)[0];
+}
+
+__attribute__((no_sanitize("address")))
+static int ptr_subtract(void *ptr1, uint8_t *ptr2)
+{
+ return ((size_t)(((const uint8_t*)ptr1) - \
+ ((const uint8_t*)ptr2))) <= last_pos;
+}
+
+int main(int argc, char *argv[])
+{
+ char *buf = (char*) malloc (buf_size);
+ char *a;
+ char *b;
+ int ret;
+
+ (void) argv;
+ if (NULL == buf)
+ return 10;
+ ASAN_POISON_MEMORY_REGION (buf + first_pos + zone_size, mid_pos - first_pos - zone_size);
+ ASAN_POISON_MEMORY_REGION (buf + mid_pos + zone_size, last_pos - mid_pos - zone_size);
+
+ if (0 < argc)
+ a = buf + last_pos;
+ else
+ a = buf + first_pos;
+ b = buf + mid_pos;
+
+ *a = '0';
+ *b = '9';
+
+ if (ptr_compare((void *)a, (uint8_t*) b))
+ {
+ if (ptr_subtract((void *)a, (uint8_t*) b))
+ ret = 0;
+ else
+ ret = 10;
+ }
+ else
+ ret = 5;
+ ASAN_UNPOISON_MEMORY_REGION (buf, buf_size);
+ free (buf);
+
+ return ret;
+}
+ ]]
+ )
+ ],
+ [mhd_cv_func_attribute_nosanitize_addr=yes], [mhd_cv_func_attribute_nosanitize_addr=no],
+ [
+ # Cross-compiling with sanitizers??
+ mhd_cv_func_attribute_nosanitize_addr='assuming no'
+ ]
+ )
+ AS_UNSET([ASAN_OPTIONS])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_func_attribute_nosanitize_addr], ["yes"],
+ [AC_DEFINE([FUNC_ATTR_NOSANITIZE_WORKS],[1],[Define to '1' if '__attribute__((no_sanitize("address")))' works for pointers compare])]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ AS_IF([test "x${enable_san_address}" = "xyes" && test "x${mhd_cv_cc_sanitizer_address}" != "xyes"],
+ [AC_MSG_ERROR([Address sanitizer cannot be enabled])]
+ )
+ enable_san_address="${mhd_cv_cc_sanitizer_address}"
+ ]
+ )
+ AS_VAR_IF([enable_san_undef], ["no"], [:],
+ [
+ dnl Ensure that '#' will be processed correctly
+ [
+ test_undf_prog='
+#include <stdio.h>
+
+static void func_out_b(char *arr)
+{
+ arr[0] = 0;
+ arr[16] = 2;
+}
+
+static unsigned int int_deref(void *ptr)
+{
+ return (*((unsigned int*)ptr)) + 2;
+}
+
+static int func1(void)
+{
+ char chr[16];
+ func_out_b (chr);
+ return (int) (int_deref(chr + 1) + int_deref(chr + 2));
+}
+
+int main(void)
+{
+ unsigned long ulvar;
+ signed char ch1;
+ ulvar = -1 * func1();
+ ch1 = ulvar * 6UL;
+ printf("%lu\n", ulvar + ch1);
+ return 0;
+}
+ '
+ ]
+ AC_CACHE_CHECK([for undefined behavior sanitizer], [mhd_cv_cc_sanitizer_undefined],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} -fsanitize=undefined ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
+ [mhd_cv_cc_sanitizer_undefined=yes], [mhd_cv_cc_sanitizer_undefined=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_undefined],["yes"],
+ [
+ AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
+ ],
+ [
+ AS_CASE([${enable_san_undef}], [yes|auto-fallback],
+ [
+ AC_CACHE_CHECK([for undefined behavior sanitizer with '-fsanitize-undefined-trap-on-error'], [mhd_cv_cc_sanitizer_undefined_trap],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} -fsanitize=undefined -fsanitize-undefined-trap-on-error ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
+ [mhd_cv_cc_sanitizer_undefined_trap=yes], [mhd_cv_cc_sanitizer_undefined_trap=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_undefined_trap], ["yes"],
+ [
+ AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
+ AX_APPEND_FLAG([-fsanitize-undefined-trap-on-error], [san_FLAGS])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
+ AC_MSG_WARN([Enabled sanitizer without run-time library, error reporting will be limited])
+ ],
+ [
+ AS_IF([test -z "${enabled_sanitizers}"],
+ [
+ # Last resort
+ AC_CACHE_CHECK([for undefined behavior sanitizer with '-fsanitize-trap=all'], [mhd_cv_cc_sanitizer_undefined_trap_all],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} -fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([${test_undf_prog}])],
+ [mhd_cv_cc_sanitizer_undefined_trap_all=yes], [mhd_cv_cc_sanitizer_undefined_trap_all=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_undefined_trap_all],["yes"],
+ [
+ AX_APPEND_FLAG([-fsanitize=undefined], [san_FLAGS])
+ AX_APPEND_FLAG([-fsanitize-trap=all], [san_FLAGS])
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} -fsanitize=undefined -fsanitize-trap=all ${user_CFLAGS}"
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }undefined"
+ AC_MSG_WARN([Enabled sanitizer without run-time library, error reporting will be limited])
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ AS_CASE(["$enabled_sanitizers"], [*undefined],
+ [
+ AS_VAR_IF([mhd_cv_cc_sanitizer_undefined], ["yes"],[],
+ [
+ # A workaround for broken clang which is trying to use UBSan lib
+ # even when instructed to not use it
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
+ AX_APPEND_LINK_FLAGS([-fsanitize-trap=implicit-conversion],
+ [san_FLAGS], [], [AC_LANG_SOURCE([${test_undf_prog}])])
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ AS_CASE(["$enabled_sanitizers"], [*undefined],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
+ AX_APPEND_LINK_FLAGS([-fsanitize=bounds-strict -fsanitize=local-bounds -fsanitize=implicit-conversion -fsanitize=nullability-arg],
+ [san_CFLAGS], [], [AC_LANG_SOURCE([${test_undf_prog}])])
+ ]
+ )
+ AS_UNSET([test_undf_prog])
+ AS_CASE(["$enabled_sanitizers"],
+ [*undefined], [enable_san_undef="yes"],
+ [
+ AS_VAR_IF([enable_san_undef], [yes], [AC_MSG_ERROR([Undefined behavior sanitizer cannot be enabled])])
+ enable_san_undef="no"
+ ]
+ )
+ ]
+ )
+ AS_VAR_IF([enable_san_leak], ["no"], [:],
+ [
+ AC_CACHE_CHECK([for leak sanitizer], [mhd_cv_cc_sanitizer_leak],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} -fsanitize=leak ${user_CFLAGS}"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [mhd_cv_cc_sanitizer_leak=yes], [mhd_cv_cc_sanitizer_leak=no])
+ ]
+ )
+ AS_VAR_IF([mhd_cv_cc_sanitizer_leak],["yes"],
+ [
+ AX_APPEND_FLAG([-fsanitize=leak], [san_FLAGS])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }leak"
+ ]
+ )
+ AS_IF([test "x${enable_san_leak}" = "xyes" && test "x${mhd_cv_cc_sanitizer_leak}" != "xyes"],
+ [AC_MSG_ERROR([User poison cannot be enabled])]
+ )
+ enable_san_leak="${mhd_cv_cc_sanitizer_leak}"
+ ]
+ )
+ AS_IF([test -z "${enabled_sanitizers}"],
+ [
+ AS_VAR_IF([enable_sanitizers], ["auto-optional"],
+ [
+ san_FLAGS=""
+ san_CFLAGS=""
+ ],
+ [
+ AC_MSG_ERROR([cannot find any sanitizer supported by $CC])
+ ]
+ )
+ ],
+ [
+ AS_VAR_IF([enable_san_upoison], ["no"], [:],
+ [
+ AC_MSG_CHECKING([whether to enable user memory poisoning])
+ AS_IF([test "x${mhd_cv_cc_sanitizer_address}" = "xyes" && test "x${ac_cv_header_sanitizer_asan_interface_h}" = "xyes" && \
+ (test "x${mhd_cv_func_u_p_attribute_needed}" != "xyes" || test "x${mhd_cv_func_attribute_nosanitize_ptr}" = "xyes" || \
+ test "x${mhd_cv_func_attribute_nosanitize_addr}" = "xyes")],
+ [
+ AC_DEFINE([MHD_ASAN_POISON_ACTIVE], [1], [Define to '1' if user memory poison is used])
+ enabled_sanitizers="${enabled_sanitizers}${enabled_sanitizers:+, }user-poison"
+ enable_san_upoison="yes"
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ AS_VAR_IF([enable_san_upoison], ["yes"],
+ [AC_MSG_ERROR([User memory poisoning cannot be enabled])])
+ enable_san_upoison="no"
+ ]
+ )
+ ]
+ )
+ AS_VAR_IF([enable_san_address], ["yes"],
+ [
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
+ AC_CHECK_DECL([_FORTIFY_SOURCE],
+ [MHD_APPEND_FLAG_TO_VAR([CPPFLAGS_ac],[-U_FORTIFY_SOURCE])],
+ [],[/* no includes */])
+ AX_APPEND_FLAG([-D_FORTIFY_SOURCE=0], [san_CFLAGS])
+ ],
+ [
+ AS_CASE([$enable_sanitizers], [auto|auto-fallback],
+ [AC_MSG_WARN([$CC does not support address sanitizer])])
+ ]
+ )
+ CFLAGS="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS} ${user_CFLAGS}"
+ # Always stop on sanitizer error
+ AX_APPEND_COMPILE_FLAGS([-fno-sanitize-recover=all], [san_CFLAGS])
+ # Get a better output for sanitizers error reporting
+ AX_APPEND_COMPILE_FLAGS([-fno-omit-frame-pointer -fno-optimize-sibling-calls],
+ [san_CFLAGS])
+ AS_VAR_IF([enable_san_address], ["yes"],
+ [
+ AM_ASAN_OPTIONS="exitcode=88:strict_string_checks=1:detect_stack_use_after_return=1"
+ AM_ASAN_OPTIONS="${AM_ASAN_OPTIONS}:check_initialization_order=1:strict_init_order=1:redzone=64"
+ AM_ASAN_OPTIONS="${AM_ASAN_OPTIONS}:max_free_fill_size=1024:detect_invalid_pointer_pairs=3"
+ AM_ASAN_OPTIONS="${AM_ASAN_OPTIONS}:handle_ioctl=1:halt_on_error=1"
+ AS_VAR_IF([enable_san_upoison], ["yes"], [AM_ASAN_OPTIONS="${AM_ASAN_OPTIONS}:allow_user_poisoning=1"])
+ AS_VAR_IF([enable_san_leak], ["yes"],
+ [AS_VAR_IF([mhd_cv_cc_sanitizer_address_leak], ["yes"],
+ [AM_ASAN_OPTIONS="${AM_ASAN_OPTIONS}:detect_leaks=1"])
+ ], [AM_ASAN_OPTIONS="${AM_ASAN_OPTIONS}:detect_leaks=0"]
+ )
+ ]
+ )
+ AS_VAR_IF([enable_san_undef], [yes],
+ [AM_UBSAN_OPTIONS="exitcode=87:print_stacktrace=1:halt_on_error=1"])
+ AS_VAR_IF([enable_san_leak], ["yes"],
+ [AM_LSAN_OPTIONS="use_unaligned=1"]
+ )
+ TESTS_ENVIRONMENT_ac='\
+ ASAN_OPTIONS="$(AM_ASAN_OPTIONS)" ; export ASAN_OPTIONS ; \
+ UBSAN_OPTIONS="$(AM_UBSAN_OPTIONS)" ; export UBSAN_OPTIONS ; \
+ LSAN_OPTIONS="$(AM_LSAN_OPTIONS)" ; export LSAN_OPTIONS ;'
+ ]
+ )
+ ]
+ )
+ CFLAGS_ac="${CFLAGS_ac} ${san_FLAGS} ${san_CFLAGS}"
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ]
+)
+
+# fuzzing tests
+run_zzuf_tests="no"
+zzuf_socat_mandatory="no"
+AS_VAR_IF([use_heavy_tests],["yes"],
+ [
+ AS_VAR_IF([enable_curl],["yes"],
+ [
+ AC_PATH_PROG([ZZUF],[zzuf],[no])
+ AS_VAR_IF([ZZUF],["no"],
+ [
+ run_zzuf_tests="no"
+ run_zzuf_tests_MSG="no, zzuf tool not found"
+ ],
+ [
+ AC_PATH_PROG([SOCAT],[socat],[no])
+ AS_IF([test "x${ac_cv_func_accept4}" = "xyes" && test "x${enable_asserts}" = "xno"],
+ [
+ zzuf_socat_mandatory="yes"
+ AS_VAR_IF([SOCAT],["no"],
+ [run_zzuf_tests_MSG="no, socat not found, but required for fuzzing tests on this platform without asserts enabled"],
+ [
+ run_zzuf_tests="yes"
+ run_zzuf_tests_MSG="yes, with zzuf and socat tools"
+ ]
+ )
+ ],
+ [test -n "${enabled_sanitizers}"],
+ [
+ zzuf_socat_mandatory="yes"
+ AS_VAR_IF([SOCAT],["no"],
+ [run_zzuf_tests_MSG="no, socat not found, but required for fuzzing tests when sanitizers enabled"],
+ [
+ run_zzuf_tests="yes"
+ run_zzuf_tests_MSG="yes, with zzuf and socat tools"
+ ]
+ )
+ ],
+ [
+ run_zzuf_tests="yes"
+ run_zzuf_tests_MSG="yes, with zzuf tool"
+ ]
+ )
+ ]
+ )
+ ],
+ [
+ run_zzuf_tests="no"
+ run_zzuf_tests_MSG="no, tests with libcurl are not enabled"
+ ]
+ )
+ ],
+ [
+ run_zzuf_tests="no"
+ run_zzuf_tests_MSG="no, heavy tests are not enabled"
+ ]
+)
+AM_CONDITIONAL([RUN_ZZUF_TESTS],[test "x$run_zzuf_tests" = "xyes"])
+AM_CONDITIONAL([FORCE_USE_ZZUF_SOCAT],[test "x$zzuf_socat_mandatory" = "xyes"])
+
+# Final flags that may interfere with autoconf detections
+AS_CASE([${enable_build_type}],[debug|debugger],
+ [ # Debug build or build for walking with debugger
+ CFLAGS="${user_CFLAGS}"
+ MHD_CHECK_ADD_CC_CFLAGS([-Wextra-semi -Wextra-semi-stmt], [CFLAGS_ac])
+ CFLAGS="${CFLAGS_ac} ${user_CFLAGS}"
+ ]
+)
+
+AM_CONDITIONAL([USE_SANITIZERS],
+ [test -n "$enabled_sanitizers" && test "x$mhd_cv_cc_sanitizer_works" = "xyes"])
+AC_SUBST([AM_ASAN_OPTIONS])
+AC_SUBST([AM_UBSAN_OPTIONS])
+AC_SUBST([AM_LSAN_OPTIONS])
+AC_SUBST([TESTS_ENVIRONMENT_ac])
+
+MHD_LIB_LDFLAGS="$MHD_LIB_LDFLAGS"
+
+AC_SUBST([CPU_COUNT])
+AC_SUBST([HEAVY_TESTS_NOTPARALLEL])
+AM_SUBST_NOTMAKE([HEAVY_TESTS_NOTPARALLEL])
+AC_SUBST(MHD_LIB_CPPFLAGS)
+AC_SUBST(MHD_LIB_CFLAGS)
+AC_SUBST(MHD_LIB_LDFLAGS)
+AC_SUBST(MHD_LIBDEPS)
+AC_SUBST(MHD_TLS_LIB_CPPFLAGS)
+AC_SUBST(MHD_TLS_LIB_CFLAGS)
+AC_SUBST(MHD_TLS_LIB_LDFLAGS)
+AC_SUBST(MHD_TLS_LIBDEPS)
+
+# for pkg-config
+AC_SUBST([MHD_REQ_PRIVATE])
+AC_SUBST([MHD_LIBDEPS_PKGCFG])
+
+# Restore flags as set by the user
+CFLAGS="${user_CFLAGS}"
+LDFLAGS="${user_LDFLAGS}"
+CPPFLAGS="${user_CPPFLAGS}"
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
+AC_SUBST([CPPFLAGS])
+AC_SUBST([LIBS])
+
+# Configure-defined flags
+AC_SUBST([CFLAGS_ac])
+AC_SUBST([LDFLAGS_ac])
+AC_SUBST([CPPFLAGS_ac])
+
+# Used for 'po' directory staff
+AC_SUBST([ac_configure_args])
+AC_SUBST([EMPTY_VAR],[])
+AC_SUBST([MHD_AUX_DIR])
+AC_CONFIG_FILES([po/po-configure.ac])
+AC_CONFIG_COMMANDS([po/Makefile.in],
+ [
+ echo "Skipping update of po/Makefile.in"
+ echo "Real update of po/Makefile.in for 'make dist' is performed by po-config.status"
+ ]
+)
+AC_CONFIG_COMMANDS([po-directories],
+ [
+ echo "Skipping po-directories command."
+ echo "Real po-directories command for 'make dist' is implemented in po-config.status"
+ ]
+)
+
+# We define the paths here, because MinGW/GCC expands paths
+# passed through the command line ("-DDIR=..."). This would
+# lead to hard-coded paths ("C:\mingw\mingw\bin...") that do
+# not contain the actual installation.
+AC_DEFINE_DIR([MHD_PLUGIN_INSTALL_PREFIX], [libdir/libmicrohttpd], [tls plugins])
+
+AC_SUBST([ZZUF])
+AC_SUBST([SOCAT])
+
+# should experimental code be compiled (code that may not yet compile)?
+AC_MSG_CHECKING(whether to compile experimental code)
+AC_ARG_ENABLE([experimental],
+ [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])],
+ [enable_experimental=${enableval}],
+ [enable_experimental=no])
+AC_MSG_RESULT($enable_experimental)
+AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
+
+
+AC_CONFIG_FILES([
+libmicrohttpd.pc
+Makefile
+contrib/Makefile
+doc/Makefile
+doc/doxygen/libmicrohttpd.doxy
+doc/doxygen/Makefile
+m4/Makefile
+src/Makefile
+src/include/Makefile
+])
+AC_OUTPUT
+
+# Finally: summary
+# Format flags without extra spaces for visual beauty
+fin_CPPFLAGS="$user_CPPFLAGS"
+fin_CFLAGS="$user_CFLAGS"
+fin_LDFLAGS="$user_LDFLAGS"
+MHD_PREPEND_FLAG_TO_VAR([fin_CPPFLAGS],[$CPPFLAGS_ac])
+MHD_PREPEND_FLAG_TO_VAR([fin_CFLAGS],[$CFLAGS_ac])
+MHD_PREPEND_FLAG_TO_VAR([fin_LDFLAGS],[$LDFLAGS_ac])
+fin_lib_CPPFLAGS="$user_CPPFLAGS"
+fin_lib_CFLAGS="$user_CFLAGS"
+fin_lib_LDFLAGS="$user_LDFLAGS"
+MHD_PREPEND_FLAG_TO_VAR([fin_lib_CPPFLAGS],[$MHD_LIB_CPPFLAGS])
+MHD_PREPEND_FLAG_TO_VAR([fin_lib_CFLAGS],[$MHD_LIB_CFLAGS])
+MHD_PREPEND_FLAG_TO_VAR([fin_lib_LDFLAGS],[$MHD_LIB_LDFLAGS])
+MHD_PREPEND_FLAG_TO_VAR([fin_lib_CPPFLAGS],[$CPPFLAGS_ac])
+MHD_PREPEND_FLAG_TO_VAR([fin_lib_CFLAGS],[$CFLAGS_ac])
+MHD_PREPEND_FLAG_TO_VAR([fin_lib_LDFLAGS],[$LDFLAGS_ac])
+AC_MSG_NOTICE([Toolchain settings:
+ CC=$CC
+ User/system/default flags:
+ CPPFLAGS="$user_CPPFLAGS"
+ CFLAGS= "$user_CFLAGS"
+ LDFLAGS= "$user_LDFLAGS"
+ Final set of the flags for tests and examples:
+ CPPFLAGS="$fin_CPPFLAGS"
+ CFLAGS= "$fin_CFLAGS"
+ LDFLAGS= "$fin_LDFLAGS"
+ Final set of the flags for ${PACKAGE_NAME} library:
+ CPPFLAGS="$fin_lib_CPPFLAGS"
+ CFLAGS= "$fin_lib_CFLAGS"
+ LDFLAGS= "$fin_lib_LDFLAGS"
+])
+AS_UNSET([fin_CPPFLAGS])
+AS_UNSET([fin_CFLAGS])
+AS_UNSET([fin_LDFLAGS])
+AS_UNSET([fin_lib_CPPFLAGS])
+AS_UNSET([fin_lib_CFLAGS])
+AS_UNSET([fin_lib_LDFLAGS])
+
+AS_VAR_IF([os_is_windows], ["yes"],
+ [os_ver_msg="
+ Target W32 ver: ${mhd_w32_ver_msg}"], [AS_UNSET([[os_ver_msg]])])
+
+
+AC_MSG_NOTICE([GNU libmicrohttpd ${PACKAGE_VERSION} Configuration Summary:
+ Target directory: ${prefix}
+ Cross-compiling: ${cross_compiling}
+ Operating System: ${mhd_host_os}${os_ver_msg}
+ Threading lib: ${USE_THREADS}
+ Inter-thread comm: ${use_itc}
+ Shutdown of listening socket triggers select: ${mhd_cv_host_shtdwn_trgr_select}
+ poll support: ${enable_poll=no}
+ epoll support: ${enable_epoll=no}
+ sendfile used: ${found_sendfile}
+ HTTPS support: ${MSG_HTTPS}
+ Messages: ${enable_messages}
+ Cookie parsing: ${enable_cookie}
+ Postproc: ${enable_postprocessor}
+ Basic auth.: ${enable_bauth}
+ Digest auth.: ${enable_dauth}
+ Digest auth. defaults: ${dauth_defs_MSG}
+ MD5: ${enable_md5_MSG}
+ SHA-256: ${enable_sha256_MSG}
+ SHA-512/256: ${enable_sha512_256_MSG}
+ HTTP "Upgrade": ${enable_httpupgrade}
+ Compact code: ${enable_compact_code} (${compact_code_MSG})
+ Use thread names: ${enable_thread_names}
+ Use debug asserts: ${use_asserts_MSG=no}
+ Use sanitizers: ${enabled_sanitizers:=no}
+ Build static lib: ${enable_static}
+ Build shared lib: ${enable_shared}
+ Build docs: ${enable_doc}
+ Build examples: ${enable_examples}
+ Build tools: ${enable_examples}
+ Test with libcurl: ${MSG_CURL}
+ Heavy tests: ${use_heavy_tests_MSG}
+ Fuzzing tests: ${run_zzuf_tests_MSG=no}
+])
+
+AS_IF([test "x$enable_https" = "xyes"],
+ [AC_MSG_NOTICE([HTTPS subsystem configuration:
+ License : LGPL version 2.1 or any later version
+ ])],
+ [AC_MSG_NOTICE([
+ License : LGPLv2.1+ or eCos
+ ])])
+
+AS_IF([test "x$enable_bauth" != "xyes" || \
+ test "x$enable_dauth" != "xyes" || \
+ test "x${enable_md5}" = "xno" || \
+ test "x${enable_sha256}" = "xno" || \
+ test "x${enable_sha512_256}" != "xyes" || \
+ test "x${USE_THREADS}" = "xnone" || \
+ test "x$enable_httpupgrade" != "xyes" || \
+ test "x$enable_cookie" != "xyes" || \
+ test "x$enable_httpupgrade" != "xyes" || \
+ test "x$enable_postprocessor" != "xyes"],
+ [AC_MSG_WARN([This will be a custom build with missing symbols. Do NOT use this build in a distribution. Building with these kinds of configure options is only for custom builds for embedded systems.])]
+)
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
@@ -0,0 +1,2 @@
+# This Makefile.am is in the public domain
+EXTRA_DIST = xcc ascebc mhd.png mhd.svg mhd_logo.png
diff --git a/contrib/ascebc b/contrib/ascebc
@@ -0,0 +1,11 @@
+#!/bin/sh
+iconv -f UTF-8 -t IBM-1047 $1 > temp.file
+if test -x $1
+then
+ rm $1
+ mv temp.file $1
+ chmod +x $1
+else
+ rm $1
+ mv temp.file $1
+fi
diff --git a/contrib/coverage.sh b/contrib/coverage.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# make sure configure was run with coverage enabled...
+lcov --directory . --zerocounters
+make check
+rm `find * -name "*_test.gc??"` `find src/testcurl -name "*.gc??"` `find src/testzzuf -name "*.gc??"` `find src/examples -name "*.gc??"`
+for n in `find * -name "*.gc*" | grep libs`
+do
+ cd `dirname $n`
+ mv `basename $n` ..
+ cd -
+done
+lcov --directory . --capture --output-file app.info
+mkdir /tmp/coverage
+genhtml -o /tmp/coverage app.info
diff --git a/contrib/fixes-autoconf/apply-all.sh b/contrib/fixes-autoconf/apply-all.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+#
+# This file applies optional Autoconf patches for better MSys2 and new
+# compiler compatibility.
+#
+# Based on Debian SID baseline files as of April 2023.
+#
+
+patchesdir=$(dirname $BASH_SOURCE) || exit 2
+test -n "$patchesdir" || exit 2
+cd "$patchesdir" || exit 2
+patchesdir=$(pwd) || exit 2
+
+patches=(
+ # No patches currently
+)
+
+failed=( )
+
+cd "${patchesdir}/../.." || exit 1
+
+patch_params="-Nf -p1 --no-backup-if-mismatch -r - --read-only=fail"
+
+for patch in ${patches[@]}; do
+ patchfile="${patchesdir}/${patch}"
+ echo "*** Applying $patch..."
+ if echo "$patch_data" | patch $patch_params -i "$patchfile"
+ then
+ echo "** $patch successfully applied."
+ else
+ echo "** $patch failed."
+ failed+=("$patch")
+ fi
+ unset patch_data
+done
+
+
+addl_file="c_backported.m4"
+echo "*** Copying $addl_file"
+cp -fT "${patchesdir}/$addl_file" "m4/$addl_file" || exit 2
+echo "$addl_file copied."
+
+echo ''
+
+if [[ -n "${failed[@]}" ]]; then
+ printf '* Failed patch: %s\n' "${failed[@]}" >&2
+ exit 2
+else
+ echo "* All patches have been successfully applied."
+fi
+
+exit 0
diff --git a/contrib/fixes-autoconf/c_backported.m4 b/contrib/fixes-autoconf/c_backported.m4
@@ -0,0 +1,567 @@
+# Backported macros from autoconf git master + a few custom patches
+
+# This file is part of Autoconf. -*- Autoconf -*-
+# Programming languages support.
+# Copyright (C) 2001-2017, 2020-2023 Free Software Foundation, Inc.
+
+# This file is part of Autoconf. This program is free
+# software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# Under Section 7 of GPL version 3, you are granted additional
+# permissions described in the Autoconf Configure Script Exception,
+# version 3.0, as published by the Free Software Foundation.
+#
+# You should have received a copy of the GNU General Public License
+# and a copy of the Autoconf Configure Script Exception along with
+# this program; see the files COPYINGv3 and COPYING.EXCEPTION
+# respectively. If not, see <https://www.gnu.org/licenses/>.
+
+# Written by David MacKenzie, with help from
+# Akim Demaille, Paul Eggert,
+# François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+# ---- Backported macros only ----
+
+AC_DEFUN([_AC_C_C89_TEST_GLOBALS],
+[m4_divert_text([INIT_PREPARE],
+[[# Test code for whether the C compiler supports C89 (global declarations)
+ac_c_conftest_c89_globals='
+/* Does the compiler advertise C89 conformance?
+ Do not test the value of __STDC__, because some compilers set it to 0
+ while being otherwise adequately conformant. */
+#if !defined __STDC__
+# error "Compiler does not advertise C89 conformance"
+#endif
+
+#include <stddef.h>
+#include <stdarg.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
+struct buf { int x; };
+struct buf * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (char **p, int i)
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* C89 style stringification. */
+#define noexpand_stringify(a) #a
+const char *stringified = noexpand_stringify(arbitrary+token=sequence);
+
+/* C89 style token pasting. Exercises some of the corner cases that
+ e.g. old MSVC gets wrong, but not very hard. */
+#define noexpand_concat(a,b) a##b
+#define expand_concat(a,b) noexpand_concat(a,b)
+extern int vA;
+extern int vbee;
+#define aye A
+#define bee B
+int *pvA = &expand_concat(v,aye);
+int *pvbee = &noexpand_concat(v,bee);
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not \xHH hex character constants.
+ These do not provoke an error unfortunately, instead are silently treated
+ as an "x". The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously \x00 != x always comes out true, for an
+ array size at least. It is necessary to write \x00 == 0 to get something
+ that is true only with -std. */
+int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) '\''x'\''
+int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
+ int, int);'
+]])])
+
+
+AC_DEFUN([_AC_C_C99_TEST_GLOBALS],
+[m4_divert_text([INIT_PREPARE],
+[[# Test code for whether the C compiler supports C99 (global declarations)
+ac_c_conftest_c99_globals='
+// Does the compiler advertise C99 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
+# error "Compiler does not advertise C99 conformance"
+#endif
+
+#include <stdbool.h>
+extern int puts (const char *);
+extern int printf (const char *, ...);
+extern int dprintf (int, const char *, ...);
+extern void *malloc (size_t);
+extern void free (void *);
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+// dprintf is used instead of fprintf to avoid needing to declare
+// FILE and stderr.
+#define debug(...) dprintf (2, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ #error "your preprocessor is broken"
+#endif
+#if BIG_OK
+#else
+ #error "your preprocessor is broken"
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static bool
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str = "";
+ int number = 0;
+ float fnumber = 0;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case '\''s'\'': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case '\''d'\'': // int
+ number = va_arg (args_copy, int);
+ break;
+ case '\''f'\'': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+
+ return *str && number && fnumber;
+}
+'
+]])])
+
+
+AC_DEFUN([_AC_C_C11_TEST_GLOBALS],
+[m4_divert_text([INIT_PREPARE],
+[[# Test code for whether the C compiler supports C11 (global declarations)
+ac_c_conftest_c11_globals='
+// Does the compiler advertise C11 conformance?
+#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
+# error "Compiler does not advertise C11 conformance"
+#endif
+
+// Check _Alignas.
+char _Alignas (double) aligned_as_double;
+char _Alignas (0) no_special_alignment;
+extern char aligned_as_int;
+char _Alignas (0) _Alignas (int) aligned_as_int;
+
+// Check _Alignof.
+enum
+{
+ int_alignment = _Alignof (int),
+ int_array_alignment = _Alignof (int[100]),
+ char_alignment = _Alignof (char)
+};
+_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
+
+// Check _Noreturn.
+_Noreturn int does_not_return (void) { for (;;) continue; }
+
+// Check _Static_assert.
+struct test_static_assert
+{
+ int x;
+ _Static_assert (sizeof (int) <= sizeof (long int),
+ "_Static_assert does not work in struct");
+ long int y;
+};
+
+// Check UTF-8 literals.
+#define u8 syntax error!
+char const utf8_literal[] = u8"happens to be ASCII" "another string";
+
+// Check duplicate typedefs.
+typedef long *long_ptr;
+typedef long int *long_ptr;
+typedef long_ptr long_ptr;
+
+// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
+struct anonymous
+{
+ union {
+ struct { int i; int j; };
+ struct { int k; long int l; } w;
+ };
+ int m;
+} v1;
+'
+]])])
+
+
+# AC_LANG_CALL(C)(PROLOGUE, FUNCTION)
+# -----------------------------------
+# Avoid conflicting decl of main.
+m4_define([AC_LANG_CALL(C)],
+[AC_LANG_PROGRAM([$1
+m4_if([$2], [main], ,
+[/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply.
+ The 'extern "C"' is for builds by C++ compilers;
+ although this is not generally supported in C code supporting it here
+ has little cost and some practical benefit (sr 110532). */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 (void);])], [return $2 ();])])
+
+
+# AC_LANG_FUNC_LINK_TRY(C)(FUNCTION)
+# ----------------------------------
+# Don't include <ctype.h> because on OSF/1 3.0 it includes
+# <sys/types.h> which includes <sys/select.h> which contains a
+# prototype for select. Similarly for bzero.
+#
+# This test used to merely assign f=$1 in main(), but that was
+# optimized away by HP unbundled cc A.05.36 for ia64 under +O3,
+# presumably on the basis that there's no need to do that store if the
+# program is about to exit. Conversely, the AIX linker optimizes an
+# unused external declaration that initializes f=$1. So this test
+# program has both an external initialization of f, and a use of f in
+# main that affects the exit status.
+#
+m4_define([AC_LANG_FUNC_LINK_TRY(C)],
+[AC_LANG_PROGRAM(
+[/* Define $1 to an innocuous variant, in case <limits.h> declares $1.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $1 innocuous_$1
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $1 (void); below. */
+
+#include <limits.h>
+#undef $1
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $1 (void);
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$1 || defined __stub___$1
+choke me
+#endif
+], [return $1 ();])])
+
+
+# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN],
+# [ACTION-IF-UNIVERSAL])
+# -------------------------------------------------------------------------
+AC_DEFUN([AC_C_BIGENDIAN],
+[AH_VERBATIM([WORDS_BIGENDIAN],
+[/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif])dnl
+ AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian],
+ [ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+ ]])],
+ [
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done])
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/param.h>
+ ]],
+ [[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+ ]])],
+ [# It does; now see whether it defined to BIG_ENDIAN or not.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/param.h>
+ ]],
+ [[#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+ ]])],
+ [ac_cv_c_bigendian=yes],
+ [ac_cv_c_bigendian=no])])
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ ]],
+ [[#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+ ]])],
+ [# It does; now see whether it defined to _BIG_ENDIAN or not.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ ]],
+ [[#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+ ]])],
+ [ac_cv_c_bigendian=yes],
+ [ac_cv_c_bigendian=no])])
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ [[
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+ ]])],
+ [ac_cv_c_bigendian=no],
+ [ac_cv_c_bigendian=yes],
+ [# Try to guess by grepping values from an object file.
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[unsigned short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ unsigned short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ unsigned short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ unsigned short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ int
+ main (int argc, char **argv)
+ {
+ /* Intimidate the compiler so that it does not
+ optimize the arrays away. */
+ char *p = argv[0];
+ ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
+ ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
+ return use_ascii (argc) == use_ebcdic (*p);
+ }]])],
+ [if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi])])
+ fi])
+ case $ac_cv_c_bigendian in #(
+ yes)
+ m4_default([$1],
+ [AC_DEFINE([WORDS_BIGENDIAN], 1)]);; #(
+ no)
+ $2 ;; #(
+ universal)
+dnl Note that AC_APPLE_UNIVERSAL_BUILD sorts less than WORDS_BIGENDIAN;
+dnl this is a necessity for proper config header operation. Warn if
+dnl the user did not specify a config header but is relying on the
+dnl default behavior for universal builds.
+ m4_default([$4],
+ [AC_CONFIG_COMMANDS_PRE([m4_ifset([AH_HEADER], [],
+ [m4_warn([obsolete],
+ [AC_C_BIGENDIAN should be used with AC_CONFIG_HEADERS])])])dnl
+ AC_DEFINE([AC_APPLE_UNIVERSAL_BUILD],1,
+ [Define if building universal (internal helper macro)])])
+ ;; #(
+ *)
+ m4_default([$3],
+ [AC_MSG_ERROR([unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help])]) ;;
+ esac
+])# AC_C_BIGENDIAN
+
+
+# AC_C_VARARRAYS
+# --------------
+# Check whether the C compiler supports variable-length arrays.
+AC_DEFUN([AC_C_VARARRAYS],
+[
+ AC_CACHE_CHECK([for variable-length arrays],
+ ac_cv_c_vararrays,
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+[[ #ifndef __STDC_NO_VLA__
+ #error __STDC_NO_VLA__ not defined
+ choke me now
+ #endif
+]])],
+ [ac_cv_c_vararrays='no: __STDC_NO_VLA__ is defined'],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Test for VLA support. This test is partly inspired
+ from examples in the C standard. Use at least two VLA
+ functions to detect the GCC 3.4.3 bug described in:
+ https://lists.gnu.org/archive/html/bug-gnulib/2014-08/msg00014.html
+ */
+ #ifdef __STDC_NO_VLA__
+ syntax error;
+ #else
+ extern int n;
+ static int B[100];
+ int fvla (int m, int C[m][m]);
+
+ static int
+ simple (int count, int all[static count])
+ {
+ return all[count - 1];
+ }
+
+ int
+ fvla (int m, int C[m][m])
+ {
+ typedef int VLA[m][m];
+ VLA x;
+ int D[m];
+ static int (*q)[m] = &B;
+ int (*s)[n] = q;
+ (void) simple;
+ return C && &x[0][0] == &D[0] && &D[0] == s[0];
+ }
+ #endif
+ ]])],
+ [ac_cv_c_vararrays=yes],
+ [ac_cv_c_vararrays=no])])])
+ if test "$ac_cv_c_vararrays" = yes; then
+ dnl This is for compatibility with Autoconf 2.61-2.69.
+ AC_DEFINE([HAVE_C_VARARRAYS], 1,
+ [Define to 1 if C supports variable-length arrays.])
+ elif test "$ac_cv_c_vararrays" = no; then
+ AC_DEFINE([__STDC_NO_VLA__], 1,
+ [Define to 1 if C does not support variable-length arrays, and
+ if the compiler does not already define this.])
+ fi
+])
+
diff --git a/contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch b/contrib/fixes-libtool/0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
@@ -0,0 +1,31 @@
+The patch below was modified to work on top of Debian patches
+
+[PATCH 3/6] Pass various runtime library flags to GCC.
+* build-aux/ltmain.in (func_mode_link): Pass the
+-shared-libgcc and -static-lib* flags along to GCC.
+
+diff -urN libtool-2.4.7/build-aux/ltmain.in.orig libtool-2.4.7/build-aux/ltmain.in
+--- libtool-2.4.7/build-aux/ltmain.in.orig 2022-05-25 13:57:50.311734300 +0200
++++ libtool-2.4.7/build-aux/ltmain.in 2022-05-25 14:01:54.621866600 +0200
+@@ -7559,15 +7559,19 @@
+ # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+ # -specs=* GCC specs files
+ # -stdlib=* select c++ std lib with clang
++ # -{shared,static}-libgcc, -static-{libgfortran|libstdc++}
++ # link against specified runtime library
+ # -fsanitize=* Clang/GCC memory and address sanitizer
+ # -fuse-ld=* Linker select flags for GCC
+- # -static-* direct GCC to link specific libraries statically
+ # -fcilkplus Cilk Plus language extension features for C/C++
+ # -Wa,* Pass flags directly to the assembler
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
+- -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus|-Wa,*)
++ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*|-ftree-parallelize-loops=*| \
++ -fcilkplus|-fgnu-tm|-ffast-math|-funsafe-math-optimizations| \
++ -fvtable-verify*|-shared-libgcc|-static-libgcc|-static-libgfortran| \
++ -static-libstdc++)
+ func_quote_arg pretty "$arg"
+ arg=$func_quote_arg_result
+ func_append compile_command " $arg"
diff --git a/contrib/fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch b/contrib/fixes-libtool/0006-Fix-strict-ansi-vs-posix.patch
@@ -0,0 +1,22 @@
+[PATCH 6/6] Fix STRICT_ANSI vs POSIX
+* build-aux/ltmain.in (func_mode_link): Also check for _POSIX
+as well as __STRICT_ANSI__ to avoid re-definitions.
+---
+ build-aux/ltmain.in | 4 +++-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index af46cb8..244bb5b 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -3382,7 +3382,7 @@
+
+ /* declarations of non-ANSI functions */
+ #if defined __MINGW32__
+-# ifdef __STRICT_ANSI__
++# if defined(__STRICT_ANSI__) && !defined(__MINGW64_VERSION_MAJOR) || defined(_POSIX_)
+ int _putenv (const char *);
+ # endif
+ #elif defined __CYGWIN__
+--
+1.7.0.2.msysgit.0
+\ No newline at end of file
diff --git a/contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch b/contrib/fixes-libtool/0009-libtool-2.4.2.418-msysize.patch
@@ -0,0 +1,1403 @@
+diff -urN libtool-2.4.7/build-aux/config.guess.orig libtool-2.4.7/build-aux/config.guess
+--- libtool-2.4.7/build-aux/config.guess.orig 2022-05-25 14:18:47.388587800 +0200
++++ libtool-2.4.7/build-aux/config.guess 2022-05-25 14:21:50.720326000 +0200
+@@ -950,6 +950,9 @@
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ GUESS=x86_64-pc-cygwin
+ ;;
++ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
++ GUESS=x86_64-pc-msys
++ ;;
+ prep*:SunOS:5.*:*)
+ SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+ GUESS=powerpcle-unknown-solaris2$SUN_REL
+
+diff -Naur libtool-2.4.3-orig/build-aux/ltmain.in libtool-2.4.3/build-aux/ltmain.in
+--- libtool-2.4.3-orig/build-aux/ltmain.in 2014-09-02 09:54:56.481600000 +0400
++++ libtool-2.4.3/build-aux/ltmain.in 2014-09-02 10:14:04.809600000 +0400
+@@ -497,7 +497,7 @@
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
++ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+@@ -1510,7 +1510,7 @@
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+- cygwin* | mingw* | pw32* | os2* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+@@ -2383,7 +2383,7 @@
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+@@ -2489,7 +2489,7 @@
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+- *cygwin* | *mingw*)
++ *cygwin* | *msys* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+@@ -2564,7 +2564,7 @@
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+- */usr/bin/install*,*cygwin*)
++ */usr/bin/install*,*cygwin*|*/usr/bin/install*,*msys*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+@@ -2717,7 +2717,7 @@
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+@@ -2729,7 +2729,7 @@
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+@@ -2743,7 +2743,7 @@
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+@@ -2918,7 +2918,7 @@
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+@@ -3811,7 +3811,7 @@
+ {
+ EOF
+ case $host in
+- *mingw* | *cygwin* )
++ *mingw* | *cygwin* | *msys* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+@@ -4567,7 +4567,7 @@
+ $debug_cmd
+
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+@@ -5060,7 +5060,7 @@
+ ;;
+ esac
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+@@ -5080,7 +5080,7 @@
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+@@ -5163,7 +5163,7 @@
+
+ -no-install)
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+@@ -6034,7 +6034,7 @@
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+@@ -6178,7 +6178,7 @@
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+- *cygwin* | *mingw* | *cegcc* | *os2*)
++ *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+@@ -6248,7 +6248,7 @@
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+- *cygwin* | mingw* | *cegcc* | *os2*)
++ *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+@@ -7123,7 +7123,7 @@
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+@@ -7637,7 +7637,7 @@
+
+ orig_export_symbols=
+ case $host_os in
+- cygwin* | mingw* | cegcc*)
++ cygwin* | msys* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+@@ -8194,7 +8194,7 @@
+
+ prog)
+ case $host in
+- *cygwin*) func_stripname '' '.exe' "$output"
++ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+@@ -8305,7 +8305,7 @@
+ esac
+ fi
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+@@ -8383,7 +8383,7 @@
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+- *cygwin* | *mingw* )
++ *cygwin* | *msys* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+@@ -8529,14 +8529,14 @@
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+- *cygwin*)
++ *cygwin* | *msys*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+- *cygwin* | *mingw* )
++ *cygwin* | *msys* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+@@ -8878,7 +8878,7 @@
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
++ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+
+diff -Naur libtool-2.4.2.418-orig/build-aux/ltmain.sh libtool-2.4.2.418/build-aux/ltmain.sh
+--- libtool-2.4.2.418-orig/build-aux/ltmain.sh 2013-10-27 02:53:58.000000000 +0400
++++ libtool-2.4.2.418/build-aux/ltmain.sh 2014-09-02 10:29:08.840800000 +0400
+@@ -2315,7 +2315,7 @@
+ case $host in
+ # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
+ # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
+- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
++ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+@@ -3328,7 +3328,7 @@
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+- cygwin* | mingw* | pw32* | os2* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+@@ -4201,7 +4201,7 @@
+ 'exit $?'
+ tstripme=$stripme
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=
+@@ -4307,7 +4307,7 @@
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+- *cygwin* | *mingw*)
++ *cygwin* | *msys* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+@@ -4382,7 +4382,7 @@
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+- */usr/bin/install*,*cygwin*)
++ */usr/bin/install*,*cygwin* | */usr/bin/install*,*msys*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+@@ -4535,7 +4535,7 @@
+ $RM $export_symbols
+ eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+@@ -4547,7 +4547,7 @@
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+@@ -4561,7 +4561,7 @@
+ func_basename "$dlprefile"
+ name=$func_basename_result
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ # if an import library, we need to obtain dlname
+ if func_win32_import_lib_p "$dlprefile"; then
+ func_tr_sh "$dlprefile"
+@@ -4736,7 +4736,7 @@
+ # Transform the symbol file into the correct name.
+ symfileobj=$output_objdir/${my_outputname}S.$objext
+ case $host in
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+@@ -5629,7 +5629,7 @@
+ {
+ EOF
+ case $host in
+- *mingw* | *cygwin* )
++ *mingw* | *cygwin* | *msys* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+@@ -6350,7 +6350,7 @@
+ $debug_cmd
+
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # what system we are compiling for in order to pass an extra
+@@ -6843,7 +6843,7 @@
+ ;;
+ esac
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+@@ -6863,7 +6863,7 @@
+ -l*)
+ if test X-lc = "X$arg" || test X-lm = "X$arg"; then
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+@@ -6946,7 +6946,7 @@
+
+ -no-install)
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "'-no-install' is ignored for $host"
+@@ -7812,7 +7812,7 @@
+ fi
+ case $host in
+ # special handling for platforms with PE-DLLs.
+- *cygwin* | *mingw* | *cegcc* )
++ *cygwin* | *msys* | *mingw* | *cegcc* )
+ # Linker will automatically link against shared library if both
+ # static and shared are present. Therefore, ensure we extract
+ # symbols from the import library if a shared library is present
+@@ -7956,7 +7956,7 @@
+ if test -n "$library_names" &&
+ { test no = "$use_static_libs" || test -z "$old_library"; }; then
+ case $host in
+- *cygwin* | *mingw* | *cegcc* | *os2*)
++ *cygwin* | *msys* | *mingw* | *cegcc* | *os2*)
+ # No point in relinking DLLs because paths are not encoded
+ func_append notinst_deplibs " $lib"
+ need_relink=no
+@@ -8026,7 +8026,7 @@
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+- *cygwin* | mingw* | *cegcc* | *os2*)
++ *cygwin* | *msys* | mingw* | *cegcc* | *os2*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix=-$major
+@@ -8899,7 +8899,7 @@
+ if test yes = "$build_libtool_libs"; then
+ if test -n "$rpath"; then
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+@@ -9413,7 +9413,7 @@
+
+ orig_export_symbols=
+ case $host_os in
+- cygwin* | mingw* | cegcc*)
++ cygwin* | *msys* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ func_dll_def_p "$export_symbols" || {
+@@ -9970,7 +9970,7 @@
+
+ prog)
+ case $host in
+- *cygwin*) func_stripname '' '.exe' "$output"
++ *cygwin* | *msys*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+@@ -10081,7 +10081,7 @@
+ esac
+ fi
+ case $host in
+- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
++ *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+@@ -10159,7 +10159,7 @@
+ # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+ wrappers_required=false
+ ;;
+- *cygwin* | *mingw* )
++ *cygwin* | *msys* | *mingw* )
+ test yes = "$build_libtool_libs" || wrappers_required=false
+ ;;
+ *)
+@@ -10305,14 +10305,14 @@
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+- *cygwin*)
++ *cygwin* | *msys*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+- *cygwin* | *mingw* )
++ *cygwin* | *msys* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+@@ -10644,7 +10644,7 @@
+ # tests/bindir.at for full details.
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+- *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
++ *cygwin*,*lai,yes,no,*.dll | *msys*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+ # If a -bindir argument was supplied, place the dll there.
+ if test -n "$bindir"; then
+ func_relative_path "$install_libdir" "$bindir"
+--- libtool-2.4.7/configure.orig 2022-05-25 14:05:58.332605400 +0200
++++ libtool-2.4.7/configure 2022-05-25 14:11:29.613646200 +0200
+@@ -5988,7 +5988,7 @@
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+- cygwin* | mingw* | cegcc*)
++ cygwin* | msys* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+@@ -6154,7 +6154,7 @@
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+@@ -6162,12 +6162,12 @@
+ ;;
+ esac
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+@@ -6233,7 +6233,7 @@
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+@@ -6486,7 +6486,7 @@
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+-cygwin*)
++cygwin* | msys*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+@@ -6802,7 +6802,7 @@
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+ case $host_os in
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+@@ -7310,7 +7310,7 @@
+ aix*)
+ symcode='[BCDT]'
+ ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+ hpux*)
+@@ -8912,7 +8912,7 @@
+ enable_win32_dll=yes
+
+ case $host in
+-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}as; ac_word=$2
+@@ -9813,7 +9813,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -9916,7 +9916,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+@@ -10418,7 +10418,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -10533,7 +10533,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+@@ -11074,7 +11074,7 @@
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -12110,7 +12110,7 @@
+ # libtool to hard-code these into programs
+ ;;
+
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+@@ -12136,9 +12136,9 @@
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+- cygwin*)
++ cygwin* | msys*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
+@@ -12176,7 +12176,7 @@
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+- cygwin*)
++ cygwin* | msys*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -12878,7 +12878,7 @@
+ lt_cv_dlopen_libs=
+ ;;
+
+- cygwin*)
++ cygwin* | msys*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+@@ -13827,7 +13827,7 @@
+ beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | msys* | mingw* | pw32*)
+ ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+ "
+ if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
+@@ -14242,7 +14242,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ case $host_os in #(
+- *cygwin*)
++ *cygwin* | *msys*)
+ lt_cv_sys_argz_works=no
+ if test no != "$cross_compiling"; then
+ lt_cv_sys_argz_works="guessing no"
+@@ -15517,7 +15517,7 @@
+ esac
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
+@@ -16528,7 +16528,7 @@
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+- mingw* | cygwin* | os2* | pw32* | cegcc*)
++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -16603,7 +16603,7 @@
+ ;;
+ esac
+ ;;
+- mingw* | cygwin* | os2* | pw32* | cegcc*)
++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+@@ -17092,7 +17092,7 @@
+ pw32*)
+ export_symbols_cmds_CXX=$ltdll_cmds
+ ;;
+- cygwin* | mingw* | cegcc*)
++ cygwin* | msys* | mingw* | cegcc*)
+ case $cc_basename in
+ cl* | icl*)
+ exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+@@ -17413,7 +17413,7 @@
+ # libtool to hard-code these into programs
+ ;;
+
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+@@ -17439,7 +17439,7 @@
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+- cygwin*)
++ cygwin* | msys*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+@@ -17478,7 +17478,7 @@
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+- cygwin*)
++ cygwin* | msys*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -18519,7 +18519,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -18622,7 +18622,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_F77='-DDLL_EXPORT'
+@@ -19109,7 +19109,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -19224,7 +19224,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+@@ -19753,7 +19753,7 @@
+ export_dynamic_flag_spec_F77=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -20581,7 +20581,7 @@
+ # libtool to hard-code these into programs
+ ;;
+
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+@@ -20607,9 +20607,9 @@
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+- cygwin*)
++ cygwin* | msys*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ ;;
+ mingw* | cegcc*)
+@@ -20646,7 +20646,7 @@
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+- cygwin*)
++ cygwin* | msys*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -21822,7 +21822,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -21925,7 +21925,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+@@ -22412,7 +22412,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -22527,7 +22527,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_FC='-L$libdir'
+@@ -23056,7 +23056,7 @@
+ export_dynamic_flag_spec_FC=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -23884,7 +23884,7 @@
+ # libtool to hard-code these into programs
+ ;;
+
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+@@ -23910,9 +23910,9 @@
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+- cygwin*)
++ cygwin* | msys*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+
+ ;;
+ mingw* | cegcc*)
+@@ -23949,7 +23949,7 @@
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+- cygwin*)
++ cygwin* | msys*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -24844,7 +24844,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -24947,7 +24947,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic_GO='-DDLL_EXPORT'
+@@ -25434,7 +25434,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -25549,7 +25549,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, GO) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_GO='-L$libdir'
+@@ -26090,7 +26090,7 @@
+ export_dynamic_flag_spec_GO=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -27073,7 +27073,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -27176,7 +27176,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+
+@@ -27663,7 +27663,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -27778,7 +27778,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+@@ -28319,7 +28319,7 @@
+ export_dynamic_flag_spec_GCJ=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+
+diff -urN libtool-2.4.7/libltdl/configure.orig libtool-2.4.7/libltdl/configure
+--- libtool-2.4.7/libltdl/configure.orig 2022-05-25 14:29:13.245182300 +0200
++++ libtool-2.4.7/libltdl/configure 2022-05-25 14:30:03.920944200 +0200
+@@ -4774,7 +4774,7 @@
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+- cygwin* | mingw* | cegcc*)
++ cygwin* | msys* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+@@ -4940,7 +4940,7 @@
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+@@ -4948,12 +4948,12 @@
+ ;;
+ esac
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+@@ -5019,7 +5019,7 @@
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+@@ -5272,7 +5272,7 @@
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+-cygwin*)
++cygwin* | msys*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+@@ -5588,7 +5588,7 @@
+ lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+ case $host_os in
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+@@ -6097,7 +6097,7 @@
+ aix*)
+ symcode='[BCDT]'
+ ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+ hpux*)
+@@ -7837,7 +7837,7 @@
+ enable_win32_dll=yes
+
+ case $host in
+-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}as; ac_word=$2
+@@ -8738,7 +8738,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -8841,7 +8841,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+@@ -9343,7 +9343,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -9458,7 +9458,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+@@ -9999,7 +9999,7 @@
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -11035,7 +11035,7 @@
+ # libtool to hard-code these into programs
+ ;;
+
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+@@ -11067,6 +11067,12 @@
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
++ msys*)
++ # MSYS DLLs use 'msys-' prefix rather than 'lib'
++ soname_spec='`echo $libname | sed -e 's/^lib/msys-/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
++
++ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
++ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+@@ -11101,7 +11107,7 @@
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+- cygwin*)
++ cygwin* | msys*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -11803,7 +11809,7 @@
+ lt_cv_dlopen_libs=
+ ;;
+
+- cygwin*)
++ cygwin* | msys*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+@@ -12751,7 +12757,7 @@
+ beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | msys* | mingw* | pw32*)
+ ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+ "
+ if test "x$ac_cv_have_decl_cygwin_conv_path" = xyes; then :
+@@ -13166,7 +13172,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ case $host_os in #(
+- *cygwin*)
++ *cygwin* | *msys*)
+ lt_cv_sys_argz_works=no
+ if test no != "$cross_compiling"; then
+ lt_cv_sys_argz_works="guessing no"
+
+diff -urN libtool-2.4.7/m4/libtool.m4.orig libtool-2.4.7/m4/libtool.m4
+--- libtool-2.4.7/m4/libtool.m4.orig 2022-03-17 03:43:39.000000000 +0100
++++ libtool-2.4.7/m4/libtool.m4 2022-05-25 14:26:59.035745300 +0200
+@@ -1703,7 +1703,7 @@
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+- cygwin* | mingw* | cegcc*)
++ cygwin* | msys* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+@@ -1951,7 +1951,7 @@
+ lt_cv_dlopen_libs=
+ ;;
+
+- cygwin*)
++ cygwin* | msys*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+@@ -2541,7 +2541,7 @@
+ # libtool to hard-code these into programs
+ ;;
+
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+@@ -2567,9 +2567,9 @@
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+- cygwin*)
++ cygwin* | msys*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+- soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
++ soname_spec='`echo $libname | $SED -e 's/^lib/msys-/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+@@ -2607,7 +2607,7 @@
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+- cygwin*)
++ cygwin* | msys*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+@@ -3385,7 +3385,7 @@
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+@@ -3478,7 +3478,7 @@
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+-cygwin*)
++cygwin* | msys*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+@@ -3791,7 +3791,7 @@
+ [lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+ case $host_os in
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+@@ -3861,7 +3861,7 @@
+ [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ LIBM=
+ case $host in
+-*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
++*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-msys* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+ *-ncr-sysv4.3*)
+@@ -3936,7 +3936,7 @@
+ aix*)
+ symcode='[[BCDT]]'
+ ;;
+-cygwin* | mingw* | pw32* | cegcc*)
++cygwin* | msys* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+ hpux*)
+@@ -4242,7 +4242,7 @@
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+- mingw* | cygwin* | os2* | pw32* | cegcc*)
++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -4318,7 +4318,7 @@
+ ;;
+ esac
+ ;;
+- mingw* | cygwin* | os2* | pw32* | cegcc*)
++ mingw* | cygwin* | msys* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+@@ -4566,7 +4566,7 @@
+ # PIC is the default for these OSes.
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+@@ -4670,7 +4670,7 @@
+ esac
+ ;;
+
+- mingw* | cygwin* | pw32* | os2* | cegcc*)
++ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+@@ -4945,7 +4945,7 @@
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+ ;;
+- cygwin* | mingw* | cegcc*)
++ cygwin* | msys* | mingw* | cegcc*)
+ case $cc_basename in
+ cl* | icl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+@@ -5003,7 +5003,7 @@
+ extract_expsyms_cmds=
+
+ case $host_os in
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+@@ -5118,7 +5118,7 @@
+ fi
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+@@ -5575,7 +5575,7 @@
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++ or Intel C++ Compiler.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+@@ -6651,7 +6651,7 @@
+ esac
+ ;;
+
+- cygwin* | mingw* | pw32* | cegcc*)
++ cygwin* | msys* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl* | ,icl* | no,icl*)
+ # Native MSVC or ICC
+@@ -8348,7 +8348,7 @@
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+@@ -8356,12 +8356,12 @@
+ ;;
+ esac
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+- *-*-cygwin* )
++ *-*-cygwin* | *-*-msys* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+
+diff -Naur libtool-2.4.2.418-orig/m4/ltdl.m4 libtool-2.4.2.418/m4/ltdl.m4
+--- libtool-2.4.2.418-orig/m4/ltdl.m4 2013-10-26 03:37:46.000000000 +0400
++++ libtool-2.4.2.418/m4/ltdl.m4 2014-09-02 10:19:58.102800000 +0400
+@@ -706,7 +706,7 @@
+ beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+-cygwin* | mingw* | pw32*)
++cygwin* | msys* | mingw* | pw32*)
+ AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+
+diff -Naur libtool-2.4.2.418-orig/m4/ltoptions.m4 libtool-2.4.2.418/m4/ltoptions.m4
+--- libtool-2.4.2.418-orig/m4/ltoptions.m4 2013-10-26 03:37:46.000000000 +0400
++++ libtool-2.4.2.418/m4/ltoptions.m4 2014-09-02 10:20:19.069200000 +0400
+@@ -126,7 +126,7 @@
+ [enable_win32_dll=yes
+
+ case $host in
+-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
++*-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+
+diff -Naur libtool-2.4.2.418-orig/tests/bindir.at libtool-2.4.2.418/tests/bindir.at
+--- libtool-2.4.2.418-orig/tests/bindir.at 2013-01-26 08:19:10.000000000 +0400
++++ libtool-2.4.2.418/tests/bindir.at 2014-09-02 10:21:21.999600000 +0400
+@@ -65,7 +65,7 @@
+
+ bindirneeded=:
+ case $host_os in
+- cygwin*|mingw*|cegcc*)
++ cygwin*|msys*|mingw*|cegcc*)
+ ;;
+ *)
+ bindirneeded=false
+@@ -174,7 +174,7 @@
+
+ bindirneeded=:
+ case $host_os in
+- cygwin*|mingw*|cegcc*)
++ cygwin*|msys*|mingw*|cegcc*)
+ ;;
+ *)
+ bindirneeded=false
+
+diff -Naur libtool-2.4.2.418-orig/tests/lt_dladvise.at libtool-2.4.2.418/tests/lt_dladvise.at
+--- libtool-2.4.2.418-orig/tests/lt_dladvise.at 2013-01-01 21:36:01.000000000 +0400
++++ libtool-2.4.2.418/tests/lt_dladvise.at 2014-09-02 10:20:51.298800000 +0400
+@@ -332,7 +332,7 @@
+ $LIBTOOL --features | grep 'enable shared libraries' >/dev/null && have_shared=:
+
+ case $host_os,$have_shared in
+-cygwin* | mingw* | cegcc* | *,false)
++cygwin* | msys* | mingw* | cegcc* | *,false)
+ # These hosts do not support linking without -no-undefined
+ CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
+ ;;
diff --git a/contrib/fixes-libtool/0010-libtool-2.4.2-include-process-h.patch b/contrib/fixes-libtool/0010-libtool-2.4.2-include-process-h.patch
@@ -0,0 +1,24 @@
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index 0418007..91276c2 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -4163,6 +4163,7 @@
+ # include <unistd.h>
+ # include <stdint.h>
+ # ifdef __CYGWIN__
++# include <process.h>
+ # include <io.h>
+ # endif
+ #endif
+diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
+index 0418007..91276c2 100644
+--- a/build-aux/ltmain.sh
++++ b/build-aux/ltmain.sh
+@@ -4163,6 +4163,7 @@
+ # include <unistd.h>
+ # include <stdint.h>
+ # ifdef __CYGWIN__
++# include <process.h>
+ # include <io.h>
+ # endif
+ #endif
diff --git a/contrib/fixes-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch b/contrib/fixes-libtool/0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
@@ -0,0 +1,33 @@
+From a18473ed4e5574dab899db640b8efeff78939b54 Mon Sep 17 00:00:00 2001
+From: Manoj Gupta <manojgupta@chromium.org>
+Date: Wed, 10 Oct 2018 10:50:23 +0300
+Subject: [PATCH 1/2] Pick up clang_rt static archives compiler internal
+ libraries
+
+Libtool checks only for libraries linked as -l* when trying to
+find internal compiler libraries. Clang, however uses the absolute
+path to link its internal libraries e.g. compiler_rt. This patch
+handles clang's statically linked libraries when finding internal
+compiler libraries.
+https://crbug.com/749263
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27866
+---
+ m4/libtool.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index b55a6e5..d9322d0 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -7556,7 +7556,7 @@ if AC_TRY_EVAL(ac_compile); then
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+- -L* | -R* | -l*)
++ -L* | -R* | -l* | */libclang_rt.*.a)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+--
+2.7.4
+
diff --git a/contrib/fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch b/contrib/fixes-libtool/0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
@@ -0,0 +1,83 @@
+From ec15841963ca3aab3bc88fb0932c014337284bfc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
+Date: Wed, 10 Oct 2018 10:47:21 +0300
+Subject: [PATCH 2/2] Prefer response files over linker scripts for mingw tools
+
+The GCC/binutils tools support response files just fine, while
+lld (impersonating GNU ld) only supports response files, not
+linker scripts. Using a linker script as input just to pass a
+list of files is overkill for cases when a response file is enough.
+---
+ build-aux/ltmain.in | 28 ++++++++++++++--------------
+ m4/libtool.m4 | 2 ++
+ 2 files changed, 16 insertions(+), 14 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index e2fb263..db5d590 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -7932,20 +7932,7 @@ EOF
+ last_robj=
+ k=1
+
+- if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
+- output=$output_objdir/$output_la.lnkscript
+- func_verbose "creating GNU ld script: $output"
+- echo 'INPUT (' > $output
+- for obj in $save_libobjs
+- do
+- func_to_tool_file "$obj"
+- $ECHO "$func_to_tool_file_result" >> $output
+- done
+- echo ')' >> $output
+- func_append delfiles " $output"
+- func_to_tool_file "$output"
+- output=$func_to_tool_file_result
+- elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
++ if test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
+ output=$output_objdir/$output_la.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+@@ -7964,6 +7951,19 @@ EOF
+ func_append delfiles " $output"
+ func_to_tool_file "$output"
+ output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
++ elif test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
++ output=$output_objdir/$output_la.lnkscript
++ func_verbose "creating GNU ld script: $output"
++ echo 'INPUT (' > $output
++ for obj in $save_libobjs
++ do
++ func_to_tool_file "$obj"
++ $ECHO "$func_to_tool_file_result" >> $output
++ done
++ echo ')' >> $output
++ func_append delfiles " $output"
++ func_to_tool_file "$output"
++ output=$func_to_tool_file_result
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index d9322d0..9046a84 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -5130,6 +5130,7 @@ _LT_EOF
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
++ _LT_TAGVAR(file_list_spec, $1)='@'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+@@ -6706,6 +6707,7 @@ if test yes != "$_lt_caught_CXX_error"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
++ _LT_TAGVAR(file_list_spec, $1)='@'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+--
+2.7.4
+
diff --git a/contrib/fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch b/contrib/fixes-libtool/0013-Allow-statically-linking-compiler-support-libraries-.patch
@@ -0,0 +1,38 @@
+From b9f77cae8cfbe850e58cac686fcb4d246b5bfc51 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
+Date: Mon, 19 Aug 2019 13:34:51 +0300
+Subject: [PATCH] Allow statically linking compiler support libraries when
+ linking a library
+
+For cases with deplibs_check_method="file_magic ..." (as it is for mingw),
+there were previously no way that a static library could be accepted
+here.
+---
+ build-aux/ltmain.in | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index e2fb2633..db4d775c 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -5870,8 +5870,15 @@ func_mode_link ()
+ fi
+ case $linkmode in
+ lib)
+- # Linking convenience modules into shared libraries is allowed,
+- # but linking other static libraries is non-portable.
++ # Linking convenience modules and compiler provided static libraries
++ # into shared libraries is allowed, but linking other static
++ # libraries is non-portable.
++ case $deplib in
++ */libgcc*.$libext | */libclang_rt*.$libext)
++ deplibs="$deplib $deplibs"
++ continue
++ ;;
++ esac
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+--
+2.17.1
+
diff --git a/contrib/fixes-libtool/0014-Support-llvm-objdump-f-output.patch b/contrib/fixes-libtool/0014-Support-llvm-objdump-f-output.patch
@@ -0,0 +1,39 @@
+From 03dabb6a70847761e65572a2a7b770a3b1b9f123 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= <mati865@gmail.com>
+Date: Mon, 12 Apr 2021 23:44:10 +0200
+Subject: [PATCH] Support llvm-objdump -f output
+
+---
+ build-aux/ltmain.in | 2 +-
+ m4/libtool.m4 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
+index a9f070a..4a434cc 100644
+--- a/build-aux/ltmain.in
++++ b/build-aux/ltmain.in
+@@ -3019,7 +3019,7 @@ func_win32_libid ()
+ *ar\ archive*) # could be an import, or static
+ # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+- $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
++ $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|coff-arm|coff-arm64|coff-i386|coff-x86-64)' >/dev/null; then
+ case $nm_interface in
+ "MS dumpbin")
+ if func_cygming_ms_implib_p "$1" ||
+diff --git a/m4/libtool.m4 b/m4/libtool.m4
+index 21a7d60..594be9c 100644
+--- a/m4/libtool.m4
++++ b/m4/libtool.m4
+@@ -3473,7 +3473,7 @@ mingw* | pw32*)
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+- lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
++ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|coff-arm|coff-arm64|coff-i386|coff-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+--
+2.31.1
+
diff --git a/contrib/fixes-libtool/apply-all.sh b/contrib/fixes-libtool/apply-all.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+#
+# This file applies optional libtool patches mainly for better MSys2 compatibility,
+# especially for MSys2/Clang{64,32} toolchains.
+# It's a pity that these patches haven't been sent upstream.
+#
+# Based on Debian SID baseline files as of April 2023.
+#
+
+patchesdir=$(dirname $BASH_SOURCE) || exit 2
+test -n "$patchesdir" || exit 2
+cd "$patchesdir" || exit 2
+patchesdir=$(pwd) || exit 2
+
+patches=(
+ 0003-Pass-various-runtime-library-flags-to-GCC.mingw.mod.patch
+ 0006-Fix-strict-ansi-vs-posix.patch
+ 0009-libtool-2.4.2.418-msysize.patch
+ 0010-libtool-2.4.2-include-process-h.patch
+ 0011-Pick-up-clang_rt-static-archives-compiler-internal-l.patch
+ 0012-Prefer-response-files-over-linker-scripts-for-mingw-.patch
+ 0013-Allow-statically-linking-compiler-support-libraries-.patch
+ 0014-Support-llvm-objdump-f-output.patch
+)
+
+failed=( )
+
+cd "${patchesdir}/../.." || exit 1
+
+patch_params="-Nf -p1 --no-backup-if-mismatch -r - --read-only=fail"
+
+for patch in ${patches[@]}; do
+ patchfile="${patchesdir}/${patch}"
+ # Load patch into memory for simplicity
+ # Patches should not be very large
+ if grep -Eq -e '^--- .*\/ltmain\.in(\.orig)?([[:space:]]|$)' "$patchfile" && grep -Eq -e '^--- .*\/ltmain\.sh(\.orig)?([[:space:]]|$)' "$patchfile"
+ then
+ patch_data=$(awk '/^diff .*\/ltmain\.in(\.orig)?$/||(/^--- / && $2 ~ /\/ltmain\.in(\.orig)?$/){h=1;s=1;next}/^-- ?$/{h=0;s=0}/^[^-+@ ]/{h||s=0}/^\+\+\+ /{h=0}!s' "$patchfile") || exit 2
+ else
+ patch_data=$(cat "$patchfile") || exit 2
+ fi
+ patch_data=$(echo "$patch_data" | sed -E -e '/^(diff|---|\+\+\+) / s|/ltmain\.in|/ltmain.sh|g' -) || exit 2
+ patch_data=$(echo "$patch_data" | awk '(/^diff / && !/.*\/(ltmain\.sh|config\.guess|libtool\.m4|ltoptions\.m4)$/)||(/^--- / && $2 !~ /\/(ltmain\.sh|config\.guess|libtool\.m4|ltoptions\.m4)(\.orig)?$/){h=1;s=1;next}/^-- ?$/{h=0;s=0}/^[^-+@ ]/{h||s=0}/^\+\+\+ /{h=0}!s' -) || exit 2
+ echo "*** Applying $patch..."
+ if echo "$patch_data" | patch $patch_params -i -
+ then
+ echo "** $patch successfully applied."
+ else
+ echo "** $patch failed."
+ failed+=("$patch")
+ fi
+ unset patch_data
+done
+
+echo ''
+
+if [[ -n "${failed[@]}" ]]; then
+ printf '* Failed patch: %s\n' "${failed[@]}" >&2
+ exit 2
+else
+ echo "* All patches have been successfully applied."
+fi
+
+exit 0
diff --git a/contrib/gen_http_headers_insert.sh b/contrib/gen_http_headers_insert.sh
@@ -0,0 +1,133 @@
+#!/bin/bash
+
+#
+# Generate header insert for HTTP headers
+#
+
+# Copyright (c) 2015-2021 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+wget -nv https://www.iana.org/assignments/http-fields/field-names.csv -O perm-headers.csv || exit
+echo Generating...
+echo '/**
+ * @defgroup headers HTTP headers
+ * The standard headers found in HTTP requests and responses.
+ * See: https://www.iana.org/assignments/http-fields/http-fields.xhtml
+ * Registry export date: '"$(date -u +%Y-%m-%d)"'
+ * @{
+ */
+
+/* Main HTTP headers. */' > header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ field_name = $1
+ status = $3
+ ref = $4
+ comment = $5
+ if(ref ~ /^RFC911[0-2]/ && status != "obsoleted")
+ {
+ gsub(/\]\[/, "; ", ref)
+ if(length(status) == 0)
+ { status = "No category" }
+ else
+ { sub(/^./, toupper(substr(status, 1, 1)), status) }
+ field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+ field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+ printf("/* %-14.14s %s */\n", status ".", ref)
+ printf("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), $1)
+ }
+}' perm-headers.csv >> header_insert_headers.h && \
+echo '
+/* Additional HTTP headers. */' >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ field_name = $1
+ status = $3
+ ref = $4
+ comment = $5
+ if(ref !~ /^RFC911[0-2]/ && status == "permanent")
+ {
+ gsub(/\]\[/, "; ", ref)
+ sub(/^./, toupper(substr(status, 1, 1)), status)
+ field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+ field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+ printf("/* %-14.14s %s */\n", status ".", ref)
+ printf("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), $1)
+ }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ field_name = $1
+ status = $3
+ ref = $4
+ comment = $5
+ if(ref !~ /^RFC911[0-2]/ && status == "provisional")
+ {
+ gsub(/\]\[/, "; ", ref)
+ sub(/^./, toupper(substr(status, 1, 1)), status)
+ field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+ field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+ printf ("/* %-14.14s %s */\n", status ".", ref)
+ printf ("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), $1)
+ }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ field_name = $1
+ status = $3
+ ref = $4
+ comment = $5
+ if(ref !~ /^RFC911[0-2]/ && status != "obsoleted" && status != "permanent" && status != "provisional" && status != "deprecated")
+ {
+ gsub(/\]\[/, "; ", ref)
+ status = "No category"
+ field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+ field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+ printf("/* %-14.14s %s */\n", status ".", ref)
+ printf("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), $1)
+ }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ field_name = $1
+ status = $3
+ ref = $4
+ comment = $5
+ if(ref !~ /^RFC911[0-2]/ && status == "deprecated")
+ {
+ gsub(/\]\[/, "; ", ref)
+ sub(/^./, toupper(substr(status, 1, 1)), status)
+ field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+ field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+ printf("/* %-14.14s %s */\n", status ".", ref)
+ printf("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), $1)
+ }
+}' perm-headers.csv >> header_insert_headers.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ field_name = $1
+ status = $3
+ ref = $4
+ comment = $5
+ if (status == "obsoleted")
+ {
+ gsub(/\]\[/, "; ", ref)
+ sub(/^./, toupper(substr(status, 1, 1)), status)
+ field_name = gensub(/\*/, "ASTERISK", "g", field_name)
+ field_name = gensub(/[^a-zA-Z0-9_]/, "_", "g", field_name)
+ printf("/* %-14.14s %s */\n", status ".", ref)
+ printf("#define MHD_HTTP_HEADER_%-12s \"%s\"\n", toupper(field_name), $1)
+ }
+}' perm-headers.csv >> header_insert_headers.h && \
+echo OK && \
+rm perm-headers.csv || exit
diff --git a/contrib/gen_http_methods_insert.sh b/contrib/gen_http_methods_insert.sh
@@ -0,0 +1,131 @@
+#!/bin/bash
+
+#
+# Generate header insert for HTTP methods
+#
+
+# Copyright (c) 2015-2021 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+wget -nv http://www.iana.org/assignments/http-methods/methods.csv -O methods.csv || exit
+echo Generating...
+echo '/**
+ * @defgroup methods HTTP methods
+ * HTTP methods (as strings).
+ * See: https://www.iana.org/assignments/http-methods/http-methods.xml
+ * Registry export date: '"$(date -u +%Y-%m-%d)"'
+ * @{
+ */
+
+/* Main HTTP methods. */' > header_insert_methods.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+function strnumcmp(s1, s2, n1, n2, a1, a2)
+{
+ n1 = length(s1)
+ n2 = length(s2)
+ if (0 == n1 && 0 == n2)
+ return 0
+ if (0 == n1 && 0 < n2)
+ return -1
+ if (0 < n1 && 0 == n2)
+ return 1
+ n1 = match(s1, /^[^0-9]+/, a1)
+ n2 = match(s2, /^[^0-9]+/, a2)
+ if (0 != n1)
+ {
+ if (0 == n2)
+ return 1
+ if ((a1[0] "") < (a2[0] ""))
+ return -1
+ if ((a1[0] "") > (a2[0] ""))
+ return 1
+ }
+ else
+ {
+ if (0 != n2)
+ return -1
+ }
+ s1 = substr(s1, length(a1[0]) + 1)
+ s2 = substr(s2, length(a2[0]) + 1)
+ n1 = match(s1, /^[0-9]+/, a1)
+ n2 = match(s2, /^[0-9]+/, a2)
+ if (0 != n1)
+ {
+ if (0 == n2)
+ return 1
+ if ((a1[0] + 0) < (a2[0] + 0))
+ return -1
+ if ((a1[0] + 0) > (a2[0] + 0))
+ return 1
+ }
+ else
+ {
+ if (0 != n2)
+ return -1
+ }
+ return strnumcmp(substr(s1, length(a1[0]) + 1), substr(s2, length(a2[0]) + 1))
+}
+
+function sort_indices(i1, v1, i2, v2)
+{
+ return strnumcmp(gensub(/[^0-9A-Za-z]+/, " ", "g", i1), gensub(/[^0-9A-Za-z]+/, " ", "g", i2))
+}
+
+FNR > 1 {
+ mthd_m = $1
+ reference_m = $4
+ gsub(/^\[|^"\[|\]"$|\]$/, "", reference_m)
+ gsub(/\]\[/, "; ", reference_m)
+ if (reference_m ~ /^RFC911[0-2]/ && mthd_m != "*") {
+ if ($2 == "yes")
+ { safe_m = "Safe. " }
+ else
+ { safe_m = "Not safe." }
+ if ($3 == "yes")
+ { indem_m = "Idempotent. " }
+ else
+ { indem_m = "Not idempotent." }
+ idx_str = reference_m
+ main_methods[idx_str] = sprintf ("%s\n", "/* " safe_m " " indem_m " " reference_m ". */")
+ mthd_tkn = gensub(/\*/, "ASTERISK", "g", mthd_m)
+ gsub(/[^a-zA-Z0-9_]/, "_", mthd_tkn)
+ main_methods[idx_str] = (main_methods[idx_str] sprintf ("%-32s \"%s\"\n", "#define MHD_HTTP_METHOD_" toupper(mthd_tkn), mthd_m))
+ }
+}
+
+END {
+ n = asort(main_methods, main_methods, "sort_indices")
+ for (i = 1; i <= n; i++)
+ printf("%s", main_methods[i])
+}
+' methods.csv >> header_insert_methods.h && \
+echo '
+/* Additional HTTP methods. */' >> header_insert_methods.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $4)
+ gsub(/\]\[/, "; ", $4)
+ if ($4 !~ /^RFC911[0-2]/ || $1 == "*") {
+ if ($2 == "yes")
+ { safe_m = "Safe. " }
+ else
+ { safe_m = "Not safe." }
+ if ($3 == "yes")
+ { indem_m = "Idempotent. " }
+ else
+ { indem_m = "Not idempotent." }
+ print "/* " safe_m " " indem_m " " $4 ". */"
+ mthd = gensub(/\*/, "ASTERISK", "g", $1)
+ mthd = gensub(/[^a-zA-Z0-9_]/, "_", "g", mthd)
+ printf ("%-38s \"%s\"\n", "#define MHD_HTTP_METHOD_" toupper(mthd), $1)
+ }
+}' methods.csv >> header_insert_methods.h && \
+echo '
+/** @} */ /* end of group methods */
+' >> header_insert_methods.h &&
+echo OK && \
+rm methods.csv || exit
diff --git a/contrib/gen_http_statuses_inserts.sh b/contrib/gen_http_statuses_inserts.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#
+# Generate code and header inserts for HTTP statues
+#
+
+# Copyright (c) 2019-2021 Karlson2k (Evgeny Grin) <k2k@yandex.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+wget -nv https://www.iana.org/assignments/http-status-codes/http-status-codes-1.csv -O http-status-codes-1.csv || exit
+echo Generating...
+echo '/**
+ * @defgroup httpcode HTTP response codes.
+ * These are the status codes defined for HTTP responses.
+ * See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
+ * Registry export date: '"$(date -u +%Y-%m-%d)"'
+ * @{
+ */
+' > header_insert_statuses.h && \
+gawk -e 'BEGIN {FPAT = "([^,]*)|(\"[^\"]+\")"}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $3)
+ gsub(/\]\[/, "; ", $3)
+ if (sub(/ *\(OBSOLETED\)/, "", $2)) {
+ $3 = "(OBSOLETED) " $3
+ }
+ if ($1 == 306) {
+ $2 = "Switch Proxy"
+ $3 = "Not used! " $3
+ }
+ if ($2 != "Unassigned" && $2 != "(Unused)") {
+ printf ("/* %s %-22s %s. */\n", $1, "\"" $2 "\".", $3)
+ printf ("#define MHD_HTTP_%-27s %s\n", toupper(gensub(/[^A-Za-z0-0]/, "_", "g", $2)), $1)
+ } else {
+ print ""
+ }
+}' http-status-codes-1.csv >> header_insert_statuses.h && \
+echo '
+/* Not registered non-standard codes */
+/* 449 "Reply With". MS IIS extension. */
+#define MHD_HTTP_RETRY_WITH 449
+
+/* 450 "Blocked by Windows Parental Controls". MS extension. */
+#define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
+
+/* 509 "Bandwidth Limit Exceeded". Apache extension. */
+#define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
+' >> header_insert_statuses.h && \
+gawk -e 'BEGIN {
+ FPAT = "([^,]*)|(\"[^\"]+\")"
+ hundreds[1]="one"
+ hundreds[2]="two"
+ hundreds[3]="three"
+ hundreds[4]="four"
+ hundreds[5]="five"
+ hundreds[6]="six"
+ prev_num=0
+ prev_reason=""
+ prev_desc=""
+ num=0
+ reason=""
+ desc=""
+}
+FNR > 1 {
+ gsub(/^\[|^"\[|\]"$|\]$/, "", $3)
+ gsub(/\]\[/, "; ", $3)
+ num = $1
+ reason = $2
+ desc = $3
+ if (sub(/ *\(OBSOLETED\)/, "", reason)) {
+ desc = "(OBSOLETED) " desc
+ }
+ if (num % 100 == 0) {
+ if (num != 100) {
+ printf (" /* %s */ %-36s /* %s */\n};\n\n", prev_num, "_MHD_S_STR_W_LEN (\""prev_reason"\")", prev_desc)
+ }
+ prev_num = num;
+ print "static const struct _MHD_cstr_w_len " hundreds[$1/100] "_hundred[] = {"
+ }
+ if (num == 306) {
+ reason = "Switch Proxy"
+ desc = "Not used! " desc
+ }
+ if (reason == "Unassigned" || reason == "(Unused)") next
+ if (prev_num != num)
+ printf (" /* %s */ %-36s /* %s */\n", prev_num, "_MHD_S_STR_W_LEN (\""prev_reason"\"),", prev_desc)
+ while(++prev_num < num) {
+ if (prev_num == 449) {prev_reason="Reply With"; prev_desc="MS IIS extension";}
+ else if (prev_num == 450) {prev_reason="Blocked by Windows Parental Controls"; prev_desc="MS extension";}
+ else if (prev_num == 509) {prev_reason="Bandwidth Limit Exceeded"; prev_desc="Apache extension";}
+ else {prev_reason="Unknown"; prev_desc="Not used";}
+ if (prev_reason=="Unknown") printf (" /* %s */ %-36s /* %s */\n", prev_num, "{\""prev_reason"\", 0},", prev_desc)
+ else printf (" /* %s */ %-36s /* %s */\n", prev_num, "_MHD_S_STR_W_LEN (\""prev_reason"\"),", prev_desc)
+ }
+ prev_num = num
+ prev_reason = reason
+ prev_desc = desc
+}
+END {
+ printf (" /* %s */ %-36s /* %s */\n};\n", prev_num, "_MHD_S_STR_W_LEN (\""prev_reason"\")", prev_desc)
+}' http-status-codes-1.csv > code_insert_statuses.c && \
+echo OK && \
+rm http-status-codes-1.csv || exit
diff --git a/contrib/make-dist.sh b/contrib/make-dist.sh
@@ -0,0 +1,108 @@
+#!/bin/bash
+
+#
+# This file creates dist tarball.
+# Optional autotools patches are applied for better toolchains
+# compatibility.
+#
+# Based on Debian SID baseline files as of January 2024.
+#
+
+if ! grep -Eq -e '^PRETTY_NAME="Debian GNU/Linux 12 \(bookworm\)"$' /etc/os-release && \
+ ! grep -Eq -e '^PRETTY_NAME="Debian GNU/Linux trixie/sid"$' /etc/os-release
+then
+ echo "Only Debian 'bookworm' and 'trixie/sid' are supported by this script." >&2
+ exit 1
+fi
+
+if ! autoconf --version | head -1 | grep -Eq -e ' 2\.71$' -
+then
+ echo "The only supported autoconf version is 2.71." >&2
+ exit 1
+fi
+
+
+tooldir=$(dirname $BASH_SOURCE) || exit 2
+test -n "$tooldir" || exit 2
+cd "$tooldir" || exit 2
+tooldir="$PWD" || exit 2
+cd "${tooldir}/.." || exit 2
+rootsrcdir="$PWD" || exit 2
+
+# Cleanup sources
+echo ''
+echo '*** Performing initial cleanup...'
+echo ''
+if [[ ! -f 'Makefile' ]] || ! make maintainer-clean
+then
+ # Makefile needed for initial cleanup
+ if [[ ! -f 'Makefile.in' ]] || [[ ! -f 'configure' ]] || ! ./configure || ! make maintainer-clean
+ then
+ rm -f po/Makefile || exit 3
+ # Build 'configure' to build Makefile for initial cleanup
+ autoreconf -fvi || exit 3
+ ./configure || exit 3
+ make maintainer-clean || exit 3
+ fi
+fi
+echo ''
+echo '** Initial cleanup completed.'
+echo ''
+
+# Copy latest autotools files
+echo ''
+echo '*** Copying autotools files...'
+echo ''
+autoreconf -fvi || exit 4
+echo ''
+echo '*** Performing intermediate cleanup...'
+echo ''
+./configure || exit 4
+make distclean || exit 4
+rm -f ./configure ./aclocal.m4 || exit 4
+rm -rf ./autom4te.cache || exit 4
+echo ''
+echo '** Intermediate cleanup completed.'
+echo ''
+
+# Patching local autotools files
+echo ''
+echo '*** Performing patching of local autotools files...'
+echo ''
+"$tooldir/fixes-libtool/apply-all.sh" || exit 5
+"$tooldir/fixes-autoconf/apply-all.sh" || exit 5
+echo ''
+echo '** Local autotools files patched.'
+echo ''
+
+# Build the configure and the related files with patches
+echo ''
+echo '*** Building patched configure and related files...'
+echo ''
+autoreconf -v || exit 6
+echo ''
+echo '** Patched build system ready.'
+echo ''
+
+# Build the configure and the related files with patches
+
+have_command()
+{
+ command -v "$1" >/dev/null 2>&1
+}
+
+echo ''
+echo '*** Building dist tarball...'
+echo ''
+./configure || exit 7
+if have_command zopfli; then
+ make dist-custm2 'ARC_CMD=zopfli -v --gzip --i25' 'ARC_EXT=tar.gz' || exit 7
+else
+ make dist || exit 7
+ echo '* zopfli is not installed, tarball size is suboptimal.'
+fi
+echo ''
+echo '** Dist tarball ready.'
+echo ''
+
+exit 0
diff --git a/contrib/mhd.png b/contrib/mhd.png
Binary files differ.
diff --git a/contrib/mhd.svg b/contrib/mhd.svg
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="744.09448819"
+ height="1052.3622047"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="mhd.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="388.21978"
+ inkscape:cy="761.10146"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1024"
+ inkscape:window-height="549"
+ inkscape:window-x="-2"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1">
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot3038"
+ style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:14px;line-height:125%;letter-spacing:0px;word-spacing:0px"><flowRegion
+ id="flowRegion3040"><rect
+ id="rect3042"
+ width="40"
+ height="21.428572"
+ x="162.14285"
+ y="547.36218"
+ style="font-size:14px" /></flowRegion><flowPara
+ id="flowPara3044"></flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot3160"
+ style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:Bitstream Vera Sans;font-style:normal;font-weight:normal;font-size:40px;line-height:125%;letter-spacing:0px;word-spacing:0px"><flowRegion
+ id="flowRegion3162"><rect
+ id="rect3164"
+ width="525.71429"
+ height="514.28571"
+ x="265.71429"
+ y="446.64789" /></flowRegion><flowPara
+ id="flowPara3166"></flowPara></flowRoot> <g
+ id="g3944">
+ <g
+ transform="translate(23.306351,-77.52095)"
+ id="g3168">
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="180.71429"
+ y="473.7908"
+ id="text2991"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="180.71429"
+ y="473.7908"
+ id="tspan2997"
+ style="font-size:144px">MHD</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+ x="195.0932"
+ y="365.70761"
+ id="text2991-3"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ x="195.0932"
+ y="365.70761"
+ id="tspan2997-5"
+ style="font-size:144px">GNU</tspan></text>
+ </g>
+ <rect
+ style="stroke:#000000;fill:none;stroke-opacity:1"
+ y="172.36218"
+ x="207.14285"
+ height="232.85715"
+ width="342.85715"
+ id="rect3174" />
+ </g>
+ </g>
+</svg>
diff --git a/contrib/mhd_logo.png b/contrib/mhd_logo.png
Binary files differ.
diff --git a/contrib/pogen.sh b/contrib/pogen.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+find src -name "*.c" | grep -v \# | grep -v /test_ | grep -v /perf_ | grep -v _old | grep -v chat | grep -v .libs/ | sort > po/POTFILES.in
+grep -l _\( `find src -name "*.h"` | grep -v "platform.h" | grep -v _old | grep -v chat | sort >> po/POTFILES.in
+
diff --git a/contrib/uncrustify.cfg b/contrib/uncrustify.cfg
@@ -0,0 +1,95 @@
+input_tab_size = 2
+output_tab_size = 2
+
+indent_columns = 2
+indent_with_tabs = 0
+indent_case_brace = 2
+indent_label=-16
+
+code_width=80
+#cmd_width=80
+
+# Leave most comments alone for now
+cmt_indent_multi=false
+sp_cmt_cpp_start=add
+
+sp_not=add
+
+sp_func_call_user_paren_paren=remove
+sp_inside_fparen=remove
+sp_after_cast=add
+
+ls_for_split_full=true
+ls_func_split_full=true
+ls_code_width=true
+
+# Arithmetic operations in wrapped expressions should be at the start
+# of the line.
+pos_arith=lead
+
+# Fully parenthesize boolean exprs
+mod_full_paren_if_bool=false
+
+# Braces should be on their own line
+nl_fdef_brace=add
+nl_enum_brace=add
+nl_struct_brace=add
+nl_union_brace=add
+nl_if_brace=add
+nl_brace_else=add
+nl_elseif_brace=add
+nl_while_brace=add
+nl_switch_brace=add
+
+# no newline between "else" and "if"
+nl_else_if=remove
+
+nl_func_paren=remove
+nl_assign_brace=remove
+
+# No extra newlines that cause noisy diffs
+nl_start_of_file=remove
+nl_after_func_proto = 2
+nl_after_func_body = 3
+# If there's no new line, it's not a text file!
+nl_end_of_file=add
+nl_max_blank_in_func = 3
+nl_max = 3
+
+sp_inside_paren = remove
+
+sp_arith = add
+sp_arith_additive = add
+
+# We want spaces before and after "="
+sp_before_assign = add
+sp_after_assign = add
+
+# we want "char *foo;"
+sp_after_ptr_star = remove
+sp_between_ptr_star = remove
+
+# we want "if (foo) { ... }"
+sp_before_sparen = add
+
+sp_inside_fparen = remove
+sp_inside_sparen = remove
+
+# add space before function call and decl: "foo (x)"
+sp_func_call_paren = add
+sp_func_proto_paren = add
+sp_func_proto_paren_empty = add
+sp_func_def_paren = add
+sp_func_def_paren_empty = add
+
+# We'd want it for "if ( (foo) || (bar) )", but not for "if (m())",
+# so as uncrustify doesn't give exactly what we want => ignore
+sp_paren_paren = ignore
+sp_inside_paren = remove
+sp_bool = force
+
+nl_func_type_name = force
+#nl_branch_else = add
+nl_else_brace = add
+nl_elseif_brace = add
+nl_for_brace = add
diff --git a/contrib/uncrustify.sh b/contrib/uncrustify.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env bash
+
+set -eu
+
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+
+if ! uncrustify --version >/dev/null; then
+ echo "you need to install uncrustify for indentation"
+ exit 1
+fi
+
+find "$DIR/../src" \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) \
+ -exec uncrustify -c "$DIR/uncrustify.cfg" --replace --no-backup {} + \
+ || true
diff --git a/contrib/uncrustify_precommit b/contrib/uncrustify_precommit
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+# use as .git/hooks/pre-commit
+
+function vercomp () {
+ if [[ $1 == $2 ]]
+ then
+ return 0
+ fi
+ local IFS=.
+ local i ver1=($1) ver2=($2)
+ # fill empty fields in ver1 with zeros
+ for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
+ do
+ ver1[i]=0
+ done
+ for ((i=0; i<${#ver1[@]}; i++))
+ do
+ if [[ -z ${ver2[i]} ]]
+ then
+ # fill empty fields in ver2 with zeros
+ ver2[i]=0
+ fi
+ if ((10#${ver1[i]} > 10#${ver2[i]}))
+ then
+ return 1
+ fi
+ if ((10#${ver1[i]} < 10#${ver2[i]}))
+ then
+ return 2
+ fi
+ done
+ return 0
+}
+
+exec 1>&2
+
+if ! uncrustify --version > /dev/null
+then
+ echo 'uncrustify required'
+ exit 1
+fi
+
+HAVE=$(uncrustify --version | sed -e 's/.*-//' -e 's/_.//')
+
+vercomp 0.78.0 "$HAVE"
+case $? in
+ 0)
+ ;;
+ 1)
+ echo "your uncrustify is too old";
+ exit 1
+ ;;
+ 2)
+ ;;
+esac
+
+RET=0
+changed=$(git diff --cached --name-only)
+crustified=""
+
+for f in $changed;
+do
+ if echo $f | grep \\.[c,h]\$ > /dev/null
+ then
+ # compare result of uncrustify with changes
+ #
+ # only change any of the invocations here if
+ # they are portable across all cmp and shell
+ # implementations !
+ uncrustify -q -c uncrustify.cfg -f $f | cmp -s $f -
+ if test $? = 1 ;
+ then
+ crustified=" $crustified $f"
+ RET=1
+ fi
+ fi
+done
+
+if [ $RET = 1 ];
+then
+ echo "Run"
+ echo "uncrustify --no-backup -c uncrustify.cfg ${crustified}"
+ echo "before committing."
+fi
+exit $RET
diff --git a/contrib/xcc b/contrib/xcc
@@ -0,0 +1,2 @@
+#!/bin/sh
+c89 -Wc,'LANGLVL(EXTENDED),XPLINK' -Wl,'XPLINK' -D__STRING_CODE_SET__="ISO8859-1" -Wc,"ASCII" $@
diff --git a/doc/.gitignore b/doc/.gitignore
@@ -0,0 +1,64 @@
+/libmicrohttpd.vr
+/libmicrohttpd.tps
+/libmicrohttpd.tp
+/libmicrohttpd.toc
+/libmicrohttpd.pg
+/libmicrohttpd.ky
+/libmicrohttpd.fns
+/libmicrohttpd.fn
+/libmicrohttpd.cps
+/libmicrohttpd.cp
+/libmicrohttpd.aux
+/texinfo.tex
+/libmicrohttpd-tutorial.info
+/libmicrohttpd.info
+/libmicrohttpd.html
+/microhttpd-tutorial.vr
+/microhttpd-tutorial.tp
+/microhttpd-tutorial.toc
+/microhttpd-tutorial.pg
+/microhttpd-tutorial.pdf
+/microhttpd-tutorial.log
+/microhttpd-tutorial.ky
+/microhttpd-tutorial.info
+/microhttpd-tutorial.html
+/microhttpd-tutorial.fn
+/microhttpd-tutorial.cp
+/microhttpd-tutorial.aux
+/libmicrohttpd-tutorial.vr
+/libmicrohttpd-tutorial.tp
+/libmicrohttpd-tutorial.pg
+/libmicrohttpd-tutorial.pdf
+/libmicrohttpd-tutorial.log
+/libmicrohttpd-tutorial.ky
+/libmicrohttpd-tutorial.html
+/libmicrohttpd-tutorial.fn
+/libmicrohttpd-tutorial.cp
+/libmicrohttpd-tutorial.cps
+/microhttpd.html
+/version.texi.orig
+/libmicrohttpd-tutorial.toc
+/libmicrohttpd-tutorial.aux
+/stamp-vti.orig
+/microhttpd.info.orig
+/microhttpd.vr
+/microhttpd.tps
+/microhttpd.tp
+/microhttpd.toc
+/microhttpd.pg
+/microhttpd.pdf
+/microhttpd.log
+/microhttpd.ky
+/microhttpd.fns
+/microhttpd.fn
+/microhttpd.cps
+/microhttpd.cp
+/microhttpd.aux
+/tutorial
+/microhttpd
+/libmicrohttpdtutorial
+/version.texi
+/stamp-vti
+/microhttpd.info
+/mdate-sh
+/doxygen
diff --git a/doc/Makefile.am b/doc/Makefile.am
@@ -0,0 +1,67 @@
+# This Makefile.am is in the public domain
+dist_man_MANS = libmicrohttpd.3
+
+SUBDIRS = . doxygen
+
+if BUILD_EXAMPLES
+SUBDIRS += examples
+endif
+
+DISTCLEANFILES = \
+ libmicrohttpd.cps \
+ libmicrohttpd.dvi \
+ libmicrohttpd-tutorial.cps \
+ libmicrohttpd-tutorial.dvi
+
+info_TEXINFOS = \
+ libmicrohttpd.texi \
+ libmicrohttpd-tutorial.texi
+microhttpd_TEXINFOS = \
+ lgpl.texi \
+ ecos.texi \
+ gpl-2.0.texi \
+ fdl-1.3.texi
+microhttpd_tutorial_TEXINFOS = \
+ chapters/basicauthentication.inc \
+ chapters/bibliography.inc \
+ chapters/exploringrequests.inc \
+ chapters/hellobrowser.inc \
+ chapters/introduction.inc \
+ chapters/largerpost.inc \
+ chapters/processingpost.inc \
+ chapters/responseheaders.inc \
+ chapters/tlsauthentication.inc \
+ chapters/sessions.inc \
+ chapters/websocket.inc
+
+EXTRA_DIST = \
+ $(microhttpd_TEXINFOS) $(microhttpd_tutorial_TEXINFOS) \
+ libmicrohttpd_performance_data.png \
+ libmicrohttpd_performance_data.eps
+
+install-info-local:
+ @echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
+ echo " $(INSTALL_DATA) libmicrohttpd_performance_data.png '$(DESTDIR)$(infodir)'"; \
+ $(INSTALL_DATA) '$(srcdir)/libmicrohttpd_performance_data.png' "$(DESTDIR)$(infodir)" || exit 1;
+
+install-html-local:
+ @if test -n "$(htmldir)"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/libmicrohttpd.html'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)/libmicrohttpd.html" || exit 1; \
+ echo " $(INSTALL_DATA) libmicrohttpd_performance_data.png '$(DESTDIR)$(htmldir)/libmicrohttpd.html'"; \
+ $(INSTALL_DATA) '$(srcdir)/libmicrohttpd_performance_data.png' "$(DESTDIR)$(htmldir)/libmicrohttpd.html" || exit 1; \
+ else : ; fi
+
+uninstall-local:
+ @if test -d "$(DESTDIR)$(infodir)"; then \
+ echo " rm -f '$(DESTDIR)$(infodir)/libmicrohttpd_performance_data.png'"; \
+ rm -f "$(DESTDIR)$(infodir)/libmicrohttpd_performance_data.png" \
+ else : ; fi
+
+update-stamp:
+ @rm -f '$(srcdir)/stamp-vti' '$(srcdir)/version.texi' && \
+ $(MAKE) $(AM_MAKEFLAGS) '$(srcdir)/version.texi'
+
+.PHONY: update-stamp
+
diff --git a/doc/chapters/basicauthentication.inc b/doc/chapters/basicauthentication.inc
@@ -0,0 +1,202 @@
+With the small exception of IP address based access control,
+requests from all connecting clients where served equally until now.
+This chapter discusses a first method of client's authentication and
+its limits.
+
+A very simple approach feasible with the means already discussed would
+be to expect the password in the @emph{URI} string before granting access to
+the secured areas. The password could be separated from the actual resource identifier
+by a certain character, thus the request line might look like
+@verbatim
+GET /picture.png?mypassword
+@end verbatim
+@noindent
+
+In the rare situation where the client is customized enough and the connection
+occurs through secured lines (e.g., a embedded device directly attached to
+another via wire) and where the ability to embed a password in the URI or to
+pass on a URI with a password are desired, this can be a reasonable choice.
+
+But when it is assumed that the user connecting does so with an ordinary
+Internet browser, this implementation brings some problems about. For example,
+the URI including the password stays in the address field or at least in the
+history of the browser for anybody near enough to see. It will also be
+inconvenient to add the password manually to any new URI when the browser does
+not know how to compose this automatically.
+
+At least the convenience issue can be addressed by employing the simplest
+built-in password facilities of HTTP compliant browsers, hence we want to
+start there. It will, however, turn out to have still severe weaknesses in
+terms of security which need consideration.
+
+Before we will start implementing @emph{Basic Authentication} as described in
+@emph{RFC 2617}, we will also abandon the simplistic and generally
+problematic practice of responding every request the first time our callback
+is called for a given connection. Queuing a response upon the first request
+is akin to generating an error response (even if it is a "200 OK" reply!).
+The reason is that MHD usually calls the callback in three phases:
+
+@enumerate
+@item
+First, to initially tell the application about the connection and inquire whether
+it is OK to proceed. This call typically happens before the client could upload
+the request body, and can be used to tell the client to not proceed with the
+upload (if the client requested "Expect: 100 Continue"). Applications may queue
+a reply at this point, but it will force the connection to be closed and thus
+prevent keep-alive / pipelining, which is generally a bad idea. Applications
+wanting to proceed with the request throughout the other phases should just return
+"MHD_YES" and not queue any response. Note that when an application suspends
+a connection in this callback, the phase does not advance and the application
+will be called again in this first phase.
+@item
+Next, to tell the application about upload data provided by the client.
+In this phase, the application may not queue replies, and trying to do so
+will result in MHD returning an error code from @code{MHD_queue_response}.
+If there is no upload data, this phase is skipped.
+@item
+Finally, to obtain a regular response from the application. This can be
+almost any type of response, including ones indicating failures. The
+one exception is a "100 Continue" response, which applications must never
+generate: MHD generates that response automatically when necessary in the
+first phase. If the application does not queue a response, MHD may call
+the callback repeatedly (depending a bit on the threading model, the
+application should suspend the connection).
+@end enumerate
+
+But how can we tell whether the callback has been called before for the
+particular request? Initially, the pointer this parameter references is
+set by @emph{MHD} in the callback. But it will also be "remembered" on the
+next call (for the same request). Thus, we can use the @code{req_cls}
+location to keep track of the request state. For now, we will simply
+generate no response until the parameter is non-null---implying the callback
+was called before at least once. We do not need to share information between
+different calls of the callback, so we can set the parameter to any address
+that is assured to be not null. The pointer to the @code{connection} structure
+will be pointing to a legal address, so we take this.
+
+The first time @code{answer_to_connection} is called, we will not even look at the headers.
+
+@verbatim
+static int
+answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url, const char *method, const char *version,
+ const char *upload_data, size_t *upload_data_size,
+ void **req_cls)
+{
+ if (0 != strcmp(method, "GET")) return MHD_NO;
+ if (NULL == *req_cls) {*req_cls = connection; return MHD_YES;}
+
+ ...
+ /* else respond accordingly */
+ ...
+}
+@end verbatim
+@noindent
+
+Note how we lop off the connection on the first condition (no "GET" request),
+but return asking for more on the other one with @code{MHD_YES}. With this
+minor change, we can proceed to implement the actual authentication process.
+
+@heading Request for authentication
+
+Let us assume we had only files not intended to be handed out without the
+correct username/password, so every "GET" request will be challenged.
+@emph{RFC 7617} describes how the server shall ask for authentication by
+adding a @emph{WWW-Authenticate} response header with the name of the
+@emph{realm} protected. MHD can generate and queue such a failure response
+for you using the @code{MHD_queue_basic_auth_fail_response} API. The only
+thing you need to do is construct a response with the error page to be shown
+to the user if he aborts basic authentication. But first, you should check if
+the proper credentials were already supplied using the
+@code{MHD_basic_auth_get_username_password} call.
+
+Your code would then look like this:
+@verbatim
+static enum MHD_Result
+answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url, const char *method,
+ const char *version, const char *upload_data,
+ size_t *upload_data_size, void **req_cls)
+{
+ struct MHD_BasicAuthInfo *auth_info;
+ enum MHD_Result ret;
+ struct MHD_Response *response;
+
+ if (0 != strcmp (method, "GET"))
+ return MHD_NO;
+ if (NULL == *req_cls)
+ {
+ *req_cls = connection;
+ return MHD_YES;
+ }
+ auth_info = MHD_basic_auth_get_username_password3 (connection);
+ if (NULL == auth_info)
+ {
+ static const char *page =
+ "<html><body>Authorization required</body></html>";
+ response = MHD_create_response_from_buffer_static (strlen (page), page);
+ ret = MHD_queue_basic_auth_fail_response3 (connection,
+ "admins",
+ MHD_YES,
+ response);
+ }
+ else if ((strlen ("root") != auth_info->username_len) ||
+ (0 != memcmp (auth_info->username, "root",
+ auth_info->username_len)) ||
+ /* The next check against NULL is optional,
+ * if 'password' is NULL then 'password_len' is always zero. */
+ (NULL == auth_info->password) ||
+ (strlen ("pa$$w0rd") != auth_info->password_len) ||
+ (0 != memcmp (auth_info->password, "pa$$w0rd",
+ auth_info->password_len)))
+ {
+ static const char *page =
+ "<html><body>Wrong username or password</body></html>";
+ response = MHD_create_response_from_buffer_static (strlen (page), page);
+ ret = MHD_queue_basic_auth_fail_response3 (connection,
+ "admins",
+ MHD_YES,
+ response);
+ }
+ else
+ {
+ static const char *page = "<html><body>A secret.</body></html>";
+ response = MHD_create_response_from_buffer_static (strlen (page), page);
+ ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
+ }
+ if (NULL != auth_info)
+ MHD_free (auth_info);
+ MHD_destroy_response (response);
+ return ret;
+}
+@end verbatim
+
+See the @code{examples} directory for the complete example file.
+
+@heading Remarks
+For a proper server, the conditional statements leading to a return of @code{MHD_NO} should yield a
+response with a more precise status code instead of silently closing the connection. For example,
+failures of memory allocation are best reported as @emph{internal server error} and unexpected
+authentication methods as @emph{400 bad request}.
+
+@heading Exercises
+@itemize @bullet
+@item
+Make the server respond to wrong credentials (but otherwise well-formed requests) with the recommended
+@emph{401 unauthorized} status code. If the client still does not authenticate correctly within the
+same connection, close it and store the client's IP address for a certain time. (It is OK to check for
+expiration not until the main thread wakes up again on the next connection.) If the client fails
+authenticating three times during this period, add it to another list for which the
+@code{AcceptPolicyCallback} function denies connection (temporally).
+
+@item
+With the network utility @code{netcat} connect and log the response of a "GET" request as you
+did in the exercise of the first example, this time to a file. Now stop the server and let @emph{netcat}
+listen on the same port the server used to listen on and have it fake being the proper server by giving
+the file's content as the response (e.g. @code{cat log | nc -l -p 8888}). Pretending to think your were
+connecting to the actual server, browse to the eavesdropper and give the correct credentials.
+
+Copy and paste the encoded string you see in @code{netcat}'s output to some of the Base64 decode tools available online
+and see how both the user's name and password could be completely restored.
+
+@end itemize
diff --git a/doc/chapters/bibliography.inc b/doc/chapters/bibliography.inc
@@ -0,0 +1,32 @@
+@heading API reference
+@itemize @bullet
+@item
+The @emph{GNU libmicrohttpd} manual by Marco Maggi and Christian Grothoff 2008
+@uref{http://gnunet.org/libmicrohttpd/microhttpd.html}
+
+@item
+All referenced RFCs can be found on the website of @emph{The Internet Engineering Task Force}
+@uref{http://www.ietf.org/}
+
+@item
+@emph{RFC 2616}: Fielding, R., Gettys, J., Mogul, J., Frystyk, H., and T. Berners-Lee,
+"Hypertext Transfer Protocol -- HTTP/1.1", RFC 2016, January 1997.
+
+@item
+@emph{RFC 2617}: Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., Leach, P.,
+Luotonen, A., and L. Stewart, "HTTP Authentication: Basic and Digest Access Authentication", RFC 2617, June 1999.
+
+@item
+@emph{RFC 6455}: Fette, I., Melnikov, A., "The WebSocket Protocol", RFC 6455, December 2011.
+
+
+@item
+A well--structured @emph{HTML} reference can be found on
+@uref{http://www.echoecho.com/html.htm}
+
+For those readers understanding German or French, there is an excellent document both for learning
+@emph{HTML} and for reference, whose English version unfortunately has been discontinued.
+@uref{http://de.selfhtml.org/} and @uref{http://fr.selfhtml.org/}
+
+
+@end itemize
diff --git a/doc/chapters/exploringrequests.inc b/doc/chapters/exploringrequests.inc
@@ -0,0 +1,109 @@
+This chapter will deal with the information which the client sends to the
+server at every request. We are going to examine the most useful fields of such an request
+and print them out in a readable manner. This could be useful for logging facilities.
+
+The starting point is the @emph{hellobrowser} program with the former response removed.
+
+This time, we just want to collect information in the callback function, thus we will
+just return MHD_NO after we have probed the request. This way, the connection is closed
+without much ado by the server.
+
+@verbatim
+static int
+answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data,
+ size_t *upload_data_size, void **req_cls)
+{
+ ...
+ return MHD_NO;
+}
+@end verbatim
+@noindent
+The ellipsis marks the position where the following instructions shall be inserted.
+
+
+We begin with the most obvious information available to the server, the request line. You should
+already have noted that a request consists of a command (or "HTTP method") and a URI (e.g. a filename).
+It also contains a string for the version of the protocol which can be found in @code{version}.
+To call it a "new request" is justified because we return only @code{MHD_NO}, thus ensuring the
+function will not be called again for this connection.
+@verbatim
+printf ("New %s request for %s using version %s\n", method, url, version);
+@end verbatim
+@noindent
+
+The rest of the information is a bit more hidden. Nevertheless, there is lot of it sent from common
+Internet browsers. It is stored in "key-value" pairs and we want to list what we find in the header.
+As there is no mandatory set of keys a client has to send, each key-value pair is printed out one by
+one until there are no more left. We do this by writing a separate function which will be called for
+each pair just like the above function is called for each HTTP request.
+It can then print out the content of this pair.
+@verbatim
+int print_out_key (void *cls, enum MHD_ValueKind kind,
+ const char *key, const char *value)
+{
+ printf ("%s: %s\n", key, value);
+ return MHD_YES;
+}
+@end verbatim
+@noindent
+
+To start the iteration process that calls our new function for every key, the line
+@verbatim
+MHD_get_connection_values (connection, MHD_HEADER_KIND, &print_out_key, NULL);
+@end verbatim
+@noindent
+needs to be inserted in the connection callback function too. The second parameter tells the function
+that we are only interested in keys from the general HTTP header of the request. Our iterating
+function @code{print_out_key} does not rely on any additional information to fulfill its duties
+so the last parameter can be NULL.
+
+All in all, this constitutes the complete @code{logging.c} program for this chapter which can be
+found in the @code{examples} section.
+
+Connecting with any modern Internet browser should yield a handful of keys. You should try to
+interpret them with the aid of @emph{RFC 2616}.
+Especially worth mentioning is the "Host" key which is often used to serve several different websites
+hosted under one single IP address but reachable by different domain names (this is called virtual hosting).
+
+@heading Conclusion
+The introduced capabilities to itemize the content of a simple GET request---especially the
+URI---should already allow the server to satisfy clients' requests for small specific resources
+(e.g. files) or even induce alteration of server state. However, the latter is not
+recommended as the GET method (including its header data) is by convention considered a "safe"
+operation, which should not change the server's state in a significant way. By convention,
+GET operations can thus be performed by crawlers and other automatic software. Naturally
+actions like searching for a passed string are fine.
+
+Of course, no transmission can occur while the return value is still set to @code{MHD_NO} in the
+callback function.
+
+@heading Exercises
+@itemize @bullet
+@item
+By parsing the @code{url} string and delivering responses accordingly, implement a small server for
+"virtual" files. When asked for @code{/index.htm@{l@}}, let the response consist of a HTML page
+containing a link to @code{/another.html} page which is also to be created "on the fly" in case of
+being requested. If neither of these two pages are requested, @code{MHD_HTTP_NOT_FOUND} shall be
+returned accompanied by an informative message.
+
+@item
+A very interesting information has still been ignored by our logger---the client's IP address.
+Implement a callback function
+@verbatim
+static int on_client_connect (void *cls,
+ const struct sockaddr *addr,
+ socklen_t addrlen)
+@end verbatim
+@noindent
+that prints out the IP address in an appropriate format. You might want to use the POSIX function
+@code{inet_ntoa} but bear in mind that @code{addr} is actually just a structure containing other
+substructures and is @emph{not} the variable this function expects.
+Make sure to return @code{MHD_YES} so that the library knows the client is allowed to connect
+(and to then process the request). If one wanted to limit access basing on IP addresses, this would be the place
+to do it. The address of your @code{on_client_connect} function must be passed as the third parameter to the
+@code{MHD_start_daemon} call.
+
+@end itemize
diff --git a/doc/chapters/hellobrowser.inc b/doc/chapters/hellobrowser.inc
@@ -0,0 +1,222 @@
+The most basic task for a HTTP server is to deliver a static text message to any client connecting to it.
+Given that this is also easy to implement, it is an excellent problem to start with.
+
+For now, the particular URI the client asks for shall have no effect on the message that will
+be returned. In addition, the server shall end the connection after the message has been sent so that
+the client will know there is nothing more to expect.
+
+The C program @code{hellobrowser.c}, which is to be found in the examples section, does just that.
+If you are very eager, you can compile and start it right away but it is advisable to type the
+lines in by yourself as they will be discussed and explained in detail.
+
+After the necessary includes and the definition of the port which our server should listen on
+@verbatim
+#include <sys/types.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <microhttpd.h>
+
+#define PORT 8888
+
+@end verbatim
+
+@noindent
+the desired behaviour of our server when HTTP request arrive has to be implemented. We already have
+agreed that it should not care about the particular details of the request, such as who is requesting
+what. The server will respond merely with the same small HTML page to every request.
+
+The function we are going to write now will be called by @emph{GNU libmicrohttpd} every time an
+appropriate request comes in. While the name of this callback function is arbitrary, its parameter
+list has to follow a certain layout. So please, ignore the lot of parameters for now, they will be
+explained at the point they are needed. We have to use only one of them,
+@code{struct MHD_Connection *connection}, for the minimalistic functionality we want to achieve at the moment.
+
+This parameter is set by the @emph{libmicrohttpd} daemon and holds the necessary information to
+relate the call with a certain connection. Keep in mind that a server might have to satisfy hundreds
+of concurrent connections and we have to make sure that the correct data is sent to the destined
+client. Therefore, this variable is a means to refer to a particular connection if we ask the
+daemon to sent the reply.
+
+Talking about the reply, it is defined as a string right after the function header
+@verbatim
+int answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data,
+ size_t *upload_data_size, void **req_cls)
+{
+ const char *page = "<html><body>Hello, browser!</body></html>";
+
+@end verbatim
+
+@noindent
+HTTP is a rather strict protocol and the client would certainly consider it "inappropriate" if we
+just sent the answer string "as is". Instead, it has to be wrapped with additional information stored in so-called headers and footers. Most of the work in this area is done by the library for us---we
+just have to ask. Our reply string packed in the necessary layers will be called a "response".
+To obtain such a response we hand our data (the reply--string) and its size over to the
+@code{MHD_create_response_from_buffer} function. The last two parameters basically tell @emph{MHD}
+that we do not want it to dispose the message data for us when it has been sent and there also needs
+no internal copy to be done because the @emph{constant} string won't change anyway.
+
+@verbatim
+ struct MHD_Response *response;
+ int ret;
+
+ response = MHD_create_response_from_buffer (strlen (page),
+ (void*) page, MHD_RESPMEM_PERSISTENT);
+
+@end verbatim
+
+@noindent
+Now that the the response has been laced up, it is ready for delivery and can be queued for sending.
+This is done by passing it to another @emph{GNU libmicrohttpd} function. As all our work was done in
+the scope of one function, the recipient is without doubt the one associated with the
+local variable @code{connection} and consequently this variable is given to the queue function.
+Every HTTP response is accompanied by a status code, here "OK", so that the client knows
+this response is the intended result of his request and not due to some error or malfunction.
+
+Finally, the packet is destroyed and the return value from the queue returned,
+already being set at this point to either MHD_YES or MHD_NO in case of success or failure.
+
+@verbatim
+ ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
+ MHD_destroy_response (response);
+
+ return ret;
+}
+
+@end verbatim
+
+@noindent
+With the primary task of our server implemented, we can start the actual server daemon which will listen
+on @code{PORT} for connections. This is done in the main function.
+@verbatim
+int main ()
+{
+ struct MHD_Daemon *daemon;
+
+ daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
+ &answer_to_connection, NULL, MHD_OPTION_END);
+ if (NULL == daemon) return 1;
+
+@end verbatim
+
+@noindent
+The first parameter is one of three possible modes of operation. Here we want the daemon to run in
+a separate thread and to manage all incoming connections in the same thread. This means that while
+producing the response for one connection, the other connections will be put on hold. In this
+example, where the reply is already known and therefore the request is served quickly, this poses no problem.
+
+We will allow all clients to connect regardless of their name or location, therefore we do not check
+them on connection and set the third and fourth parameter to NULL.
+
+Parameter five is the address of the function we want to be called whenever a new connection has been
+established. Our @code{answer_to_connection} knows best what the client wants and needs no additional
+information (which could be passed via the next parameter) so the next (sixth) parameter is NULL. Likewise,
+we do not need to pass extra options to the daemon so we just write the MHD_OPTION_END as the last parameter.
+
+As the server daemon runs in the background in its own thread, the execution flow in our main
+function will continue right after the call. Because of this, we must delay the execution flow in the
+main thread or else the program will terminate prematurely. We let it pause in a processing-time
+friendly manner by waiting for the enter key to be pressed. In the end, we stop the daemon so it can
+do its cleanup tasks.
+@verbatim
+ getchar ();
+
+ MHD_stop_daemon (daemon);
+ return 0;
+}
+
+@end verbatim
+
+@noindent
+The first example is now complete.
+
+Compile it with
+@verbatim
+cc hellobrowser.c -o hellobrowser -I$PATH_TO_LIBMHD_INCLUDES
+ -L$PATH_TO_LIBMHD_LIBS -lmicrohttpd
+@end verbatim
+with the two paths set accordingly and run it.
+
+Now open your favorite Internet browser and go to the address @code{http://localhost:8888/}, provided that 8888
+is the port you chose. If everything works as expected, the browser will present the message of the
+static HTML page it got from our minimal server.
+
+@heading Remarks
+To keep this first example as small as possible, some drastic shortcuts were taken and are to be
+discussed now.
+
+Firstly, there is no distinction made between the kinds of requests a client could send. We implied
+that the client sends a GET request, that means, that he actually asked for some data. Even when
+it is not intended to accept POST requests, a good server should at least recognize that this
+request does not constitute a legal request and answer with an error code. This can be easily
+implemented by checking if the parameter @code{method} equals the string "GET" and returning a
+@code{MHD_NO} if not so.
+
+Secondly, the above practice of queuing a response upon the first call of the callback function
+brings with it some limitations. This is because the content of the message body will not be
+received if a response is queued in the first iteration. Furthermore, the connection will be closed
+right after the response has been transferred then. This is typically not what you want as it
+disables HTTP pipelining. The correct approach is to simply not queue a message on the first
+callback unless there is an error. The @code{void**} argument to the callback provides a location
+for storing information about the history of the connection; for the first call, the pointer
+will point to NULL. A simplistic way to differentiate the first call from others is to check
+if the pointer is NULL and set it to a non-NULL value during the first call.
+
+Both of these issues you will find addressed in the official @code{minimal_example.c} residing in
+the @code{src/examples} directory of the @emph{MHD} package. The source code of this
+program should look very familiar to you by now and easy to understand.
+
+For our example, we create the response from a static (persistent) buffer in memory and thus pass @code{MHD_RESPMEM_PERSISTENT} to the response construction
+function. In the usual case, responses are not transmitted immediately
+after being queued. For example, there might be other data on the system that needs to be sent with
+a higher priority. Nevertheless, the queue function will return successfully---raising the problem
+that the data we have pointed to may be invalid by the time it is about being sent. This is not an
+issue here because we can expect the @code{page} string, which is a constant @emph{string literal}
+here, to be static. That means it will be present and unchanged for as long as the program runs.
+For dynamic data, one could choose to either have @emph{MHD} free the memory @code{page} points
+to itself when it is not longer needed (by passing @code{MHD_RESPMEM_MUST_FREE}) or, alternatively, have the library to make and manage
+its own copy of it (by passing @code{MHD_RESPMEM_MUST_COPY}). Naturally, this last option is the most expensive.
+
+@heading Exercises
+@itemize @bullet
+@item
+While the server is running, use a program like @code{telnet} or @code{netcat} to connect to it. Try to form a
+valid HTTP 1.1 request yourself like
+@verbatim
+GET /dontcare HTTP/1.1
+Host: itsme
+<enter>
+@end verbatim
+@noindent
+and see what the server returns to you.
+
+
+@item
+Also, try other requests, like POST, and see how our server does not mind and why.
+How far in malforming a request can you go before the builtin functionality of @emph{MHD} intervenes
+and an altered response is sent? Make sure you read about the status codes in the @emph{RFC}.
+
+
+@item
+Add the option @code{MHD_USE_PEDANTIC_CHECKS} to the start function of the daemon in @code{main}.
+Mind the special format of the parameter list here which is described in the manual. How indulgent
+is the server now to your input?
+
+
+@item
+Let the main function take a string as the first command line argument and pass @code{argv[1]} to
+the @code{MHD_start_daemon} function as the sixth parameter. The address of this string will be
+passed to the callback function via the @code{cls} variable. Decorate the text given at the command
+line when the server is started with proper HTML tags and send it as the response instead of the
+former static string.
+
+
+@item
+@emph{Demanding:} Write a separate function returning a string containing some useful information,
+for example, the time. Pass the function's address as the sixth parameter and evaluate this function
+on every request anew in @code{answer_to_connection}. Remember to free the memory of the string
+every time after satisfying the request.
+
+@end itemize
diff --git a/doc/chapters/introduction.inc b/doc/chapters/introduction.inc
@@ -0,0 +1,23 @@
+This tutorial is for developers who want to learn how they can add HTTP serving
+capabilities to their applications with the @emph{GNU libmicrohttpd} library,
+abbreviated @emph{MHD}. The reader will learn how to
+implement basic HTTP functions from simple executable
+sample programs that implement various features.
+
+The text is supposed to be a supplement to the API reference manual of
+@emph{GNU libmicrohttpd} and for that reason does not explain many of the parameters.
+Therefore, the reader should always consult the manual to find the exact meaning
+of the functions used in the tutorial. Furthermore, the reader is
+encouraged to study the relevant @emph{RFCs}, which document the HTTP standard.
+
+@emph{GNU libmicrohttpd} is assumed to be already installed. This tutorial
+is written for version @value{VERSION}. At the time being,
+this tutorial has only been tested on @emph{GNU/Linux} machines even though
+efforts were made not to rely on anything that would prevent the samples from being
+built on similar systems.
+
+@section History
+
+This tutorial was originally written by Sebastian Gerhardt for MHD
+0.4.0. It was slightly polished and updated to MHD 0.9.0 by Christian
+Grothoff.
+\ No newline at end of file
diff --git a/doc/chapters/largerpost.inc b/doc/chapters/largerpost.inc
@@ -0,0 +1,319 @@
+The previous chapter introduced a way to upload data to the server, but the developed example program
+has some shortcomings, such as not being able to handle larger chunks of data. In this chapter, we
+are going to discuss a more advanced server program that allows clients to upload a file in order to
+have it stored on the server's filesystem. The server shall also watch and limit the number of
+clients concurrently uploading, responding with a proper busy message if necessary.
+
+
+@heading Prepared answers
+We choose to operate the server with the @code{SELECT_INTERNALLY} method. This makes it easier to
+synchronize the global states at the cost of possible delays for other connections if the processing
+of a request is too slow. One of these variables that needs to be shared for all connections is the
+total number of clients that are uploading.
+
+@verbatim
+#define MAXCLIENTS 2
+static unsigned int nr_of_uploading_clients = 0;
+@end verbatim
+@noindent
+
+If there are too many clients uploading, we want the server to respond to all requests with a busy
+message.
+@verbatim
+const char* busypage =
+ "<html><body>This server is busy, please try again later.</body></html>";
+@end verbatim
+@noindent
+
+Otherwise, the server will send a @emph{form} that informs the user of the current number of uploading clients,
+and ask her to pick a file on her local filesystem which is to be uploaded.
+@verbatim
+const char* askpage = "<html><body>\n\
+ Upload a file, please!<br>\n\
+ There are %u clients uploading at the moment.<br>\n\
+ <form action=\"/filepost\" method=\"post\" \
+ enctype=\"multipart/form-data\">\n\
+ <input name=\"file\" type=\"file\">\n\
+ <input type=\"submit\" value=\" Send \"></form>\n\
+ </body></html>";
+@end verbatim
+@noindent
+
+If the upload has succeeded, the server will respond with a message saying so.
+@verbatim
+const char* completepage = "<html><body>The upload has been completed.</body></html>";
+@end verbatim
+@noindent
+
+We want the server to report internal errors, such as memory shortage or file access problems,
+adequately.
+@verbatim
+const char* servererrorpage
+ = "<html><body>An internal server error has occurred.</body></html>";
+const char* fileexistspage
+ = "<html><body>This file already exists.</body></html>";
+@end verbatim
+@noindent
+
+It would be tolerable to send all these responses undifferentiated with a @code{200 HTTP_OK}
+status code but in order to improve the @code{HTTP} conformance of our server a bit, we extend the
+@code{send_page} function so that it accepts individual status codes.
+
+@verbatim
+static int
+send_page (struct MHD_Connection *connection,
+ const char* page, int status_code)
+{
+ int ret;
+ struct MHD_Response *response;
+
+ response = MHD_create_response_from_buffer (strlen (page), (void*) page,
+ MHD_RESPMEM_MUST_COPY);
+ if (!response) return MHD_NO;
+
+ ret = MHD_queue_response (connection, status_code, response);
+ MHD_destroy_response (response);
+
+ return ret;
+}
+@end verbatim
+@noindent
+
+Note how we ask @emph{MHD} to make its own copy of the message data. The reason behind this will
+become clear later.
+
+
+@heading Connection cycle
+The decision whether the server is busy or not is made right at the beginning of the connection. To
+do that at this stage is especially important for @emph{POST} requests because if no response is
+queued at this point, and @code{MHD_YES} returned, @emph{MHD} will not sent any queued messages until
+a postprocessor has been created and the post iterator is called at least once.
+
+@verbatim
+static int
+answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data,
+ size_t *upload_data_size, void **req_cls)
+{
+ if (NULL == *req_cls)
+ {
+ struct connection_info_struct *con_info;
+
+ if (nr_of_uploading_clients >= MAXCLIENTS)
+ return send_page(connection, busypage, MHD_HTTP_SERVICE_UNAVAILABLE);
+@end verbatim
+@noindent
+
+If the server is not busy, the @code{connection_info} structure is initialized as usual, with
+the addition of a filepointer for each connection.
+
+@verbatim
+ con_info = malloc (sizeof (struct connection_info_struct));
+ if (NULL == con_info) return MHD_NO;
+ con_info->fp = 0;
+
+ if (0 == strcmp (method, "POST"))
+ {
+ ...
+ }
+ else con_info->connectiontype = GET;
+
+ *req_cls = (void*) con_info;
+
+ return MHD_YES;
+ }
+@end verbatim
+@noindent
+
+For @emph{POST} requests, the postprocessor is created and we register a new uploading client. From
+this point on, there are many possible places for errors to occur that make it necessary to interrupt
+the uploading process. We need a means of having the proper response message ready at all times.
+Therefore, the @code{connection_info} structure is extended to hold the most current response
+message so that whenever a response is sent, the client will get the most informative message. Here,
+the structure is initialized to "no error".
+@verbatim
+ if (0 == strcmp (method, "POST"))
+ {
+ con_info->postprocessor
+ = MHD_create_post_processor (connection, POSTBUFFERSIZE,
+ iterate_post, (void*) con_info);
+
+ if (NULL == con_info->postprocessor)
+ {
+ free (con_info);
+ return MHD_NO;
+ }
+
+ nr_of_uploading_clients++;
+
+ con_info->connectiontype = POST;
+ con_info->answercode = MHD_HTTP_OK;
+ con_info->answerstring = completepage;
+ }
+ else con_info->connectiontype = GET;
+@end verbatim
+@noindent
+
+If the connection handler is called for the second time, @emph{GET} requests will be answered with
+the @emph{form}. We can keep the buffer under function scope, because we asked @emph{MHD} to make its
+own copy of it for as long as it is needed.
+@verbatim
+ if (0 == strcmp (method, "GET"))
+ {
+ int ret;
+ char buffer[1024];
+
+ sprintf (buffer, askpage, nr_of_uploading_clients);
+ return send_page (connection, buffer, MHD_HTTP_OK);
+ }
+@end verbatim
+@noindent
+
+
+The rest of the @code{answer_to_connection} function is very similar to the @code{simplepost.c}
+example, except the more flexible content of the responses. The @emph{POST} data is processed until
+there is none left and the execution falls through to return an error page if the connection
+constituted no expected request method.
+@verbatim
+ if (0 == strcmp (method, "POST"))
+ {
+ struct connection_info_struct *con_info = *req_cls;
+
+ if (0 != *upload_data_size)
+ {
+ MHD_post_process (con_info->postprocessor,
+ upload_data, *upload_data_size);
+ *upload_data_size = 0;
+
+ return MHD_YES;
+ }
+ else
+ return send_page (connection, con_info->answerstring,
+ con_info->answercode);
+ }
+
+ return send_page(connection, errorpage, MHD_HTTP_BAD_REQUEST);
+}
+@end verbatim
+@noindent
+
+
+@heading Storing to data
+Unlike the @code{simplepost.c} example, here it is to be expected that post iterator will be called
+several times now. This means that for any given connection (there might be several concurrent of them)
+the posted data has to be written to the correct file. That is why we store a file handle in every
+@code{connection_info}, so that the it is preserved between successive iterations.
+@verbatim
+static int
+iterate_post (void *coninfo_cls, enum MHD_ValueKind kind,
+ const char *key,
+ const char *filename, const char *content_type,
+ const char *transfer_encoding, const char *data,
+ uint64_t off, size_t size)
+{
+ struct connection_info_struct *con_info = coninfo_cls;
+@end verbatim
+@noindent
+
+Because the following actions depend heavily on correct file processing, which might be error prone,
+we default to reporting internal errors in case anything will go wrong.
+
+@verbatim
+con_info->answerstring = servererrorpage;
+con_info->answercode = MHD_HTTP_INTERNAL_SERVER_ERROR;
+@end verbatim
+@noindent
+
+In the "askpage" @emph{form}, we told the client to label its post data with the "file" key. Anything else
+would be an error.
+
+@verbatim
+ if (0 != strcmp (key, "file")) return MHD_NO;
+@end verbatim
+@noindent
+
+If the iterator is called for the first time, no file will have been opened yet. The @code{filename}
+string contains the name of the file (without any paths) the user selected on his system. We want to
+take this as the name the file will be stored on the server and make sure no file of that name exists
+(or is being uploaded) before we create one (note that the code below technically contains a
+race between the two "fopen" calls, but we will overlook this for portability sake).
+@verbatim
+ if (!con_info->fp)
+ {
+ if (NULL != (fp = fopen (filename, "rb")) )
+ {
+ fclose (fp);
+ con_info->answerstring = fileexistspage;
+ con_info->answercode = MHD_HTTP_FORBIDDEN;
+ return MHD_NO;
+ }
+
+ con_info->fp = fopen (filename, "ab");
+ if (!con_info->fp) return MHD_NO;
+ }
+@end verbatim
+@noindent
+
+
+Occasionally, the iterator function will be called even when there are 0 new bytes to process. The
+server only needs to write data to the file if there is some.
+@verbatim
+if (size > 0)
+ {
+ if (!fwrite (data, size, sizeof(char), con_info->fp))
+ return MHD_NO;
+ }
+@end verbatim
+@noindent
+
+If this point has been reached, everything worked well for this iteration and the response can
+be set to success again. If the upload has finished, this iterator function will not be called again.
+@verbatim
+ con_info->answerstring = completepage;
+ con_info->answercode = MHD_HTTP_OK;
+
+ return MHD_YES;
+}
+@end verbatim
+@noindent
+
+
+The new client was registered when the postprocessor was created. Likewise, we unregister the client
+on destroying the postprocessor when the request is completed.
+@verbatim
+void request_completed (void *cls, struct MHD_Connection *connection,
+ void **req_cls,
+ enum MHD_RequestTerminationCode toe)
+{
+ struct connection_info_struct *con_info = *req_cls;
+
+ if (NULL == con_info) return;
+
+ if (con_info->connectiontype == POST)
+ {
+ if (NULL != con_info->postprocessor)
+ {
+ MHD_destroy_post_processor (con_info->postprocessor);
+ nr_of_uploading_clients--;
+ }
+
+ if (con_info->fp) fclose (con_info->fp);
+ }
+
+ free (con_info);
+ *req_cls = NULL;
+}
+@end verbatim
+@noindent
+
+
+This is essentially the whole example @code{largepost.c}.
+
+
+@heading Remarks
+Now that the clients are able to create files on the server, security aspects are becoming even more
+important than before. Aside from proper client authentication, the server should always make sure
+explicitly that no files will be created outside of a dedicated upload directory. In particular,
+filenames must be checked to not contain strings like "../".
diff --git a/doc/chapters/processingpost.inc b/doc/chapters/processingpost.inc
@@ -0,0 +1,238 @@
+The previous chapters already have demonstrated a variety of possibilities to send information
+to the HTTP server, but it is not recommended that the @emph{GET} method is used to alter the way
+the server operates. To induce changes on the server, the @emph{POST} method is preferred over
+and is much more powerful than @emph{GET} and will be introduced in this chapter.
+
+We are going to write an application that asks for the visitor's name and, after the user has posted it,
+composes an individual response text. Even though it was not mandatory to use the @emph{POST} method here,
+as there is no permanent change caused by the POST, it is an illustrative example on how to share data
+between different functions for the same connection. Furthermore, the reader should be able to extend
+it easily.
+
+@heading GET request
+When the first @emph{GET} request arrives, the server shall respond with a HTML page containing an
+edit field for the name.
+
+@verbatim
+const char* askpage = "<html><body>\
+ What's your name, Sir?<br>\
+ <form action=\"/namepost\" method=\"post\">\
+ <input name=\"name\" type=\"text\"\
+ <input type=\"submit\" value=\" Send \"></form>\
+ </body></html>";
+@end verbatim
+@noindent
+
+The @code{action} entry is the @emph{URI} to be called by the browser when posting, and the
+@code{name} will be used later to be sure it is the editbox's content that has been posted.
+
+We also prepare the answer page, where the name is to be filled in later, and an error page
+as the response for anything but proper @emph{GET} and @emph{POST} requests:
+
+@verbatim
+const char* greatingpage="<html><body><h1>Welcome, %s!</center></h1></body></html>";
+
+const char* errorpage="<html><body>This doesn't seem to be right.</body></html>";
+@end verbatim
+@noindent
+
+Whenever we need to send a page, we use an extra function
+@code{int send_page(struct MHD_Connection *connection, const char* page)}
+for this, which does not contain anything new and whose implementation is therefore
+not discussed further in the tutorial.
+
+
+@heading POST request
+Posted data can be of arbitrary and considerable size; for example, if a user uploads a big
+image to the server. Similar to the case of the header fields, there may also be different streams
+of posted data, such as one containing the text of an editbox and another the state of a button.
+Likewise, we will have to register an iterator function that is going to be called maybe several times
+not only if there are different POSTs but also if one POST has only been received partly yet and
+needs processing before another chunk can be received.
+
+Such an iterator function is called by a @emph{postprocessor}, which must be created upon arriving
+of the post request. We want the iterator function to read the first post data which is tagged
+@code{name} and to create an individual greeting string based on the template and the name.
+But in order to pass this string to other functions and still be able to differentiate different
+connections, we must first define a structure to share the information, holding the most import entries.
+
+@verbatim
+struct connection_info_struct
+{
+ int connectiontype;
+ char *answerstring;
+ struct MHD_PostProcessor *postprocessor;
+};
+@end verbatim
+@noindent
+
+With these information available to the iterator function, it is able to fulfill its task.
+Once it has composed the greeting string, it returns @code{MHD_NO} to inform the post processor
+that it does not need to be called again. Note that this function does not handle processing
+of data for the same @code{key}. If we were to expect that the name will be posted in several
+chunks, we had to expand the namestring dynamically as additional parts of it with the same @code{key}
+came in. But in this example, the name is assumed to fit entirely inside one single packet.
+
+@verbatim
+static int
+iterate_post (void *coninfo_cls, enum MHD_ValueKind kind, const char *key,
+ const char *filename, const char *content_type,
+ const char *transfer_encoding, const char *data,
+ uint64_t off, size_t size)
+{
+ struct connection_info_struct *con_info = coninfo_cls;
+
+ if (0 == strcmp (key, "name"))
+ {
+ if ((size > 0) && (size <= MAXNAMESIZE))
+ {
+ char *answerstring;
+ answerstring = malloc (MAXANSWERSIZE);
+ if (!answerstring) return MHD_NO;
+
+ snprintf (answerstring, MAXANSWERSIZE, greatingpage, data);
+ con_info->answerstring = answerstring;
+ }
+ else con_info->answerstring = NULL;
+
+ return MHD_NO;
+ }
+
+ return MHD_YES;
+}
+@end verbatim
+@noindent
+
+Once a connection has been established, it can be terminated for many reasons. As these
+reasons include unexpected events, we have to register another function that cleans up any resources
+that might have been allocated for that connection by us, namely the post processor and the greetings
+string. This cleanup function must take into account that it will also be called for finished
+requests other than @emph{POST} requests.
+
+@verbatim
+void request_completed (void *cls, struct MHD_Connection *connection,
+ void **req_cls,
+ enum MHD_RequestTerminationCode toe)
+{
+ struct connection_info_struct *con_info = *req_cls;
+
+ if (NULL == con_info) return;
+ if (con_info->connectiontype == POST)
+ {
+ MHD_destroy_post_processor (con_info->postprocessor);
+ if (con_info->answerstring) free (con_info->answerstring);
+ }
+
+ free (con_info);
+ *req_cls = NULL;
+}
+@end verbatim
+@noindent
+
+@emph{GNU libmicrohttpd} is informed that it shall call the above function when the daemon is started
+in the main function.
+
+@verbatim
+...
+daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD, PORT, NULL, NULL,
+ &answer_to_connection, NULL,
+ MHD_OPTION_NOTIFY_COMPLETED, &request_completed, NULL,
+ MHD_OPTION_END);
+...
+@end verbatim
+@noindent
+
+@heading Request handling
+With all other functions prepared, we can now discuss the actual request handling.
+
+On the first iteration for a new request, we start by allocating a new instance of a
+@code{struct connection_info_struct} structure, which will store all necessary information for later
+iterations and other functions.
+
+@verbatim
+static int
+answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data,
+ size_t *upload_data_size, void **req_cls)
+{
+ if(NULL == *req_cls)
+ {
+ struct connection_info_struct *con_info;
+
+ con_info = malloc (sizeof (struct connection_info_struct));
+ if (NULL == con_info) return MHD_NO;
+ con_info->answerstring = NULL;
+@end verbatim
+@noindent
+
+If the new request is a @emph{POST}, the postprocessor must be created now. In addition, the type
+of the request is stored for convenience.
+@verbatim
+ if (0 == strcmp (method, "POST"))
+ {
+ con_info->postprocessor
+ = MHD_create_post_processor (connection, POSTBUFFERSIZE,
+ iterate_post, (void*) con_info);
+
+ if (NULL == con_info->postprocessor)
+ {
+ free (con_info);
+ return MHD_NO;
+ }
+ con_info->connectiontype = POST;
+ }
+ else con_info->connectiontype = GET;
+@end verbatim
+@noindent
+
+The address of our structure will both serve as the indicator for successive iterations and to remember
+the particular details about the connection.
+@verbatim
+ *req_cls = (void*) con_info;
+ return MHD_YES;
+ }
+@end verbatim
+@noindent
+
+The rest of the function will not be executed on the first iteration. A @emph{GET} request is easily
+satisfied by sending the question form.
+@verbatim
+ if (0 == strcmp (method, "GET"))
+ {
+ return send_page (connection, askpage);
+ }
+@end verbatim
+@noindent
+
+In case of @emph{POST}, we invoke the post processor for as long as data keeps incoming, setting
+@code{*upload_data_size} to zero in order to indicate that we have processed---or at least have
+considered---all of it.
+@verbatim
+ if (0 == strcmp (method, "POST"))
+ {
+ struct connection_info_struct *con_info = *req_cls;
+
+ if (*upload_data_size != 0)
+ {
+ MHD_post_process (con_info->postprocessor, upload_data,
+ *upload_data_size);
+ *upload_data_size = 0;
+
+ return MHD_YES;
+ }
+ else if (NULL != con_info->answerstring)
+ return send_page (connection, con_info->answerstring);
+ }
+@end verbatim
+@noindent
+
+Finally, if they are neither @emph{GET} nor @emph{POST} requests, the error page is returned.
+@verbatim
+ return send_page(connection, errorpage);
+}
+@end verbatim
+@noindent
+
+These were the important parts of the program @code{simplepost.c}.
diff --git a/doc/chapters/responseheaders.inc b/doc/chapters/responseheaders.inc
@@ -0,0 +1,193 @@
+Now that we are able to inspect the incoming request in great detail,
+this chapter discusses the means to enrich the outgoing responses likewise.
+
+As you have learned in the @emph{Hello, Browser} chapter, some obligatory
+header fields are added and set automatically for simple responses by the library
+itself but if more advanced features are desired, additional fields have to be created.
+One of the possible fields is the content type field and an example will be developed around it.
+This will lead to an application capable of correctly serving different types of files.
+
+
+When we responded with HTML page packed in the static string previously, the client had no choice
+but guessing about how to handle the response, because the server had not told him.
+What if we had sent a picture or a sound file? Would the message have been understood
+or merely been displayed as an endless stream of random characters in the browser?
+This is what the mime content types are for. The header of the response is extended
+by certain information about how the data is to be interpreted.
+
+To introduce the concept, a picture of the format @emph{PNG} will be sent to the client
+and labeled accordingly with @code{image/png}.
+Once again, we can base the new example on the @code{hellobrowser} program.
+
+@verbatim
+#define FILENAME "picture.png"
+#define MIMETYPE "image/png"
+
+static int
+answer_to_connection (void *cls, struct MHD_Connection *connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data,
+ size_t *upload_data_size, void **req_cls)
+{
+ unsigned char *buffer = NULL;
+ struct MHD_Response *response;
+@end verbatim
+@noindent
+
+We want the program to open the file for reading and determine its size:
+@verbatim
+ int fd;
+ int ret;
+ struct stat sbuf;
+
+ if (0 != strcmp (method, "GET"))
+ return MHD_NO;
+ if ( (-1 == (fd = open (FILENAME, O_RDONLY))) ||
+ (0 != fstat (fd, &sbuf)) )
+ {
+ /* error accessing file */
+ /* ... (see below) */
+ }
+ /* ... (see below) */
+@end verbatim
+@noindent
+
+When dealing with files, there is a lot that could go wrong on the
+server side and if so, the client should be informed with @code{MHD_HTTP_INTERNAL_SERVER_ERROR}.
+
+@verbatim
+ /* error accessing file */
+ if (fd != -1) close (fd);
+ const char *errorstr =
+ "<html><body>An internal server error has occurred!\
+ </body></html>";
+ response =
+ MHD_create_response_from_buffer (strlen (errorstr),
+ (void *) errorstr,
+ MHD_RESPMEM_PERSISTENT);
+ if (response)
+ {
+ ret =
+ MHD_queue_response (connection, MHD_HTTP_INTERNAL_SERVER_ERROR,
+ response);
+ MHD_destroy_response (response);
+
+ return MHD_YES;
+ }
+ else
+ return MHD_NO;
+ if (!ret)
+ {
+ const char *errorstr = "<html><body>An internal server error has occurred!\
+ </body></html>";
+
+ if (buffer) free(buffer);
+
+ response = MHD_create_response_from_buffer (strlen(errorstr), (void*) errorstr,
+ MHD_RESPMEM_PERSISTENT);
+
+ if (response)
+ {
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ response);
+ MHD_destroy_response (response);
+
+ return MHD_YES;
+ }
+ else return MHD_NO;
+ }
+@end verbatim
+@noindent
+
+Note that we nevertheless have to create a response object even for sending a simple error code.
+Otherwise, the connection would just be closed without comment, leaving the client curious about
+what has happened.
+
+But in the case of success a response will be constructed directly from the file descriptor:
+
+@verbatim
+ /* error accessing file */
+ /* ... (see above) */
+ }
+
+ response =
+ MHD_create_response_from_fd_at_offset (sbuf.st_size, fd, 0);
+ MHD_add_response_header (response, "Content-Type", MIMETYPE);
+ ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
+ MHD_destroy_response (response);
+@end verbatim
+@noindent
+
+Note that the response object will take care of closing the file descriptor for us.
+
+Up to this point, there was little new. The actual novelty is that we enhance the header with the
+meta data about the content. Aware of the field's name we want to add, it is as easy as that:
+@verbatim
+MHD_add_response_header(response, "Content-Type", MIMETYPE);
+@end verbatim
+@noindent
+We do not have to append a colon expected by the protocol behind the first
+field---@emph{GNU libhttpdmicro} will take care of this.
+
+The function finishes with the well-known lines
+@verbatim
+ ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
+ MHD_destroy_response (response);
+ return ret;
+}
+@end verbatim
+@noindent
+
+The complete program @code{responseheaders.c} is in the @code{examples} section as usual.
+Find a @emph{PNG} file you like and save it to the directory the example is run from under the name
+@code{picture.png}. You should find the image displayed on your browser if everything worked well.
+
+@heading Remarks
+The include file of the @emph{MHD} library comes with the header types mentioned in @emph{RFC 2616}
+already defined as macros. Thus, we could have written @code{MHD_HTTP_HEADER_CONTENT_TYPE} instead
+of @code{"Content-Type"} as well. However, one is not limited to these standard headers and could
+add custom response headers without violating the protocol. Whether, and how, the client would react
+to these custom header is up to the receiver. Likewise, the client is allowed to send custom request
+headers to the server as well, opening up yet more possibilities how client and server could
+communicate with each other.
+
+The method of creating the response from a file on disk only works for static content.
+Serving dynamically created responses will be a topic of a future chapter.
+
+@heading Exercises
+@itemize @bullet
+
+@item
+Remember that the original program was written under a few assumptions---a static response
+using a local file being one of them. In order to simulate a very large or hard to reach file that cannot be provided
+instantly, postpone the queuing in the callback with the @code{sleep} function for 30 seconds
+@emph{if} the file @code{/big.png} is requested (but deliver the same as above). A request for
+@code{/picture.png} should provide just the same but without any artificial delays.
+
+Now start two instances of your browser (or even use two machines) and see how the second client
+is put on hold while the first waits for his request on the slow file to be fulfilled.
+
+Finally, change the sourcecode to use @code{MHD_USE_THREAD_PER_CONNECTION} when the daemon is
+started and try again.
+
+
+@item
+Did you succeed in implementing the clock exercise yet? This time, let the server save the
+program's start time @code{t} and implement a response simulating a countdown that reaches 0 at
+@code{t+60}. Returning a message saying on which point the countdown is, the response should
+ultimately be to reply "Done" if the program has been running long enough,
+
+An unofficial, but widely understood, response header line is @code{Refresh: DELAY; url=URL} with
+the uppercase words substituted to tell the client it should request the given resource after
+the given delay again. Improve your program in that the browser (any modern browser should work)
+automatically reconnects and asks for the status again every 5 seconds or so. The URL would have
+to be composed so that it begins with "http://", followed by the @emph{URI} the server is reachable
+from the client's point of view.
+
+Maybe you want also to visualize the countdown as a status bar by creating a
+@code{<table>} consisting of one row and @code{n} columns whose fields contain small images of either
+a red or a green light.
+
+@end itemize
diff --git a/doc/chapters/sessions.inc b/doc/chapters/sessions.inc
@@ -0,0 +1,88 @@
+This chapter discusses how one should manage sessions, that is, share state between multiple
+HTTP requests from the same user. We use a simple example where the user submits multiple
+forms and the server is supposed to accumulate state from all of these forms. Naturally, as
+this is a network protocol, our session mechanism must support having many users with
+many concurrent sessions at the same time.
+
+In order to track users, we use a simple session cookie. A session cookie expires when the
+user closes the browser. Changing from session cookies to persistent cookies only requires
+adding an expiration time to the cookie. The server creates a fresh session cookie whenever
+a request without a cookie is received, or if the supplied session cookie is not known to
+the server.
+
+@heading Looking up the cookie
+
+Since MHD parses the HTTP cookie header for us, looking up an existing cookie
+is straightforward:
+
+@verbatim
+const char *value;
+
+value = MHD_lookup_connection_value (connection,
+ MHD_COOKIE_KIND,
+ "KEY");
+@end verbatim
+
+Here, "KEY" is the name we chose for our session cookie.
+
+
+@heading Setting the cookie header
+
+MHD requires the user to provide the full cookie format string in order to set
+cookies. In order to generate a unique cookie, our example creates a random
+64-character text string to be used as the value of the cookie:
+
+@verbatim
+char value[128];
+char raw_value[65];
+
+for (unsigned int i=0;i<sizeof (raw_value);i++)
+ raw_value = 'A' + (rand () % 26); /* bad PRNG! */
+raw_value[64] = '\0';
+snprintf (value, sizeof (value),
+ "%s=%s",
+ "KEY",
+ raw_value);
+@end verbatim
+
+Given this cookie value, we can then set the cookie header in our HTTP response
+as follows:
+
+@verbatim
+assert (MHD_YES ==
+ MHD_set_connection_value (connection,
+ MHD_HEADER_KIND,
+ MHD_HTTP_HEADER_SET_COOKIE,
+ value));
+@end verbatim
+
+
+@heading Remark: Session expiration
+
+It is of course possible that clients stop their interaction with the
+server at any time. In order to avoid using too much storage, the
+server must thus discard inactive sessions at some point. Our example
+implements this by discarding inactive sessions after a certain amount
+of time. Alternatively, the implementation may limit the total number
+of active sessions. Which bounds are used for idle sessions or the
+total number of sessions obviously depends largely on the type of
+the application and available server resources.
+
+@heading Example code
+
+A sample application implementing a website with multiple
+forms (which are dynamically created using values from previous
+POST requests from the same session) is available
+as the example @code{sessions.c}.
+
+Note that the example uses a simple, $O(n)$ linked list traversal to
+look up sessions and to expire old sessions. Using a hash table and a
+heap would be more appropriate if a large number of concurrent
+sessions is expected.
+
+@heading Remarks
+
+Naturally, it is quite conceivable to store session data in a database
+instead of in memory. Still, having mechanisms to expire data
+associated with long-time idle sessions (where the business process
+has still not finished) is likely a good idea.
diff --git a/doc/chapters/tlsauthentication.inc b/doc/chapters/tlsauthentication.inc
@@ -0,0 +1,495 @@
+We left the basic authentication chapter with the unsatisfactory conclusion that
+any traffic, including the credentials, could be intercepted by anyone between
+the browser client and the server. Protecting the data while it is sent over
+unsecured lines will be the goal of this chapter.
+
+Since version 0.4, the @emph{MHD} library includes support for encrypting the
+traffic by employing SSL/TSL. If @emph{GNU libmicrohttpd} has been configured to
+support these, encryption and decryption can be applied transparently on the
+data being sent, with only minimal changes to the actual source code of the example.
+
+
+@heading Preparation
+
+First, a private key for the server will be generated. With this key, the server
+will later be able to authenticate itself to the client---preventing anyone else
+from stealing the password by faking its identity. The @emph{OpenSSL} suite, which
+is available on many operating systems, can generate such a key. For the scope of
+this tutorial, we will be content with a 1024 bit key:
+@verbatim
+> openssl genrsa -out server.key 1024
+@end verbatim
+@noindent
+
+In addition to the key, a certificate describing the server in human readable tokens
+is also needed. This certificate will be attested with our aforementioned key. In this way,
+we obtain a self-signed certificate, valid for one year.
+
+@verbatim
+> openssl req -days 365 -out server.pem -new -x509 -key server.key
+@end verbatim
+@noindent
+
+To avoid unnecessary error messages in the browser, the certificate needs to
+have a name that matches the @emph{URI}, for example, "localhost" or the domain.
+If you plan to have a publicly reachable server, you will need to ask a trusted third party,
+called @emph{Certificate Authority}, or @emph{CA}, to attest the certificate for you. This way,
+any visitor can make sure the server's identity is real.
+
+Whether the server's certificate is signed by us or a third party, once it has been accepted
+by the client, both sides will be communicating over encrypted channels. From this point on,
+it is the client's turn to authenticate itself. But this has already been implemented in the basic
+authentication scheme.
+
+
+@heading Changing the source code
+
+We merely have to extend the server program so that it loads the two files into memory,
+
+@verbatim
+int
+main ()
+{
+ struct MHD_Daemon *daemon;
+ char *key_pem;
+ char *cert_pem;
+
+ key_pem = load_file (SERVERKEYFILE);
+ cert_pem = load_file (SERVERCERTFILE);
+
+ if ((key_pem == NULL) || (cert_pem == NULL))
+ {
+ printf ("The key/certificate files could not be read.\n");
+ return 1;
+ }
+@end verbatim
+@noindent
+
+and then we point the @emph{MHD} daemon to it upon initialization.
+@verbatim
+
+ daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL,
+ PORT, NULL, NULL,
+ &answer_to_connection, NULL,
+ MHD_OPTION_HTTPS_MEM_KEY, key_pem,
+ MHD_OPTION_HTTPS_MEM_CERT, cert_pem,
+ MHD_OPTION_END);
+
+ if (NULL == daemon)
+ {
+ printf ("%s\n", cert_pem);
+
+ free (key_pem);
+ free (cert_pem);
+
+ return 1;
+ }
+@end verbatim
+@noindent
+
+
+The rest consists of little new besides some additional memory cleanups.
+@verbatim
+
+ getchar ();
+
+ MHD_stop_daemon (daemon);
+ free (key_pem);
+ free (cert_pem);
+
+ return 0;
+}
+@end verbatim
+@noindent
+
+
+The rather unexciting file loader can be found in the complete example @code{tlsauthentication.c}.
+
+
+@heading Remarks
+@itemize @bullet
+@item
+While the standard @emph{HTTP} port is 80, it is 443 for @emph{HTTPS}. The common internet browsers assume
+standard @emph{HTTP} if they are asked to access other ports than these. Therefore, you will have to type
+@code{https://localhost:8888} explicitly when you test the example, or the browser will not know how to
+handle the answer properly.
+
+@item
+The remaining weak point is the question how the server will be trusted initially. Either a @emph{CA} signs the
+certificate or the client obtains the key over secure means. Anyway, the clients have to be aware (or configured)
+that they should not accept certificates of unknown origin.
+
+@item
+The introduced method of certificates makes it mandatory to set an expiration date---making it less feasible to
+hardcode certificates in embedded devices.
+
+@item
+The cryptographic facilities consume memory space and computing time. For this reason, websites usually consists
+both of uncritically @emph{HTTP} parts and secured @emph{HTTPS}.
+
+@end itemize
+
+
+@heading Client authentication
+
+You can also use MHD to authenticate the client via SSL/TLS certificates
+(as an alternative to using the password-based Basic or Digest authentication).
+To do this, you will need to link your application against @emph{gnutls}.
+Next, when you start the MHD daemon, you must specify the root CA that you're
+willing to trust:
+@verbatim
+ daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL,
+ PORT, NULL, NULL,
+ &answer_to_connection, NULL,
+ MHD_OPTION_HTTPS_MEM_KEY, key_pem,
+ MHD_OPTION_HTTPS_MEM_CERT, cert_pem,
+ MHD_OPTION_HTTPS_MEM_TRUST, root_ca_pem,
+ MHD_OPTION_END);
+@end verbatim
+
+With this, you can then obtain client certificates for each session.
+In order to obtain the identity of the client, you first need to
+obtain the raw GnuTLS session handle from @emph{MHD} using
+@code{MHD_get_connection_info}.
+
+@verbatim
+#include <gnutls/gnutls.h>
+#include <gnutls/x509.h>
+
+gnutls_session_t tls_session;
+union MHD_ConnectionInfo *ci;
+
+ci = MHD_get_connection_info (connection,
+ MHD_CONNECTION_INFO_GNUTLS_SESSION);
+tls_session = (gnutls_session_t) ci->tls_session;
+@end verbatim
+
+You can then extract the client certificate:
+
+@verbatim
+/**
+ * Get the client's certificate
+ *
+ * @param tls_session the TLS session
+ * @return NULL if no valid client certificate could be found, a pointer
+ * to the certificate if found
+ */
+static gnutls_x509_crt_t
+get_client_certificate (gnutls_session_t tls_session)
+{
+ unsigned int listsize;
+ const gnutls_datum_t * pcert;
+ gnutls_certificate_status_t client_cert_status;
+ gnutls_x509_crt_t client_cert;
+
+ if (tls_session == NULL)
+ return NULL;
+ if (gnutls_certificate_verify_peers2(tls_session,
+ &client_cert_status))
+ return NULL;
+ if (0 != client_cert_status)
+ {
+ fprintf (stderr,
+ "Failed client certificate invalid: %d\n",
+ client_cert_status);
+ return NULL;
+ }
+ pcert = gnutls_certificate_get_peers(tls_session,
+ &listsize);
+ if ( (pcert == NULL) ||
+ (listsize == 0))
+ {
+ fprintf (stderr,
+ "Failed to retrieve client certificate chain\n");
+ return NULL;
+ }
+ if (gnutls_x509_crt_init(&client_cert))
+ {
+ fprintf (stderr,
+ "Failed to initialize client certificate\n");
+ return NULL;
+ }
+ /* Note that by passing values between 0 and listsize here, you
+ can get access to the CA's certs */
+ if (gnutls_x509_crt_import(client_cert,
+ &pcert[0],
+ GNUTLS_X509_FMT_DER))
+ {
+ fprintf (stderr,
+ "Failed to import client certificate\n");
+ gnutls_x509_crt_deinit(client_cert);
+ return NULL;
+ }
+ return client_cert;
+}
+@end verbatim
+
+Using the client certificate, you can then get the client's distinguished name
+and alternative names:
+
+@verbatim
+/**
+ * Get the distinguished name from the client's certificate
+ *
+ * @param client_cert the client certificate
+ * @return NULL if no dn or certificate could be found, a pointer
+ * to the dn if found
+ */
+char *
+cert_auth_get_dn(gnutls_x509_crt_t client_cert)
+{
+ char* buf;
+ size_t lbuf;
+
+ lbuf = 0;
+ gnutls_x509_crt_get_dn(client_cert, NULL, &lbuf);
+ buf = malloc(lbuf);
+ if (buf == NULL)
+ {
+ fprintf (stderr,
+ "Failed to allocate memory for certificate dn\n");
+ return NULL;
+ }
+ gnutls_x509_crt_get_dn(client_cert, buf, &lbuf);
+ return buf;
+}
+
+
+/**
+ * Get the alternative name of specified type from the client's certificate
+ *
+ * @param client_cert the client certificate
+ * @param nametype The requested name type
+ * @param index The position of the alternative name if multiple names are
+ * matching the requested type, 0 for the first matching name
+ * @return NULL if no matching alternative name could be found, a pointer
+ * to the alternative name if found
+ */
+char *
+MHD_cert_auth_get_alt_name(gnutls_x509_crt_t client_cert,
+ int nametype,
+ unsigned int index)
+{
+ char* buf;
+ size_t lbuf;
+ unsigned int seq;
+ unsigned int subseq;
+ unsigned int type;
+ int result;
+
+ subseq = 0;
+ for (seq=0;;seq++)
+ {
+ lbuf = 0;
+ result = gnutls_x509_crt_get_subject_alt_name2(client_cert, seq, NULL, &lbuf,
+ &type, NULL);
+ if (result == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE)
+ return NULL;
+ if (nametype != (int) type)
+ continue;
+ if (subseq == index)
+ break;
+ subseq++;
+ }
+ buf = malloc(lbuf);
+ if (buf == NULL)
+ {
+ fprintf (stderr,
+ "Failed to allocate memory for certificate alt name\n");
+ return NULL;
+ }
+ result = gnutls_x509_crt_get_subject_alt_name2(client_cert,
+ seq,
+ buf,
+ &lbuf,
+ NULL, NULL);
+ if (result != nametype)
+ {
+ fprintf (stderr,
+ "Unexpected return value from gnutls: %d\n",
+ result);
+ free (buf);
+ return NULL;
+ }
+ return buf;
+}
+@end verbatim
+
+Finally, you should release the memory associated with the client
+certificate:
+
+@verbatim
+gnutls_x509_crt_deinit (client_cert);
+@end verbatim
+
+
+
+@heading Using TLS Server Name Indication (SNI)
+
+SNI enables hosting multiple domains under one IP address with TLS. So
+SNI is the TLS-equivalent of virtual hosting. To use SNI with MHD, you
+need at least GnuTLS 3.0. The main change compared to the simple hosting
+of one domain is that you need to provide a callback instead of the key
+and certificate. For example, when you start the MHD daemon, you could
+do this:
+@verbatim
+ daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SSL,
+ PORT, NULL, NULL,
+ &answer_to_connection, NULL,
+ MHD_OPTION_HTTPS_CERT_CALLBACK, &sni_callback,
+ MHD_OPTION_END);
+@end verbatim
+Here, @code{sni_callback} is the name of a function that you will have to
+implement to retrieve the X.509 certificate for an incoming connection.
+The callback has type @code{gnutls_certificate_retrieve_function2} and
+is documented in the GnuTLS API for the @code{gnutls_certificate_set_retrieve_function2}
+as follows:
+
+@deftypefn {Function Pointer} int {*gnutls_certificate_retrieve_function2} (gnutls_session_t, const gnutls_datum_t* req_ca_dn, int nreqs, const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_pcert_st** pcert, unsigned int *pcert_length, gnutls_privkey_t * pkey)
+
+@table @var
+@item req_ca_cert
+is only used in X.509 certificates. Contains a list with the CA names that the server considers trusted. Normally we should send a certificate that is signed by one of these CAs. These names are DER encoded. To get a more meaningful value use the function @code{gnutls_x509_rdn_get()}.
+
+@item pk_algos
+contains a list with server’s acceptable signature algorithms. The certificate returned should support the server’s given algorithms.
+
+@item pcert
+should contain a single certificate and public or a list of them.
+
+@item pcert_length
+is the size of the previous list.
+
+@item pkey
+is the private key.
+@end table
+@end deftypefn
+
+A possible implementation of this callback would look like this:
+
+@verbatim
+struct Hosts
+{
+ struct Hosts *next;
+ const char *hostname;
+ gnutls_pcert_st pcrt;
+ gnutls_privkey_t key;
+};
+
+static struct Hosts *hosts;
+
+int
+sni_callback (gnutls_session_t session,
+ const gnutls_datum_t* req_ca_dn,
+ int nreqs,
+ const gnutls_pk_algorithm_t* pk_algos,
+ int pk_algos_length,
+ gnutls_pcert_st** pcert,
+ unsigned int *pcert_length,
+ gnutls_privkey_t * pkey)
+{
+ char name[256];
+ size_t name_len;
+ struct Hosts *host;
+ unsigned int type;
+
+ name_len = sizeof (name);
+ if (GNUTLS_E_SUCCESS !=
+ gnutls_server_name_get (session,
+ name,
+ &name_len,
+ &type,
+ 0 /* index */))
+ return -1;
+ for (host = hosts; NULL != host; host = host->next)
+ if (0 == strncmp (name, host->hostname, name_len))
+ break;
+ if (NULL == host)
+ {
+ fprintf (stderr,
+ "Need certificate for %.*s\n",
+ (int) name_len,
+ name);
+ return -1;
+ }
+ fprintf (stderr,
+ "Returning certificate for %.*s\n",
+ (int) name_len,
+ name);
+ *pkey = host->key;
+ *pcert_length = 1;
+ *pcert = &host->pcrt;
+ return 0;
+}
+@end verbatim
+
+Note that MHD cannot offer passing a closure or any other additional information
+to this callback, as the GnuTLS API unfortunately does not permit this at this
+point.
+
+The @code{hosts} list can be initialized by loading the private keys and X.509
+certificates from disk as follows:
+
+@verbatim
+static void
+load_keys(const char *hostname,
+ const char *CERT_FILE,
+ const char *KEY_FILE)
+{
+ int ret;
+ gnutls_datum_t data;
+ struct Hosts *host;
+
+ host = malloc (sizeof (struct Hosts));
+ host->hostname = hostname;
+ host->next = hosts;
+ hosts = host;
+
+ ret = gnutls_load_file (CERT_FILE, &data);
+ if (ret < 0)
+ {
+ fprintf (stderr,
+ "*** Error loading certificate file %s.\n",
+ CERT_FILE);
+ exit(1);
+ }
+ ret =
+ gnutls_pcert_import_x509_raw (&host->pcrt, &data, GNUTLS_X509_FMT_PEM,
+ 0);
+ if (ret < 0)
+ {
+ fprintf(stderr,
+ "*** Error loading certificate file: %s\n",
+ gnutls_strerror (ret));
+ exit(1);
+ }
+ gnutls_free (data.data);
+
+ ret = gnutls_load_file (KEY_FILE, &data);
+ if (ret < 0)
+ {
+ fprintf (stderr,
+ "*** Error loading key file %s.\n",
+ KEY_FILE);
+ exit(1);
+ }
+
+ gnutls_privkey_init (&host->key);
+ ret =
+ gnutls_privkey_import_x509_raw (host->key,
+ &data, GNUTLS_X509_FMT_PEM,
+ NULL, 0);
+ if (ret < 0)
+ {
+ fprintf (stderr,
+ "*** Error loading key file: %s\n",
+ gnutls_strerror (ret));
+ exit(1);
+ }
+ gnutls_free (data.data);
+}
+@end verbatim
+
+The code above was largely lifted from GnuTLS. You can find other
+methods for initializing certificates and keys in the GnuTLS manual
+and source code.
diff --git a/doc/chapters/websocket.inc b/doc/chapters/websocket.inc
@@ -0,0 +1,886 @@
+Websockets are a genuine way to implement push notifications,
+where the server initiates the communication while the client can be idle.
+Usually a HTTP communication is half-duplex and always requested by the client,
+but websockets are full-duplex and only initialized by the client.
+In the further communication both sites can use the websocket at any time
+to send data to the other site.
+
+To initialize a websocket connection the client sends a special HTTP request
+to the server and initializes
+a handshake between client and server which switches from the HTTP protocol
+to the websocket protocol.
+Thus both the server as well as the client must support websockets.
+If proxys are used, they must support websockets too.
+In this chapter we take a look on server and client, but with a focus on
+the server with @emph{libmicrohttpd}.
+
+Since version 0.9.52 @emph{libmicrohttpd} supports upgrading requests,
+which is required for switching from the HTTP protocol.
+Since version 0.9.74 the library @emph{libmicrohttpd_ws} has been added
+to support the websocket protocol.
+
+@heading Upgrading connections with libmicrohttpd
+
+To support websockets we need to enable upgrading of HTTP connections first.
+This is done by passing the flag @code{MHD_ALLOW_UPGRADE} to
+@code{MHD_start_daemon()}.
+
+
+@verbatim
+daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD |
+ MHD_USE_THREAD_PER_CONNECTION |
+ MHD_ALLOW_UPGRADE |
+ MHD_USE_ERROR_LOG,
+ PORT, NULL, NULL,
+ &access_handler, NULL,
+ MHD_OPTION_END);
+@end verbatim
+@noindent
+
+
+The next step is to turn a specific request into an upgraded connection.
+This done in our @code{access_handler} by calling
+@code{MHD_create_response_for_upgrade()}.
+An @code{upgrade_handler} will be passed to perform the low-level actions
+on the socket.
+
+@emph{Please note that the socket here is just a regular socket as provided
+by the operating system.
+To use it as a websocket, some more steps from the following
+chapters are required.}
+
+
+@verbatim
+static enum MHD_Result
+access_handler (void *cls,
+ struct MHD_Connection *connection,
+ const char *url,
+ const char *method,
+ const char *version,
+ const char *upload_data,
+ size_t *upload_data_size,
+ void **ptr)
+{
+ /* ... */
+ /* some code to decide whether to upgrade or not */
+ /* ... */
+
+ /* create the response for upgrade */
+ response = MHD_create_response_for_upgrade (&upgrade_handler,
+ NULL);
+
+ /* ... */
+ /* additional headers, etc. */
+ /* ... */
+
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_SWITCHING_PROTOCOLS,
+ response);
+ MHD_destroy_response (response);
+
+ return ret;
+}
+@end verbatim
+@noindent
+
+
+In the @code{upgrade_handler} we receive the low-level socket,
+which is used for the communication with the specific client.
+In addition to the low-level socket we get:
+@itemize @bullet
+@item
+Some data, which has been read too much while @emph{libmicrohttpd} was
+switching the protocols.
+This value is usually empty, because it would mean that the client
+has sent data before the handshake was complete.
+
+@item
+A @code{struct MHD_UpgradeResponseHandle} which is used to perform
+special actions like closing, corking or uncorking the socket.
+These commands are executed by passing the handle
+to @code{MHD_upgrade_action()}.
+
+
+@end itemize
+
+Depending of the flags specified while calling @code{MHD_start_deamon()}
+our @code{upgrade_handler} is either executed in the same thread
+as our daemon or in a thread specific for each connection.
+If it is executed in the same thread then @code{upgrade_handler} is
+a blocking call for our webserver and
+we should finish it as fast as possible (i. e. by creating a thread and
+passing the information there).
+If @code{MHD_USE_THREAD_PER_CONNECTION} was passed to
+@code{MHD_start_daemon()} then a separate thread is used and
+thus our @code{upgrade_handler} needs not to start a separate thread.
+
+An @code{upgrade_handler}, which is called with a separate thread
+per connection, could look like this:
+
+
+@verbatim
+static void
+upgrade_handler (void *cls,
+ struct MHD_Connection *connection,
+ void *req_cls,
+ const char *extra_in,
+ size_t extra_in_size,
+ MHD_socket fd,
+ struct MHD_UpgradeResponseHandle *urh)
+{
+ /* ... */
+ /* do something with the socket `fd` like `recv()` or `send()` */
+ /* ... */
+
+ /* close the socket when it is not needed anymore */
+ MHD_upgrade_action (urh,
+ MHD_UPGRADE_ACTION_CLOSE);
+}
+@end verbatim
+@noindent
+
+
+This is all you need to know for upgrading connections
+with @emph{libmicrohttpd}.
+The next chapters focus on using the websocket protocol
+with @emph{libmicrohttpd_ws}.
+
+
+@heading Websocket handshake with libmicrohttpd_ws
+
+To request a websocket connection the client must send
+the following information with the HTTP request:
+
+@itemize @bullet
+@item
+A @code{GET} request must be sent.
+
+@item
+The version of the HTTP protocol must be 1.1 or higher.
+
+@item
+A @code{Host} header field must be sent
+
+@item
+A @code{Upgrade} header field containing the keyword "websocket"
+(case-insensitive).
+Please note that the client could pass multiple protocols separated by comma.
+
+@item
+A @code{Connection} header field that includes the token "Upgrade"
+(case-insensitive).
+Please note that the client could pass multiple tokens separated by comma.
+
+@item
+A @code{Sec-WebSocket-Key} header field with a base64-encoded value.
+The decoded the value is 16 bytes long
+and has been generated randomly by the client.
+
+@item
+A @code{Sec-WebSocket-Version} header field with the value "13".
+
+@end itemize
+
+
+Optionally the client can also send the following information:
+
+
+@itemize @bullet
+@item
+A @code{Origin} header field can be used to determine the source
+of the client (i. e. the website).
+
+@item
+A @code{Sec-WebSocket-Protocol} header field can contain a list
+of supported protocols by the client, which can be sent over the websocket.
+
+@item
+A @code{Sec-WebSocket-Extensions} header field which may contain extensions
+to the websocket protocol. The extensions must be registered by IANA.
+
+@end itemize
+
+
+A valid example request from the client could look like this:
+
+
+@verbatim
+GET /chat HTTP/1.1
+Host: server.example.com
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
+Sec-WebSocket-Version: 13
+@end verbatim
+@noindent
+
+
+To complete the handshake the server must respond with
+some specific response headers:
+
+@itemize @bullet
+@item
+The HTTP response code @code{101 Switching Protocols} must be answered.
+
+@item
+An @code{Upgrade} header field containing the value "websocket" must be sent.
+
+@item
+A @code{Connection} header field containing the value "Upgrade" must be sent.
+
+@item
+A @code{Sec-WebSocket-Accept} header field containing a value, which
+has been calculated from the @code{Sec-WebSocket-Key} request header field,
+must be sent.
+
+@end itemize
+
+
+Optionally the server may send following headers:
+
+
+@itemize @bullet
+@item
+A @code{Sec-WebSocket-Protocol} header field containing a protocol
+of the list specified in the corresponding request header field.
+
+@item
+A @code{Sec-WebSocket-Extension} header field containing all used extensions
+of the list specified in the corresponding request header field.
+
+@end itemize
+
+
+A valid websocket HTTP response could look like this:
+
+@verbatim
+HTTP/1.1 101 Switching Protocols
+Upgrade: websocket
+Connection: Upgrade
+Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
+@end verbatim
+@noindent
+
+
+To upgrade a connection to a websocket the @emph{libmicrohttpd_ws} provides
+some helper functions for the @code{access_handler} callback function:
+
+@itemize @bullet
+@item
+@code{MHD_websocket_check_http_version()} checks whether the HTTP version
+is 1.1 or above.
+
+@item
+@code{MHD_websocket_check_connection_header()} checks whether the value
+of the @code{Connection} request header field contains
+an "Upgrade" token (case-insensitive).
+
+@item
+@code{MHD_websocket_check_upgrade_header()} checks whether the value
+of the @code{Upgrade} request header field contains
+the "websocket" keyword (case-insensitive).
+
+@item
+@code{MHD_websocket_check_version_header()} checks whether the value
+of the @code{Sec-WebSocket-Version} request header field is "13".
+
+@item
+@code{MHD_websocket_create_accept_header()} takes the value from
+the @code{Sec-WebSocket-Key} request header and calculates the value
+for the @code{Sec-WebSocket-Accept} response header field.
+
+@end itemize
+
+
+The @code{access_handler} example of the previous chapter can now be
+extended with these helper functions to perform the websocket handshake:
+
+@verbatim
+static enum MHD_Result
+access_handler (void *cls,
+ struct MHD_Connection *connection,
+ const char *url,
+ const char *method,
+ const char *version,
+ const char *upload_data,
+ size_t *upload_data_size,
+ void **ptr)
+{
+ static int aptr;
+ struct MHD_Response *response;
+ int ret;
+
+ (void) cls; /* Unused. Silent compiler warning. */
+ (void) upload_data; /* Unused. Silent compiler warning. */
+ (void) upload_data_size; /* Unused. Silent compiler warning. */
+
+ if (0 != strcmp (method, "GET"))
+ return MHD_NO; /* unexpected method */
+ if (&aptr != *ptr)
+ {
+ /* do never respond on first call */
+ *ptr = &aptr;
+ return MHD_YES;
+ }
+ *ptr = NULL; /* reset when done */
+
+ if (0 == strcmp (url, "/"))
+ {
+ /* Default page for visiting the server */
+ struct MHD_Response *response = MHD_create_response_from_buffer (
+ strlen (PAGE),
+ PAGE,
+ MHD_RESPMEM_PERSISTENT);
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_OK,
+ response);
+ MHD_destroy_response (response);
+ }
+ else if (0 == strcmp (url, "/chat"))
+ {
+ char is_valid = 1;
+ const char* value = NULL;
+ char sec_websocket_accept[29];
+
+ if (0 != MHD_websocket_check_http_version (version))
+ {
+ is_valid = 0;
+ }
+ value = MHD_lookup_connection_value (connection,
+ MHD_HEADER_KIND,
+ MHD_HTTP_HEADER_CONNECTION);
+ if (0 != MHD_websocket_check_connection_header (value))
+ {
+ is_valid = 0;
+ }
+ value = MHD_lookup_connection_value (connection,
+ MHD_HEADER_KIND,
+ MHD_HTTP_HEADER_UPGRADE);
+ if (0 != MHD_websocket_check_upgrade_header (value))
+ {
+ is_valid = 0;
+ }
+ value = MHD_lookup_connection_value (connection,
+ MHD_HEADER_KIND,
+ MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION);
+ if (0 != MHD_websocket_check_version_header (value))
+ {
+ is_valid = 0;
+ }
+ value = MHD_lookup_connection_value (connection,
+ MHD_HEADER_KIND,
+ MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY);
+ if (0 != MHD_websocket_create_accept_header (value, sec_websocket_accept))
+ {
+ is_valid = 0;
+ }
+
+ if (1 == is_valid)
+ {
+ /* upgrade the connection */
+ response = MHD_create_response_for_upgrade (&upgrade_handler,
+ NULL);
+ MHD_add_response_header (response,
+ MHD_HTTP_HEADER_CONNECTION,
+ "Upgrade");
+ MHD_add_response_header (response,
+ MHD_HTTP_HEADER_UPGRADE,
+ "websocket");
+ MHD_add_response_header (response,
+ MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT,
+ sec_websocket_accept);
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_SWITCHING_PROTOCOLS,
+ response);
+ MHD_destroy_response (response);
+ }
+ else
+ {
+ /* return error page */
+ struct MHD_Response*response = MHD_create_response_from_buffer (
+ strlen (PAGE_INVALID_WEBSOCKET_REQUEST),
+ PAGE_INVALID_WEBSOCKET_REQUEST,
+ MHD_RESPMEM_PERSISTENT);
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_BAD_REQUEST,
+ response);
+ MHD_destroy_response (response);
+ }
+ }
+ else
+ {
+ struct MHD_Response*response = MHD_create_response_from_buffer (
+ strlen (PAGE_NOT_FOUND),
+ PAGE_NOT_FOUND,
+ MHD_RESPMEM_PERSISTENT);
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_NOT_FOUND,
+ response);
+ MHD_destroy_response (response);
+ }
+
+ return ret;
+}
+@end verbatim
+@noindent
+
+Please note that we skipped the check of the Host header field here,
+because we don't know the host for this example.
+
+@heading Decoding/encoding the websocket protocol with libmicrohttpd_ws
+
+Once the websocket connection is established you can receive/send frame data
+with the low-level socket functions @code{recv()} and @code{send()}.
+The frame data which goes over the low-level socket is encoded according
+to the websocket protocol.
+To use received payload data, you need to decode the frame data first.
+To send payload data, you need to encode it into frame data first.
+
+@emph{libmicrohttpd_ws} provides several functions for encoding of
+payload data and decoding of frame data:
+
+@itemize @bullet
+@item
+@code{MHD_websocket_decode()} decodes received frame data.
+The payload data may be of any kind, depending upon what the client has sent.
+So this decode function is used for all kind of frames and returns
+the frame type along with the payload data.
+
+@item
+@code{MHD_websocket_encode_text()} encodes text.
+The text must be encoded with UTF-8.
+
+@item
+@code{MHD_websocket_encode_binary()} encodes binary data.
+
+@item
+@code{MHD_websocket_encode_ping()} encodes a ping request to
+check whether the websocket is still valid and to test latency.
+
+@item
+@code{MHD_websocket_encode_ping()} encodes a pong response to
+answer a received ping request.
+
+@item
+@code{MHD_websocket_encode_close()} encodes a close request.
+
+@item
+@code{MHD_websocket_free()} frees data returned by the encode/decode functions.
+
+@end itemize
+
+Since you could receive or send fragmented data (i. e. due to a too
+small buffer passed to @code{recv}) all of these encode/decode
+functions require a pointer to a @code{struct MHD_WebSocketStream} passed
+as argument.
+In this structure @emph{libmicrohttpd_ws} stores information
+about encoding/decoding of the particular websocket.
+For each websocket you need a unique @code{struct MHD_WebSocketStream}
+to encode/decode with this library.
+
+To create or destroy @code{struct MHD_WebSocketStream}
+we have additional functions:
+
+@itemize @bullet
+@item
+@code{MHD_websocket_stream_init()} allocates and initializes
+a new @code{struct MHD_WebSocketStream}.
+You can specify some options here to alter the behavior of the websocket stream.
+
+@item
+@code{MHD_websocket_stream_free()} frees a previously allocated
+@code{struct MHD_WebSocketStream}.
+
+@end itemize
+
+With these encode/decode functions we can improve our @code{upgrade_handler}
+callback function from an earlier example to a working websocket:
+
+
+@verbatim
+static void
+upgrade_handler (void *cls,
+ struct MHD_Connection *connection,
+ void *req_cls,
+ const char *extra_in,
+ size_t extra_in_size,
+ MHD_socket fd,
+ struct MHD_UpgradeResponseHandle *urh)
+{
+ /* make the socket blocking (operating-system-dependent code) */
+ make_blocking (fd);
+
+ /* create a websocket stream for this connection */
+ struct MHD_WebSocketStream* ws;
+ int result = MHD_websocket_stream_init (&ws,
+ 0,
+ 0);
+ if (0 != result)
+ {
+ /* Couldn't create the websocket stream.
+ * So we close the socket and leave
+ */
+ MHD_upgrade_action (urh,
+ MHD_UPGRADE_ACTION_CLOSE);
+ return;
+ }
+
+ /* Let's wait for incoming data */
+ const size_t buf_len = 256;
+ char buf[buf_len];
+ ssize_t got;
+ while (MHD_WEBSOCKET_VALIDITY_VALID == MHD_websocket_stream_is_valid (ws))
+ {
+ got = recv (fd,
+ buf,
+ buf_len,
+ 0);
+ if (0 >= got)
+ {
+ /* the TCP/IP socket has been closed */
+ break;
+ }
+
+ /* parse the entire received data */
+ size_t buf_offset = 0;
+ while (buf_offset < (size_t) got)
+ {
+ size_t new_offset = 0;
+ char *frame_data = NULL;
+ size_t frame_len = 0;
+ int status = MHD_websocket_decode (ws,
+ buf + buf_offset,
+ ((size_t) got) - buf_offset,
+ &new_offset,
+ &frame_data,
+ &frame_len);
+ if (0 > status)
+ {
+ /* an error occurred and the connection must be closed */
+ if (NULL != frame_data)
+ {
+ MHD_websocket_free (ws, frame_data);
+ }
+ break;
+ }
+ else
+ {
+ buf_offset += new_offset;
+ if (0 < status)
+ {
+ /* the frame is complete */
+ switch (status)
+ {
+ case MHD_WEBSOCKET_STATUS_TEXT_FRAME:
+ /* The client has sent some text.
+ * We will display it and answer with a text frame.
+ */
+ if (NULL != frame_data)
+ {
+ printf ("Received message: %s\n", frame_data);
+ MHD_websocket_free (ws, frame_data);
+ frame_data = NULL;
+ }
+ result = MHD_websocket_encode_text (ws,
+ "Hello",
+ 5, /* length of "Hello" */
+ 0,
+ &frame_data,
+ &frame_len,
+ NULL);
+ if (0 == result)
+ {
+ send_all (fd,
+ frame_data,
+ frame_len);
+ }
+ break;
+
+ case MHD_WEBSOCKET_STATUS_CLOSE_FRAME:
+ /* if we receive a close frame, we will respond with one */
+ MHD_websocket_free (ws,
+ frame_data);
+ frame_data = NULL;
+
+ result = MHD_websocket_encode_close (ws,
+ 0,
+ NULL,
+ 0,
+ &frame_data,
+ &frame_len);
+ if (0 == result)
+ {
+ send_all (fd,
+ frame_data,
+ frame_len);
+ }
+ break;
+
+ case MHD_WEBSOCKET_STATUS_PING_FRAME:
+ /* if we receive a ping frame, we will respond */
+ /* with the corresponding pong frame */
+ {
+ char *pong = NULL;
+ size_t pong_len = 0;
+ result = MHD_websocket_encode_pong (ws,
+ frame_data,
+ frame_len,
+ &pong,
+ &pong_len);
+ if (0 == result)
+ {
+ send_all (fd,
+ pong,
+ pong_len);
+ }
+ MHD_websocket_free (ws,
+ pong);
+ }
+ break;
+
+ default:
+ /* Other frame types are ignored
+ * in this minimal example.
+ * This is valid, because they become
+ * automatically skipped if we receive them unexpectedly
+ */
+ break;
+ }
+ }
+ if (NULL != frame_data)
+ {
+ MHD_websocket_free (ws, frame_data);
+ }
+ }
+ }
+ }
+
+ /* free the websocket stream */
+ MHD_websocket_stream_free (ws);
+
+ /* close the socket when it is not needed anymore */
+ MHD_upgrade_action (urh,
+ MHD_UPGRADE_ACTION_CLOSE);
+}
+
+/* This helper function is used for the case that
+ * we need to resend some data
+ */
+static void
+send_all (MHD_socket fd,
+ const char *buf,
+ size_t len)
+{
+ ssize_t ret;
+ size_t off;
+
+ for (off = 0; off < len; off += ret)
+ {
+ ret = send (fd,
+ &buf[off],
+ (int) (len - off),
+ 0);
+ if (0 > ret)
+ {
+ if (EAGAIN == errno)
+ {
+ ret = 0;
+ continue;
+ }
+ break;
+ }
+ if (0 == ret)
+ break;
+ }
+}
+
+/* This helper function contains operating-system-dependent code and
+ * is used to make a socket blocking.
+ */
+static void
+make_blocking (MHD_socket fd)
+{
+#if defined(MHD_POSIX_SOCKETS)
+ int flags;
+
+ flags = fcntl (fd, F_GETFL);
+ if (-1 == flags)
+ return;
+ if ((flags & ~O_NONBLOCK) != flags)
+ if (-1 == fcntl (fd, F_SETFL, flags & ~O_NONBLOCK))
+ abort ();
+#elif defined(MHD_WINSOCK_SOCKETS)
+ unsigned long flags = 0;
+
+ ioctlsocket (fd, FIONBIO, &flags);
+#endif /* MHD_WINSOCK_SOCKETS */
+}
+
+@end verbatim
+@noindent
+
+
+Please note that the websocket in this example is only half-duplex.
+It waits until the blocking @code{recv()} call returns and
+only does then something.
+In this example all frame types are decoded by @emph{libmicrohttpd_ws},
+but we only do something when a text, ping or close frame is received.
+Binary and pong frames are ignored in our code.
+This is legit, because the server is only required to implement at
+least support for ping frame or close frame (the other frame types
+could be skipped in theory, because they don't require an answer).
+The pong frame doesn't require an answer and whether text frames or
+binary frames get an answer simply belongs to your server application.
+So this is a valid minimal example.
+
+Until this point you've learned everything you need to basically
+use websockets with @emph{libmicrohttpd} and @emph{libmicrohttpd_ws}.
+These libraries offer much more functions for some specific cases.
+
+
+The further chapters of this tutorial focus on some specific problems
+and the client site programming.
+
+
+@heading Using full-duplex websockets
+
+To use full-duplex websockets you can simply create two threads
+per websocket connection.
+One of these threads is used for receiving data with
+a blocking @code{recv()} call and the other thread is triggered
+by the application internal codes and sends the data.
+
+A full-duplex websocket example is implemented in the example file
+@code{websocket_chatserver_example.c}.
+
+@heading Error handling
+
+The most functions of @emph{libmicrohttpd_ws} return a value
+of @code{enum MHD_WEBSOCKET_STATUS}.
+The values of this enumeration can be converted into an integer
+and have an easy interpretation:
+
+@itemize @bullet
+@item
+If the value is less than zero an error occurred and the call has failed.
+Check the enumeration values for more specific information.
+
+@item
+If the value is equal to zero, the call succeeded.
+
+@item
+If the value is greater than zero, the call succeeded and the value
+specifies the decoded frame type.
+Currently positive values are only returned by @code{MHD_websocket_decode()}
+(of the functions with this return enumeration type).
+
+@end itemize
+
+A websocket stream can also get broken when invalid frame data is received.
+Also the other site could send a close frame which puts the stream into
+a state where it may not be used for regular communication.
+Whether a stream has become broken, can be checked with
+@code{MHD_websocket_stream_is_valid()}.
+
+
+@heading Fragmentation
+
+In addition to the regular TCP/IP fragmentation the websocket protocol also
+supports fragmentation.
+Fragmentation could be used for continuous payload data such as video data
+from a webcam.
+Whether or not you want to receive fragmentation is specified upon
+initialization of the websocket stream.
+If you pass @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS} in the flags parameter
+of @code{MHD_websocket_stream_init()} then you can receive fragments.
+If you don't pass this flag (in the most cases you just pass zero as flags)
+then you don't want to handle fragments on your own.
+@emph{libmicrohttpd_ws} removes then the fragmentation for you
+in the background.
+You only get the completely assembled frames.
+
+Upon encoding you specify whether or not you want to create a fragmented frame
+by passing a flag to the corresponding encode function.
+Only @code{MHD_websocket_encode_text()} and @code{MHD_websocket_encode_binary()}
+can be used for fragmentation, because the other frame types may
+not be fragmented.
+Encoding fragmented frames is independent of
+the @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS} flag upon initialization.
+
+@heading Quick guide to websockets in JavaScript
+
+Websockets are supported in all modern web browsers.
+You initialize a websocket connection by creating an instance of
+the @code{WebSocket} class provided by the web browser.
+
+There are some simple rules for using websockets in the browser:
+
+@itemize @bullet
+@item
+When you initialize the instance of the websocket class you must pass an URL.
+The URL must either start with @code{ws://}
+(for not encrypted websocket protocol) or @code{wss://}
+(for TLS-encrypted websocket protocol).
+
+@strong{IMPORTANT:} If your website is accessed via @code{https://}
+then you are in a security context, which means that you are only allowed to
+access other secure protocols.
+So you can only use @code{wss://} for websocket connections then.
+If you try to @code{ws://} instead then your websocket connection will
+automatically fail.
+
+@item
+The WebSocket class uses events to handle the receiving of data.
+JavaScript is per definition a single-threaded language so
+the receiving events will never overlap.
+Sending is done directly by calling a method of the instance of
+the WebSocket class.
+
+@end itemize
+
+
+Here is a short example for receiving/sending data to the same host
+as the website is running on:
+
+@verbatim
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Websocket Demo</title>
+<script>
+
+let url = 'ws' + (window.location.protocol === 'https:' ? 's' : '') + '://' +
+ window.location.host + '/chat';
+let socket = null;
+
+window.onload = function(event) {
+ socket = new WebSocket(url);
+ socket.onopen = function(event) {
+ document.write('The websocket connection has been established.<br>');
+
+ // Send some text
+ socket.send('Hello from JavaScript!');
+ }
+
+ socket.onclose = function(event) {
+ document.write('The websocket connection has been closed.<br>');
+ }
+
+ socket.onerror = function(event) {
+ document.write('An error occurred during the websocket communication.<br>');
+ }
+
+ socket.onmessage = function(event) {
+ document.write('Websocket message received: ' + event.data + '<br>');
+ }
+}
+
+</script>
+</head>
+<body>
+</body>
+</html>
+
+@end verbatim
+@noindent
diff --git a/doc/ecos.texi b/doc/ecos.texi
@@ -0,0 +1,26 @@
+@cindex eCos, GNU General Public License with eCos Extension
+
+GNU libmicrohttpd is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 or (at your option) any later version.
+
+GNU libmicrohttpd is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along with
+GNU libmicrohttpd; if not, write to the Free Software Foundation, Inc., 51
+Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+As a special exception, if other files instantiate templates or use macros or
+inline functions from this file, or you compile this file and link it with
+other works to produce a work based on this file, this file does not by itself
+cause the resulting work to be covered by the GNU General Public
+License. However the source code for this file must still be made available in
+accordance with section (3) of the GNU General Public License v2.
+
+This exception does not invalidate any other reasons why a work based on this
+file might be covered by the GNU General Public License.
+
+
diff --git a/doc/examples/.gitignore b/doc/examples/.gitignore
@@ -0,0 +1,4 @@
+*.exe
+*.o
+*.lo
+*.la
diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am
@@ -0,0 +1,34 @@
+# This Makefile.am is in the public domain
+SUBDIRS = .
+
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/src/include \
+ $(CPPFLAGS_ac)
+
+AM_CFLAGS = $(CFLAGS_ac) @LIBGCRYPT_CFLAGS@
+
+AM_LDFLAGS = $(LDFLAGS_ac)
+
+AM_TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT_ac)
+
+if USE_COVERAGE
+ AM_CFLAGS += --coverage
+endif
+
+$(top_builddir)/src/microhttpd/libmicrohttpd.la: $(top_builddir)/src/microhttpd/Makefile
+ @echo ' cd $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la'; \
+ $(am__cd) $(top_builddir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) libmicrohttpd.la
+
+# example programs
+noinst_PROGRAMS =
+
+if ENABLE_BAUTH
+noinst_PROGRAMS +=
+if ENABLE_HTTPS
+noinst_PROGRAMS +=
+endif
+endif
+
+if HAVE_POSTPROCESSOR
+noinst_PROGRAMS +=
+endif
diff --git a/doc/fdl-1.3.texi b/doc/fdl-1.3.texi
@@ -0,0 +1,506 @@
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/gendocs.sh b/doc/gendocs.sh
@@ -0,0 +1,392 @@
+#!/bin/sh -e
+# gendocs.sh -- generate a GNU manual in many formats. This script is
+# mentioned in maintain.texi. See the help message below for usage details.
+
+scriptversion=2012-09-02.17
+
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+# Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Mohit Agarwal.
+# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
+#
+# The latest version of this script, and the companion template, is
+# available from Texinfo CVS:
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs.sh
+# http://savannah.gnu.org/cgi-bin/viewcvs/texinfo/texinfo/util/gendocs_template
+#
+# An up-to-date copy is also maintained in Gnulib (gnu.org/software/gnulib).
+
+prog=`basename "$0"`
+srcdir=`pwd`
+
+scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
+templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
+
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
+: ${MAKEINFO="makeinfo"}
+: ${TEXI2DVI="texi2dvi -t @finalout"}
+: ${DVIPS="dvips"}
+: ${DOCBOOK2HTML="docbook2html"}
+: ${DOCBOOK2PDF="docbook2pdf"}
+: ${DOCBOOK2PS="docbook2ps"}
+: ${DOCBOOK2TXT="docbook2txt"}
+: ${GENDOCS_TEMPLATE_DIR="."}
+: ${TEXI2HTML="texi2html"}
+unset CDPATH
+unset use_texi2html
+
+version="gendocs.sh $scriptversion
+
+Copyright 2012 Free Software Foundation, Inc.
+There is NO warranty. You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+
+usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
+
+Generate output in various formats from PACKAGE.texinfo (or .texi or
+.txi) source. See the GNU Maintainers document for a more extensive
+discussion:
+ http://www.gnu.org/prep/maintain_toc.html
+
+Options:
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ --email ADR use ADR as contact in generated web pages.
+ --docbook convert to DocBook too (xml, txt, html, pdf and ps).
+ --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
+ --info ARG pass indicated ARG to makeinfo for Info, instead of --no-split.
+ --texi2html use texi2html to generate HTML targets.
+ --help display this help and exit successfully.
+ --version display version information and exit successfully.
+
+Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
+
+Typical sequence:
+ cd PACKAGESOURCE/doc
+ wget \"$scripturl\"
+ wget \"$templateurl\"
+ $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
+
+Output will be in a new subdirectory \"manual\" (by default;
+use -o OUTDIR to override). Move all the new files into your web CVS
+tree, as explained in the Web Pages node of maintain.texi.
+
+Please do use the --email ADDRESS option to specify your bug-reporting
+address in the generated HTML pages.
+
+MANUAL-TITLE is included as part of the HTML <title> of the overall
+manual/index.html file. It should include the name of the package being
+documented. manual/index.html is created by substitution from the file
+$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
+generic template for your own purposes.)
+
+If you have several manuals, you'll need to run this script several
+times with different MANUAL values, specifying a different output
+directory with -o each time. Then write (by hand) an overall index.html
+with links to them all.
+
+If a manual's Texinfo sources are spread across several directories,
+first copy or symlink all Texinfo sources into a single directory.
+(Part of the script's work is to make a tar.gz of the sources.)
+
+As implied above, by default monolithic Info files are generated.
+If you want split Info, or other Info options, use --info to override.
+
+You can set the environment variables MAKEINFO, TEXI2DVI, TEXI2HTML, and
+DVIPS to control the programs that get executed, and
+GENDOCS_TEMPLATE_DIR to control where the gendocs_template file is
+looked for. With --docbook, the environment variables DOCBOOK2HTML,
+DOCBOOK2PDF, DOCBOOK2PS, and DOCBOOK2TXT are also respected.
+
+By default, makeinfo and texi2dvi are run in the default (English)
+locale, since that's the language of most Texinfo manuals. If you
+happen to have a non-English manual and non-English web site, see the
+SETLANG setting in the source.
+
+Email bug reports or enhancement requests to bug-texinfo@gnu.org.
+"
+
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+MANUAL_TITLE=
+PACKAGE=
+EMAIL=webmasters@gnu.org # please override with --email
+htmlarg=
+infoarg=--no-split
+outdir=manual
+srcfile=
+
+while test $# -gt 0; do
+ case $1 in
+ --email) shift; EMAIL=$1;;
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
+ -s) shift; srcfile=$1;;
+ -o) shift; outdir=$1;;
+ --docbook) docbook=yes;;
+ --html) shift; htmlarg=$1;;
+ --info) shift; infoarg=$1;;
+ --texi2html) use_texi2html=1;;
+ -*)
+ echo "$0: Unknown option \`$1'." >&2
+ echo "$0: Try \`--help' for more information." >&2
+ exit 1;;
+ *)
+ if test -z "$PACKAGE"; then
+ PACKAGE=$1
+ elif test -z "$MANUAL_TITLE"; then
+ MANUAL_TITLE=$1
+ else
+ echo "$0: extra non-option argument \`$1'." >&2
+ exit 1
+ fi;;
+ esac
+ shift
+done
+
+# For most of the following, the base name is just $PACKAGE
+base=$PACKAGE
+
+if test -n "$srcfile"; then
+ # but here, we use the basename of $srcfile
+ base=`basename "$srcfile"`
+ case $base in
+ *.txi|*.texi|*.texinfo) base=`echo "$base"|sed 's/\.[texinfo]*$//'`;;
+ esac
+ PACKAGE=$base
+elif test -s "$srcdir/$PACKAGE.texinfo"; then
+ srcfile=$srcdir/$PACKAGE.texinfo
+elif test -s "$srcdir/$PACKAGE.texi"; then
+ srcfile=$srcdir/$PACKAGE.texi
+elif test -s "$srcdir/$PACKAGE.txi"; then
+ srcfile=$srcdir/$PACKAGE.txi
+else
+ echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
+ exit 1
+fi
+
+if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
+ echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
+ echo "$0: it is available from $templateurl." >&2
+ exit 1
+fi
+
+case $outdir in
+ /*) abs_outdir=$outdir;;
+ *) abs_outdir=$srcdir/$outdir;;
+esac
+
+echo "Generating output formats for $srcfile"
+
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info $infoarg \"$srcfile\""
+echo "Generating info file(s)... ($cmd)"
+eval "$cmd"
+mkdir -p "$outdir/"
+tar czf "$outdir/$PACKAGE.info.tar.gz" $PACKAGE.info*
+info_tgz_size=`calcsize "$outdir/$PACKAGE.info.tar.gz"`
+# do not mv the info files, there's no point in having them available
+# separately on the web.
+
+cmd="$SETLANG ${TEXI2DVI} \"$srcfile\""
+echo "Generating dvi ... ($cmd)"
+eval "$cmd"
+
+# now, before we compress dvi:
+echo "Generating postscript..."
+${DVIPS} $PACKAGE -o
+gzip -f -9 $PACKAGE.ps
+ps_gz_size=`calcsize $PACKAGE.ps.gz`
+mv $PACKAGE.ps.gz "$outdir/"
+
+# compress/finish dvi:
+gzip -f -9 $PACKAGE.dvi
+dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
+mv $PACKAGE.dvi.gz "$outdir/"
+
+cmd="$SETLANG ${TEXI2DVI} --pdf \"$srcfile\""
+echo "Generating pdf ... ($cmd)"
+eval "$cmd"
+pdf_size=`calcsize $PACKAGE.pdf`
+mv $PACKAGE.pdf "$outdir/"
+
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
+echo "Generating ASCII... ($cmd)"
+eval "$cmd"
+ascii_size=`calcsize $PACKAGE.txt`
+gzip -f -9 -c $PACKAGE.txt >"$outdir/$PACKAGE.txt.gz"
+ascii_gz_size=`calcsize "$outdir/$PACKAGE.txt.gz"`
+mv $PACKAGE.txt "$outdir/"
+
+html_split()
+{
+ opt="--split=$1 $htmlarg --node-files"
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
+ echo "Generating html by $1... ($cmd)"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ ln -sf ${PACKAGE}.html index.html
+ tar -czf "$abs_outdir/${PACKAGE}.html_$1.tar.gz" -- *.html
+ )
+ eval html_$1_tgz_size=`calcsize "$outdir/${PACKAGE}.html_$1.tar.gz"`
+ rm -f "$outdir"/html_$1/*.html
+ mkdir -p "$outdir/html_$1/"
+ mv ${split_html_dir}/*.html "$outdir/html_$1/"
+ rmdir ${split_html_dir}
+}
+
+if test -z "$use_texi2html"; then
+ opt="--no-split --html -o $PACKAGE.html $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ echo "Generating monolithic html... ($cmd)"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+ html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ mv $PACKAGE.html "$outdir/"
+
+ cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\""
+ echo "Generating html by node... ($cmd)"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ tar -czf "$abs_outdir/${PACKAGE}.html_node.tar.gz" -- *.html
+ )
+ html_node_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node.tar.gz"`
+ rm -f "$outdir"/html_node/*.html
+ mkdir -p "$outdir/html_node/"
+ mv ${split_html_dir}/*.html "$outdir/html_node/"
+ rmdir ${split_html_dir}
+else
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\""
+ echo "Generating monolithic html... ($cmd)"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >"$outdir/$PACKAGE.html.gz"
+ html_mono_gz_size=`calcsize "$outdir/$PACKAGE.html.gz"`
+ mv $PACKAGE.html "$outdir/"
+
+ html_split node
+ html_split chapter
+ html_split section
+fi
+
+echo Making .tar.gz for sources...
+d=`dirname $srcfile`
+(
+ cd "$d"
+ srcfiles=`ls *.texinfo *.texi *.txi *.eps 2>/dev/null` || true
+ tar cvzfh "$abs_outdir/$PACKAGE.texi.tar.gz" $srcfiles
+)
+texi_tgz_size=`calcsize "$outdir/$PACKAGE.texi.tar.gz"`
+
+if test -n "$docbook"; then
+ cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
+ echo "Generating docbook XML... ($cmd)"
+ eval "$cmd"
+ docbook_xml_size=`calcsize $PACKAGE-db.xml`
+ gzip -f -9 -c $PACKAGE-db.xml >"$outdir/$PACKAGE-db.xml.gz"
+ docbook_xml_gz_size=`calcsize "$outdir/$PACKAGE-db.xml.gz"`
+ mv $PACKAGE-db.xml "$outdir/"
+
+ split_html_db_dir=html_node_db
+ cmd="${DOCBOOK2HTML} -o $split_html_db_dir \"${outdir}/$PACKAGE-db.xml\""
+ echo "Generating docbook HTML... ($cmd)"
+ eval "$cmd"
+ (
+ cd ${split_html_db_dir} || exit 1
+ tar -czf "$abs_outdir/${PACKAGE}.html_node_db.tar.gz" -- *.html
+ )
+ html_node_db_tgz_size=`calcsize "$outdir/${PACKAGE}.html_node_db.tar.gz"`
+ rm -f "$outdir"/html_node_db/*.html
+ mkdir -p "$outdir/html_node_db"
+ mv ${split_html_db_dir}/*.html "$outdir/html_node_db/"
+ rmdir ${split_html_db_dir}
+
+ cmd="${DOCBOOK2TXT} \"${outdir}/$PACKAGE-db.xml\""
+ echo "Generating docbook ASCII... ($cmd)"
+ eval "$cmd"
+ docbook_ascii_size=`calcsize $PACKAGE-db.txt`
+ mv $PACKAGE-db.txt "$outdir/"
+
+ cmd="${DOCBOOK2PS} \"${outdir}/$PACKAGE-db.xml\""
+ echo "Generating docbook PS... ($cmd)"
+ eval "$cmd"
+ gzip -f -9 -c $PACKAGE-db.ps >"$outdir/$PACKAGE-db.ps.gz"
+ docbook_ps_gz_size=`calcsize "$outdir/$PACKAGE-db.ps.gz"`
+ mv $PACKAGE-db.ps "$outdir/"
+
+ cmd="${DOCBOOK2PDF} \"${outdir}/$PACKAGE-db.xml\""
+ echo "Generating docbook PDF... ($cmd)"
+ eval "$cmd"
+ docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
+ mv $PACKAGE-db.pdf "$outdir/"
+fi
+
+echo "Writing index file..."
+if test -z "$use_texi2html"; then
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+else
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+fi
+curdate=`$SETLANG date '+%B %d, %Y'`
+sed \
+ -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
+ -e "s!%%EMAIL%%!$EMAIL!g" \
+ -e "s!%%PACKAGE%%!$PACKAGE!g" \
+ -e "s!%%DATE%%!$curdate!g" \
+ -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
+ -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
+ -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
+ -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
+ -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
+ -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
+ -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
+ -e "s!%%PDF_SIZE%%!$pdf_size!g" \
+ -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
+ -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
+ -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
+ -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
+ -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
+ -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
+ -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
+ -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
+ -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
+ -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
+ -e "s,%%SCRIPTURL%%,$scripturl,g" \
+ -e "s!%%SCRIPTNAME%%!$prog!g" \
+ -e "$CONDS" \
+$GENDOCS_TEMPLATE_DIR/gendocs_template >"$outdir/index.html"
+
+echo "Done, see $outdir/ subdirectory for new files."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/doc/gendocs_template b/doc/gendocs_template
@@ -0,0 +1,87 @@
+<!--#include virtual="/server/header.html" -->
+<title>%%TITLE%% - GNU Project - Free Software Foundation (FSF)</title>
+<!--#include virtual="/server/banner.html" -->
+<h2>%%TITLE%%</h2>
+
+<address>Free Software Foundation</address>
+<address>last updated %%DATE%%</address>
+
+<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
+
+<ul>
+<li><a href="%%PACKAGE%%.html">HTML
+ (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
+<li><a href="html_node/index.html">HTML</a> - with one web page per
+ node.</li>
+%%IF HTML_SECTION%%
+<li><a href="html_section/index.html">HTML</a> - with one web page per
+ section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="html_chapter/index.html">HTML</a> - with one web page per
+ chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html.gz">HTML compressed
+ (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
+ one web page.</li>
+<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
+ (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per node.</li>
+%%IF HTML_SECTION%%
+<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
+ (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
+ (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.info.tar.gz">Info document
+ (%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
+<li><a href="%%PACKAGE%%.txt">ASCII text
+ (%%ASCII_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
+ (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
+ (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.pdf">PDF file
+ (%%PDF_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
+ (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
+</ul>
+
+<p>You can <a href="http://shop.fsf.org/">buy printed copies of
+some manuals</a> (among other items) from the Free Software Foundation;
+this helps support FSF activities.</p>
+
+<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
+script</a>.)</p>
+
+<!-- If needed, change the copyright block at the bottom. In general,
+ all pages on the GNU web server should have the section about
+ verbatim copying. Please do NOT remove this without talking
+ with the webmasters first.
+ Please make sure the copyright date is consistent with the document
+ and that it is like this: "2001, 2002", not this: "2001-2002". -->
+</div><!-- for id="content", starts in the include above -->
+<!--#include virtual="/server/footer.html" -->
+<div id="footer">
+
+<p>Please send general FSF & GNU inquiries to
+<a href="mailto:gnu@gnu.org"><gnu@gnu.org></a>.
+There are also <a href="/contact/">other ways to contact</a>
+the FSF.<br />
+Please send broken links and other corrections or suggestions to
+<a href="mailto:%%EMAIL%%"><%%EMAIL%%></a>.</p>
+
+<p>Copyright © 2013 Free Software Foundation, Inc.</p>
+
+<p>Verbatim copying and distribution of this entire article are
+permitted worldwide, without royalty, in any medium, provided this
+notice, and the copyright notice, are preserved.</p>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/gpl-2.0.texi b/doc/gpl-2.0.texi
@@ -0,0 +1,389 @@
+@c The GNU General Public License.
+@center Version 2, June 1991
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@heading Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software---to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+@heading TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+@enumerate 0
+@item
+This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The ``Program'', below,
+refers to any such program or work, and a ``work based on the Program''
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term ``modification''.) Each licensee is addressed as ``you''.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+@item
+You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+@item
+You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+@enumerate a
+@item
+You must cause the modified files to carry prominent notices
+stating that you changed the files and the date of any change.
+
+@item
+You must cause any work that you distribute or publish, that in
+whole or in part contains or is derived from the Program or any
+part thereof, to be licensed as a whole at no charge to all third
+parties under the terms of this License.
+
+@item
+If the modified program normally reads commands interactively
+when run, you must cause it, when started running for such
+interactive use in the most ordinary way, to print or display an
+announcement including an appropriate copyright notice and a
+notice that there is no warranty (or else, saying that you provide
+a warranty) and that users may redistribute the program under
+these conditions, and telling the user how to view a copy of this
+License. (Exception: if the Program itself is interactive but
+does not normally print such an announcement, your work based on
+the Program is not required to print an announcement.)
+@end enumerate
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+@item
+You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+@enumerate a
+@item
+Accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of Sections
+1 and 2 above on a medium customarily used for software interchange; or,
+
+@item
+Accompany it with a written offer, valid for at least three
+years, to give any third party, for a charge no more than your
+cost of physically performing source distribution, a complete
+machine-readable copy of the corresponding source code, to be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange; or,
+
+@item
+Accompany it with the information you received as to the offer
+to distribute corresponding source code. (This alternative is
+allowed only for noncommercial distribution and only if you
+received the program in object code or executable form with such
+an offer, in accord with Subsection b above.)
+@end enumerate
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+@item
+You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+@item
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+@item
+Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+@item
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+@item
+If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+@item
+The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and ``any
+later version'', you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+@item
+If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+@iftex
+@heading NO WARRANTY
+@end iftex
+@ifinfo
+@center NO WARRANTY
+
+@end ifinfo
+
+@item
+BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM ``AS IS'' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+@item
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+@end enumerate
+
+@iftex
+@heading END OF TERMS AND CONDITIONS
+@end iftex
+@ifinfo
+@center END OF TERMS AND CONDITIONS
+
+@end ifinfo
+
+@page
+@heading Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the ``copyright'' line and a pointer to where the full notice is found.
+
+@smallexample
+@var{one line to give the program's name and a brief idea of what it does.}
+Copyright (C) @var{yyyy} @var{name of author}
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+@end smallexample
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+@smallexample
+Gnomovision version 69, Copyright (C) @var{year} @var{name of author}
+Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.
+@end smallexample
+
+The hypothetical commands @samp{show w} and @samp{show c} should show
+the appropriate parts of the General Public License. Of course, the
+commands you use may be called something other than @samp{show w} and
+@samp{show c}; they could even be mouse-clicks or menu items---whatever
+suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a ``copyright disclaimer'' for the program, if
+necessary. Here is a sample; alter the names:
+
+@example
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+`Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+@var{signature of Ty Coon}, 1 April 1989
+Ty Coon, President of Vice
+@end example
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/doc/lgpl.texi b/doc/lgpl.texi
@@ -0,0 +1,549 @@
+@c The GNU Lesser General Public License.
+@center Version 2.1, February 1999
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+as the successor of the GNU Library Public License, version 2, hence the
+version number 2.1.]
+@end display
+
+@subheading Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software---to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software---typically libraries---of the Free
+Software Foundation and other authors who decide to use it. You can use
+it too, but we suggest you first think carefully about whether this
+license or the ordinary General Public License is the better strategy to
+use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of it
+in new free programs; and that you are informed that you can do these
+things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the @dfn{Lesser} General Public License because it
+does @emph{Less} to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+``work based on the library'' and a ``work that uses the library''. The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+@subheading TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+@enumerate 0
+@item
+This License Agreement applies to any software library or other program
+which contains a notice placed by the copyright holder or other
+authorized party saying it may be distributed under the terms of this
+Lesser General Public License (also called ``this License''). Each
+licensee is addressed as ``you''.
+
+ A ``library'' means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The ``Library'', below, refers to any such software library or work
+which has been distributed under these terms. A ``work based on the
+Library'' means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term ``modification''.)
+
+ ``Source code'' for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+@item
+You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+@item
+You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+@enumerate a
+@item
+The modified work must itself be a software library.
+
+@item
+You must cause the files modified to carry prominent notices
+stating that you changed the files and the date of any change.
+
+@item
+You must cause the whole of the work to be licensed at no
+charge to all third parties under the terms of this License.
+
+@item
+If a facility in the modified Library refers to a function or a
+table of data to be supplied by an application program that uses
+the facility, other than as an argument passed when the facility
+is invoked, then you must make a good faith effort to ensure that,
+in the event an application does not supply such function or
+table, the facility still operates, and performs whatever part of
+its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has
+a purpose that is entirely well-defined independent of the
+application. Therefore, Subsection 2d requires that any
+application-supplied function or table used by this function must
+be optional: if the application does not supply it, the square
+root function must still compute square roots.)
+@end enumerate
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+@item
+You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+@item
+You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+@item
+A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a ``work that uses the Library''. Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a ``work that uses the Library'' with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a ``work that uses the
+library''. The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a ``work that uses the Library'' uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+@item
+As an exception to the Sections above, you may also combine or
+link a ``work that uses the Library'' with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+@enumerate a
+@item
+Accompany the work with the complete corresponding
+machine-readable source code for the Library including whatever
+changes were used in the work (which must be distributed under
+Sections 1 and 2 above); and, if the work is an executable linked
+with the Library, with the complete machine-readable ``work that
+uses the Library'', as object code and/or source code, so that the
+user can modify the Library and then relink to produce a modified
+executable containing the modified Library. (It is understood
+that the user who changes the contents of definitions files in the
+Library will not necessarily be able to recompile the application
+to use the modified definitions.)
+
+@item
+Use a suitable shared library mechanism for linking with the Library. A
+suitable mechanism is one that (1) uses at run time a copy of the
+library already present on the user's computer system, rather than
+copying library functions into the executable, and (2) will operate
+properly with a modified version of the library, if the user installs
+one, as long as the modified version is interface-compatible with the
+version that the work was made with.
+
+@item
+Accompany the work with a written offer, valid for at
+least three years, to give the same user the materials
+specified in Subsection 6a, above, for a charge no more
+than the cost of performing this distribution.
+
+@item
+If distribution of the work is made by offering access to copy
+from a designated place, offer equivalent access to copy the above
+specified materials from the same place.
+
+@item
+Verify that the user has already received a copy of these
+materials or that you have already sent this user a copy.
+@end enumerate
+
+ For an executable, the required form of the ``work that uses the
+Library'' must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies the
+executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+@item
+You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+@enumerate a
+@item
+Accompany the combined library with a copy of the same work
+based on the Library, uncombined with any other library
+facilities. This must be distributed under the terms of the
+Sections above.
+
+@item
+Give prominent notice with the combined library of the fact
+that part of it is a work based on the Library, and explaining
+where to find the accompanying uncombined form of the same work.
+@end enumerate
+
+@item
+You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+@item
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+@item
+Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+@item
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+@item
+If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+@item
+The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+``any later version'', you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+@item
+If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+@center @b{NO WARRANTY}
+
+@item
+BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+@item
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+@end enumerate
+
+@subheading END OF TERMS AND CONDITIONS
+
+@page
+@subheading How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+``copyright'' line and a pointer to where the full notice is found.
+
+@smallexample
+@var{one line to give the library's name and an idea of what it does.}
+Copyright (C) @var{year} @var{name of author}
+
+This library is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at
+your option) any later version.
+
+This library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+USA.
+@end smallexample
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a ``copyright disclaimer'' for the library, if
+necessary. Here is a sample; alter the names:
+
+@smallexample
+Yoyodyne, Inc., hereby disclaims all copyright interest in the library
+`Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+@var{signature of Ty Coon}, 1 April 1990
+Ty Coon, President of Vice
+@end smallexample
+
+That's all there is to it!
diff --git a/doc/libmicrohttpd-tutorial.texi b/doc/libmicrohttpd-tutorial.texi
@@ -0,0 +1,193 @@
+\input texinfo @c -*-texinfo-*-
+@finalout
+@setfilename libmicrohttpd-tutorial.info
+@set UPDATED 2 April 2016
+@set UPDATED-MONTH April 2016
+@set EDITION 0.9.48
+@set VERSION 0.9.48
+@settitle A tutorial for GNU libmicrohttpd
+@c Unify all the indices into concept index.
+@syncodeindex fn cp
+@syncodeindex vr cp
+@syncodeindex ky cp
+@syncodeindex pg cp
+@syncodeindex tp cp
+
+@dircategory Software libraries
+@direntry
+* libmicrohttpdtutorial: (libmicrohttpd-tutorial). A tutorial for GNU libmicrohttpd.
+@end direntry
+
+@copying
+This tutorial documents GNU libmicrohttpd version @value{VERSION}, last
+updated @value{UPDATED}.
+
+Copyright (c) 2008 Sebastian Gerhardt.
+
+Copyright (c) 2010, 2011, 2012, 2013, 2016, 2021 Christian Grothoff.
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+Texts. A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+@end quotation
+@end copying
+
+@titlepage
+@title A Tutorial for GNU libmicrohttpd
+@subtitle Version @value{VERSION}
+@subtitle @value{UPDATED}
+@author Sebastian Gerhardt (@email{sebgerhardt@@gmx.net})
+@author Christian Grothoff (@email{christian@@grothoff.org})
+@author Matthieu Speder (@email{mspeder@@users.sourceforge.net})
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+
+
+@contents
+
+@ifnottex
+@node Top
+@top A Tutorial for GNU libmicrohttpd
+@insertcopying
+@end ifnottex
+
+@menu
+* Introduction::
+* Hello browser example::
+* Exploring requests::
+* Response headers::
+* Supporting basic authentication::
+* Processing POST data::
+* Improved processing of POST data::
+* Session management::
+* Adding a layer of security::
+* Websockets::
+* Bibliography::
+* License text::
+* Example programs::
+@end menu
+
+@node Introduction
+@chapter Introduction
+@include chapters/introduction.inc
+
+@node Hello browser example
+@chapter Hello browser example
+@include chapters/hellobrowser.inc
+
+@node Exploring requests
+@chapter Exploring requests
+@include chapters/exploringrequests.inc
+
+@node Response headers
+@chapter Response headers
+@include chapters/responseheaders.inc
+
+@node Supporting basic authentication
+@chapter Supporting basic authentication
+@include chapters/basicauthentication.inc
+
+@node Processing POST data
+@chapter Processing POST data
+@include chapters/processingpost.inc
+
+@node Improved processing of POST data
+@chapter Improved processing of POST data
+@include chapters/largerpost.inc
+
+@node Session management
+@chapter Session management
+@include chapters/sessions.inc
+
+@node Adding a layer of security
+@chapter Adding a layer of security
+@include chapters/tlsauthentication.inc
+
+@node Websockets
+@chapter Websockets
+@include chapters/websocket.inc
+
+@node Bibliography
+@appendix Bibliography
+@include chapters/bibliography.inc
+
+@node License text
+@appendix GNU Free Documentation License
+@include fdl-1.3.texi
+
+@node Example programs
+@appendix Example programs
+@menu
+* hellobrowser.c::
+* logging.c::
+* responseheaders.c::
+* basicauthentication.c::
+* simplepost.c::
+* largepost.c::
+* sessions.c::
+* tlsauthentication.c::
+* websocket.c::
+@end menu
+
+@node hellobrowser.c
+@section hellobrowser.c
+@smalldisplay
+@verbatiminclude examples/hellobrowser.c
+@end smalldisplay
+
+@node logging.c
+@section logging.c
+@smalldisplay
+@verbatiminclude examples/logging.c
+@end smalldisplay
+
+@node responseheaders.c
+@section responseheaders.c
+@smalldisplay
+@verbatiminclude examples/responseheaders.c
+@end smalldisplay
+
+@node basicauthentication.c
+@section basicauthentication.c
+@smalldisplay
+@verbatiminclude examples/basicauthentication.c
+@end smalldisplay
+
+@node simplepost.c
+@section simplepost.c
+@smalldisplay
+@verbatiminclude examples/simplepost.c
+@end smalldisplay
+
+@node largepost.c
+@section largepost.c
+@smalldisplay
+@verbatiminclude examples/largepost.c
+@end smalldisplay
+
+@node sessions.c
+@section sessions.c
+@smalldisplay
+@verbatiminclude examples/sessions.c
+@end smalldisplay
+
+@node tlsauthentication.c
+@section tlsauthentication.c
+@smalldisplay
+@verbatiminclude examples/tlsauthentication.c
+@end smalldisplay
+
+@node websocket.c
+@section websocket.c
+@smalldisplay
+@verbatiminclude examples/websocket.c
+@end smalldisplay
+
+@bye
diff --git a/doc/libmicrohttpd.3 b/doc/libmicrohttpd.3
@@ -0,0 +1,45 @@
+.Dd June 21, 2013
+.Dt LIBMICROHTTPD 3
+.Os
+.Sh NAME
+.Nm libmicrohttpd
+.Nd library for embedding HTTP servers
+.Sh LIBRARY
+.Lb libmicrohttpd
+.Sh SYNOPSIS
+.In microhttpd.h
+.Sh DESCRIPTION
+GNU libmicrohttpd (short MHD) allows applications to easily integrate the functionality of a simple HTTP server. MHD is a GNU package.
+.sp
+The details of the API are described in comments in the header file, a detailed reference documentation in Texinfo, a tutorial, and in brief on the MHD webpage.
+.Sh LEGAL NOTICE
+libmicrohttpd is released under both the LGPL Version 2.1 or higher and the GNU GPL with eCos extension. For details on both licenses please read the respective appendix in the Texinfo manual.
+.Sh FILES
+.Bl -tag -width /etc/ttys -compact
+.It Pa microhttpd.h
+libmicrohttpd include file
+.It Pa libmicrohttpd.so
+libmicrohttpd library
+.El
+.Sh SEE ALSO
+.Xr curl 1 ,
+.Xr libcurl 3 ,
+info libmicrohttpd
+.Sh AUTHORS
+GNU
+.Nm
+was originally designed by
+.An -nosplit
+.An Christian Grothoff Aq Mt christian@grothoff.org
+and
+.An Chris GauthierDickey Aq Mt chrisg@cs.du.edu Ns .
+The original implementation was done by
+.An Daniel Pittman Aq Mt depittman@gmail.com
+and Christian Grothoff.
+SSL/TLS support was added by Sagie Amir using code from GnuTLS. See the AUTHORS file in the distribution for a more detailed list of contributors.
+.Sh AVAILABILITY
+You can obtain the latest version from
+.Lk https://www.gnu.org/software/libmicrohttpd/ Ns .
+.Sh BUGS
+Report bugs by using
+.Lk https://gnunet.org/bugs/ "Mantis" Ns .
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
@@ -0,0 +1,4760 @@
+\input texinfo
+@setfilename libmicrohttpd.info
+@documentencoding UTF-8
+@include version.texi
+@settitle The GNU libmicrohttpd Reference Manual
+@c Unify all the indices into concept index.
+@syncodeindex vr cp
+@syncodeindex ky cp
+@syncodeindex pg cp
+@copying
+This manual is for GNU libmicrohttpd
+(version @value{VERSION}, @value{UPDATED}), a library for embedding
+an HTTP(S) server into C applications.
+
+Copyright @copyright{} 2007--2019 Christian Grothoff
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+Texts. A copy of the license is included in the section entitled "GNU
+Free Documentation License".
+@end quotation
+@end copying
+
+@dircategory Software libraries
+@direntry
+* libmicrohttpd: (libmicrohttpd). Embedded HTTP server library.
+@end direntry
+
+@c
+@c Titlepage
+@c
+@titlepage
+@title The GNU libmicrohttpd Reference Manual
+@subtitle Version @value{VERSION}
+@subtitle @value{UPDATED}
+@author Marco Maggi (@email{marco.maggi-ipsu@@poste.it})
+@author Christian Grothoff (@email{christian@@grothoff.org})
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@summarycontents
+@contents
+
+@c ------------------------------------------------------------
+@ifnottex
+@node Top
+@top The GNU libmicrohttpd Library
+@insertcopying
+@end ifnottex
+
+@menu
+* microhttpd-intro:: Introduction.
+* microhttpd-const:: Constants.
+* microhttpd-struct:: Structures type definition.
+* microhttpd-cb:: Callback functions definition.
+* microhttpd-init:: Starting and stopping the server.
+* microhttpd-inspect:: Implementing external @code{select}.
+* microhttpd-requests:: Handling requests.
+* microhttpd-responses:: Building responses to requests.
+* microhttpd-flow:: Flow control.
+* microhttpd-dauth:: Utilizing Authentication.
+* microhttpd-post:: Adding a @code{POST} processor.
+* microhttpd-info:: Obtaining and modifying status information.
+* microhttpd-util:: Utilities.
+* microhttpd-websocket:: Websockets.
+
+Appendices
+
+* GNU-LGPL:: The GNU Lesser General Public License says how you
+ can copy and share almost all of `libmicrohttpd'.
+* eCos License:: The eCos License says how you can copy and share some parts of `libmicrohttpd'.
+* GNU-GPL:: The GNU General Public License (with eCos extension) says how you can copy and share some parts of `libmicrohttpd'.
+* GNU-FDL:: The GNU Free Documentation License says how you
+ can copy and share the documentation of `libmicrohttpd'.
+
+Indices
+
+* Concept Index:: Index of concepts and programs.
+* Function and Data Index:: Index of functions, variables and data types.
+* Type Index:: Index of data types.
+@end menu
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-intro
+@chapter Introduction
+
+
+@noindent
+All symbols defined in the public API start with @code{MHD_}. MHD
+is a small HTTP daemon library. As such, it does not have any API
+for logging errors (you can only enable or disable logging to stderr).
+Also, it may not support all of the HTTP features directly, where
+applicable, portions of HTTP may have to be handled by clients of the
+library.
+
+The library is supposed to handle everything that it must handle
+(because the API would not allow clients to do this), such as basic
+connection management. However, detailed interpretations of headers,
+such as range requests, are left to the main application. In
+particular, if an application developer wants to support range
+requests, he needs to explicitly indicate support in responses and
+also explicitly parse the range header and generate a response (for
+example, using the @code{MHD_create_response_from_fd_at_offset} call
+to serve ranges from a file). MHD does understands headers that
+control connection management (specifically, @code{Connection: close}
+and @code{Expect: 100 continue} are understood and handled
+automatically). @code{Connection: upgrade} is supported by passing
+control over the socket (or something that behaves like the real
+socket in the case of TLS) to the application (after sending the
+desired HTTP response header).
+
+MHD largely ignores the semantics of the different HTTP methods,
+so clients are left to handle those. One exception is that MHD does
+understand @code{HEAD} and will only send the headers of the response
+and not the body, even if the client supplied a body. (In fact,
+clients do need to construct a response with the correct length, even
+for @code{HEAD} request.)
+
+MHD understands @code{POST} data and is able to decode certain
+formats (at the moment only @code{application/x-www-form-urlencoded}
+and @code{multipart/form-data}) using the post processor API. The
+data stream of a POST is also provided directly to the main
+application, so unsupported encodings could still be processed, just
+not conveniently by MHD.
+
+The header file defines various constants used by the HTTP protocol.
+This does not mean that MHD actually interprets all of these values.
+The provided constants are exported as a convenience for users of the
+library. MHD does not verify that transmitted HTTP headers are
+part of the standard specification; users of the library are free to
+define their own extensions of the HTTP standard and use those with
+MHD.
+
+All functions are guaranteed to be completely reentrant and
+thread-safe. MHD checks for allocation failures and tries to
+recover gracefully (for example, by closing the connection).
+Additionally, clients can specify resource limits on the overall
+number of connections, number of connections per IP address and memory
+used per connection to avoid resource exhaustion.
+
+@section Scope
+
+MHD is currently used in a wide range of implementations.
+Examples based on reports we've received from developers include:
+@itemize
+@item Embedded HTTP server on a cortex M3 (128 KB code space)
+@item Large-scale multimedia server (reportedly serving at the
+ simulator limit of 7.5 GB/s)
+@item Administrative console (via HTTP/HTTPS) for network appliances
+@c If you have other interesting examples, please let us know
+@end itemize
+
+@section Thread modes and event loops
+@cindex poll
+@cindex epoll
+@cindex select
+
+MHD supports four basic thread modes and up to three event loop
+styles.
+
+The four basic thread modes are external sockets polling (MHD creates
+no threads, event loop is fully managed by the application), internal
+polling (MHD creates one thread for all connections), polling in
+thread pool (MHD creates a thread pool which is used to process all
+connections) and thread-per-connection (MHD creates one thread for
+listen sockets and then one thread per accepted connection).
+
+These thread modes are then combined with the evet loop styles
+(polling function type). MHD support select, poll and epoll. select
+is available on all platforms, epoll and poll may not be available on
+some platforms. Note that it is possible to combine MHD using epoll
+with an external select-based event loop.
+
+The default (if no other option is passed) is ``external select''.
+The highest performance can typically be obtained with a thread pool
+using @code{epoll}. Apache Benchmark (ab) was used to compare the
+performance of @code{select} and @code{epoll} when using a thread pool
+and a large number of connections. @ref{fig:performance} shows the
+resulting plot from the @code{benchmark.c} example, which measures the
+latency between an incoming request and the completion of the
+transmission of the response. In this setting, the @code{epoll}
+thread pool with four threads was able to handle more than 45,000
+connections per second on loopback (with Apache Benchmark running
+three processes on the same machine).
+@cindex performance
+
+
+@float Figure,fig:performance
+@image{libmicrohttpd_performance_data,400pt,300pt,Data,.png}
+@caption{Performance measurements for select vs. epoll (with thread-pool).}
+@end float
+
+
+Not all combinations of thread modes and event loop styles are
+supported. This is partially to keep the API simple, and partially
+because some combinations simply make no sense as others are strictly
+superior. Note that the choice of style depends first of all on the
+application logic, and then on the performance requirements.
+Applications that perform a blocking operation while handling a
+request within the callbacks from MHD must use a thread per
+connection. This is typically rather costly. Applications that do
+not support threads or that must run on embedded devices without
+thread-support must use the external mode. Using @code{epoll} is only
+supported on some platform, thus portable applications must at least
+have a fallback option available. @ref{tbl:supported} lists the sane
+combinations.
+
+@float Table,tbl:supported
+@multitable {@b{thread-per-connection}} {@b{select}} {@b{poll}} {@b{epoll}}
+@item @tab @b{select} @tab @b{poll} @tab @b{epoll}
+@item @b{external} @tab yes @tab no @tab yes
+@item @b{internal} @tab yes @tab yes @tab yes
+@item @b{thread pool} @tab yes @tab yes @tab yes
+@item @b{thread-per-connection} @tab yes @tab yes @tab no
+@end multitable
+@caption{Supported combinations of event styles and thread modes.}
+@end float
+
+
+@section Compiling GNU libmicrohttpd
+@cindex compilation
+@cindex embedded systems
+@cindex portability
+
+MHD uses the standard GNU system where the usual build process
+involves running
+@verbatim
+$ ./configure
+$ make
+$ make install
+@end verbatim
+
+MHD supports various options to be given to configure to tailor the
+binary to a specific situation. Note that some of these options will
+remove portions of the MHD code that are required for
+binary-compatibility. They should only be used on embedded systems
+with tight resource constraints and no concerns about library
+versioning. Standard distributions including MHD are expected to
+always ship with all features enabled, otherwise unexpected
+incompatibilities can arise!
+
+Here is a list of MHD-specific options that can be given to configure
+(canonical configure options such as ``--prefix'' are also supported, for a
+full list of options run ``./configure --help''):
+
+@table @code
+@item ``--disable-curl''
+disable running testcases using libcurl
+
+@item ``--disable-largefile''
+disable support for 64-bit files
+
+@item ``--disable-messages''
+disable logging of error messages (smaller binary size, not so much fun for debugging)
+
+@item ``--disable-https''
+disable HTTPS support, even if GNUtls is found; this option must be used if eCOS license is desired as an option (in all cases the resulting binary falls under a GNU LGPL-only license)
+
+@item ``--disable-postprocessor''
+do not include the post processor API (results in binary incompatibility)
+
+@item ``--disable-dauth''
+do not include the authentication APIs (results in binary incompatibility)
+
+@item ``--disable-httpupgrade''
+do not build code for HTTP ``Upgrade'' (smaller binary size, binary incompatible library)
+
+@item ``--disable-epoll''
+do not include epoll support, even if it supported (minimally smaller binary size, good for portability testing)
+
+@item ``--enable-coverage''
+set flags for analysis of code-coverage with gcc/gcov (results in slow, large binaries)
+
+@item ``--with-threads=posix,w32,none,auto''
+sets threading library to use. With use ``none'' to not support threads. In this case, MHD will only support the ``external'' threading modes and not perform any locking of data structures! Use @code{MHD_is_feature_supported(MHD_FEATURE_THREADS)} to test if threads are available. Default is ``auto''.
+
+@item ``--with-gcrypt=PATH''
+specifies path to libgcrypt installation
+
+@item ``--with-gnutls=PATH''
+specifies path to libgnutls installation
+
+@end table
+
+To cross-compile MHD for Android, install the Android NDK and use:
+@verbatim
+./configure --target=arm-linux-androideabi --host=arm-linux-androideabi --disable-doc --disable-examples
+make
+@end verbatim
+
+Similar build commands should work for cross-compilation to other platforms.
+Note that you may have to first cross-compile GnuTLS to get MHD with TLS support.
+
+
+@section Validity of pointers
+
+MHD will give applications access to its internal data structures
+via pointers via arguments and return values from its API. This
+creates the question as to how long those pointers are assured to
+stay valid.
+
+Most MHD data structures are associated with the connection of an
+HTTP client. Thus, pointers associated with a connection are
+typically valid until the connection is finished, at which point
+MHD will call the @code{MHD_RequestCompletedCallback} if one is
+registered. Applications that have such a callback registered
+may assume that keys and values from the
+@code{MHD_KeyValueIterator}, return values from
+@code{MHD_lookup_connection_value} and the @code{url},
+@code{method} and @code{version} arguments to the
+@code{MHD_AccessHandlerCallback} will remain valid until the
+respective @code{MHD_RequestCompletedCallback} is invoked.
+
+In contrast, the @code{upload_data} argument of
+@code{MHD_RequestCompletedCallback} as well as all pointers
+from the @code{MHD_PostDataIterator} are only valid for the
+duration of the callback.
+
+Pointers returned from @code{MHD_get_response_header} are
+valid as long as the response itself is valid.
+
+
+@section Including the microhttpd.h header
+@cindex portability
+@cindex microhttpd.h
+
+Ideally, before including "microhttpd.h" you should add the necessary
+includes to define the @code{va_list}, @code{size_t}, @code{ssize_t},
+@code{intptr_t}, @code{off_t}, @code{uint8_t}, @code{uint16_t},
+@code{int32_t}, @code{uint32_t}, @code{int64_t}, @code{uint64_t},
+@code{fd_set}, @code{socklen_t} and @code{struct sockaddr} data types.
+Which specific headers are needed may depend on your platform and your
+build system might include some tests to provide you with the
+necessary conditional operations. For possible suggestions consult
+@code{platform.h} and @code{configure.ac} in the MHD distribution.
+
+Once you have ensured that you manually (!) included the right headers
+for your platform before "microhttpd.h", you should also add a line
+with @code{#define MHD_PLATFORM_H} which will prevent the
+"microhttpd.h" header from trying (and, depending on your platform,
+failing) to include the right headers.
+
+If you do not define MHD_PLATFORM_H, the "microhttpd.h" header will
+automatically include headers needed on GNU/Linux systems (possibly
+causing problems when porting to other platforms).
+
+@section SIGPIPE
+@cindex signals
+MHD does not install a signal handler for SIGPIPE. On platforms where
+this is possible (such as GNU/Linux), it disables SIGPIPE for its I/O
+operations (by passing MSG_NOSIGNAL or similar). On other platforms,
+SIGPIPE signals may be generated from network operations by MHD and
+will cause the process to die unless the developer explicitly installs
+a signal handler for SIGPIPE.
+
+Hence portable code using MHD must install a SIGPIPE handler or
+explicitly block the SIGPIPE signal. MHD does not do so in order to
+avoid messing with other parts of the application that may need to
+handle SIGPIPE in a particular way. You can make your application
+handle SIGPIPE by calling the following function in @code{main}:
+
+@verbatim
+static void
+catcher (int sig)
+{
+}
+
+static void
+ignore_sigpipe ()
+{
+ struct sigaction oldsig;
+ struct sigaction sig;
+
+ sig.sa_handler = &catcher;
+ sigemptyset (&sig.sa_mask);
+#ifdef SA_INTERRUPT
+ sig.sa_flags = SA_INTERRUPT; /* SunOS */
+#else
+ sig.sa_flags = SA_RESTART;
+#endif
+ if (0 != sigaction (SIGPIPE, &sig, &oldsig))
+ fprintf (stderr,
+ "Failed to install SIGPIPE handler: %s\n", strerror (errno));
+}
+@end verbatim
+
+@section MHD_UNSIGNED_LONG_LONG
+@cindex long long
+@cindex MHD_LONG_LONG
+@cindex IAR
+@cindex ARM
+@cindex cortex m3
+@cindex embedded systems
+
+Some platforms do not support @code{long long}. Hence MHD defines a
+macro @code{MHD_UNSIGNED LONG_LONG} which will default to
+@code{unsigned long long}. For standard desktop operating systems,
+this is all you need to know.
+
+However, if your platform does not support @code{unsigned long long},
+you should change "platform.h" to define @code{MHD_LONG_LONG} and
+@code{MHD_UNSIGNED_LONG_LONG} to an appropriate alternative type and
+also define @code{MHD_LONG_LONG_PRINTF} and
+@code{MHD_UNSIGNED_LONG_LONG_PRINTF} to the corresponding format
+string for printing such a data type. Note that the ``signed''
+versions are deprecated. Also, for historical reasons,
+@code{MHD_LONG_LONG_PRINTF} is without the percent sign, whereas
+@code{MHD_UNSIGNED_LONG_LONG_PRINTF} is with the percent sign. Newly
+written code should only use the unsigned versions. However, you need
+to define both in "platform.h" if you need to change the definition
+for the specific platform.
+
+
+@section Portability to W32
+
+libmicrohttpd in general ported well to W32. Most libmicrohttpd features
+are supported. W32 do not support some functions, like epoll and
+corresponding MHD features are not available on W32.
+
+
+@section Portability to z/OS
+
+To compile MHD on z/OS, extract the archive and run
+
+@verbatim
+iconv -f UTF-8 -t IBM-1047 contrib/ascebc > /tmp/ascebc.sh
+chmod +x /tmp/ascebc.sh
+for n in `find * -type f`
+do
+ /tmp/ascebc.sh $n
+done
+@end verbatim
+to convert all source files to EBCDIC. Note that you must run
+@code{configure} from the directory where the configure script is
+located. Otherwise, configure will fail to find the
+@code{contrib/xcc} script (which is a wrapper around the z/OS c89
+compiler).
+
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-const
+@chapter Constants
+
+
+@deftp {Enumeration} MHD_FLAG
+Options for the MHD daemon.
+
+Note that MHD will run automatically in background thread(s) only if
+@code{MHD_USE_INTERNAL_POLLING_THREAD} is used. Otherwise caller
+(application) must use @code{MHD_run} or @code{MHD_run_from_select} to
+have MHD processed network connections and data.
+
+Starting the daemon may also fail if a particular option is not
+implemented or not supported on the target platform (i.e. no support
+for @acronym{TLS}, threads or IPv6). TLS support generally depends on
+options given during MHD compilation.
+
+@table @code
+@item MHD_NO_FLAG
+No options selected.
+
+@item MHD_USE_ERROR_LOG
+If this flag is used, the library should print error messages and
+warnings to stderr (or to custom error printer if it's specified by
+options). Note that for this run-time option to have any effect, MHD
+needs to be compiled with messages enabled. This is done by default
+except you ran configure with the @code{--disable-messages} flag set.
+
+@item MHD_USE_DEBUG
+@cindex debugging
+Currently the same as @code{MHD_USE_ERROR_LOG}.
+
+@item MHD_USE_TLS
+@cindex TLS
+@cindex SSL
+Run in HTTPS-mode. If you specify @code{MHD_USE_TLS} and MHD was
+compiled without SSL support, @code{MHD_start_daemon} will return
+NULL.
+
+@item MHD_USE_THREAD_PER_CONNECTION
+Run using one thread per connection.
+
+@item MHD_USE_INTERNAL_POLLING_THREAD
+Run using an internal thread doing @code{SELECT}.
+
+@item MHD_USE_IPv6
+@cindex IPv6
+Run using the IPv6 protocol (otherwise, MHD will just support IPv4).
+If you specify @code{MHD_USE_IPV6} and the local platform does not
+support it, @code{MHD_start_daemon} will return NULL.
+
+If you want MHD to support IPv4 and IPv6 using a single socket, pass
+MHD_USE_DUAL_STACK, otherwise, if you only pass this option, MHD will
+try to bind to IPv6-only (resulting in no IPv4 support).
+
+@item MHD_USE_DUAL_STACK
+@cindex IPv6
+Use a single socket for IPv4 and IPv6. Note that this will mean
+that IPv4 addresses are returned by MHD in the IPv6-mapped format
+(the 'struct sockaddr_in6' format will be used for IPv4 and IPv6).
+
+@item MHD_USE_PEDANTIC_CHECKS
+@cindex deprecated
+Deprecated (use @code{MHD_OPTION_STRICT_FOR_CLIENT}).
+Be pedantic about the protocol.
+Specifically, at the moment, this flag causes MHD to reject HTTP
+1.1 connections without a @code{Host} header. This is required by the
+standard, but of course in violation of the ``be as liberal as possible
+in what you accept'' norm. It is recommended to turn this @strong{ON}
+if you are testing clients against MHD, and @strong{OFF} in
+production.
+
+@item MHD_USE_POLL
+@cindex FD_SETSIZE
+@cindex poll
+@cindex select
+Use @code{poll()} instead of @code{select()}. This allows sockets with
+descriptors @code{>= FD_SETSIZE}. This option currently only works in
+conjunction with @code{MHD_USE_INTERNAL_POLLING_THREAD} (at this point).
+If you specify @code{MHD_USE_POLL} and the local platform does not
+support it, @code{MHD_start_daemon} will return NULL.
+
+@item MHD_USE_EPOLL
+@cindex FD_SETSIZE
+@cindex epoll
+@cindex select
+Use @code{epoll()} instead of @code{poll()} or @code{select()}. This
+allows sockets with descriptors @code{>= FD_SETSIZE}. This option is
+only available on some systems and does not work in conjunction with
+@code{MHD_USE_THREAD_PER_CONNECTION} (at this point). If you specify
+@code{MHD_USE_EPOLL} and the local platform does not support it,
+@code{MHD_start_daemon} will return NULL. Using @code{epoll()}
+instead of @code{select()} or @code{poll()} can in some situations
+result in significantly higher performance as the system call has
+fundamentally lower complexity (O(1) for @code{epoll()} vs. O(n) for
+@code{select()}/@code{poll()} where n is the number of open
+connections).
+
+@item MHD_USE_TURBO
+@cindex performance
+Enable optimizations to aggressively improve performance.
+
+Currently, the optimizations this option enables are based on
+opportunistic reads and writes. Basically, MHD will simply try to
+read or write or accept on a socket before checking that the socket is
+ready for IO using the event loop mechanism. As the sockets are
+non-blocking, this may fail (at a loss of performance), but generally
+MHD does this in situations where the operation is likely to succeed,
+in which case performance is improved. Setting the flag should generally
+be safe (even though the code is slightly more experimental). You may
+want to benchmark your application to see if this makes any difference
+for you.
+
+
+@item MHD_USE_SUPPRESS_DATE_NO_CLOCK
+@cindex date
+@cindex clock
+@cindex embedded systems
+Suppress (automatically) adding the 'Date:' header to HTTP responses.
+This option should ONLY be used on systems that do not have a clock
+and that DO provide other mechanisms for cache control. See also
+RFC 2616, section 14.18 (exception 3).
+
+
+@item MHD_USE_NO_LISTEN_SOCKET
+@cindex listen
+@cindex proxy
+@cindex embedded systems
+Run the HTTP server without any listen socket. This option only makes
+sense if @code{MHD_add_connection} is going to be used exclusively to
+connect HTTP clients to the HTTP server. This option is incompatible
+with using a thread pool; if it is used,
+@code{MHD_OPTION_THREAD_POOL_SIZE} is ignored.
+
+
+@item MHD_USE_ITC
+@cindex quiesce
+Force MHD to use a signal inter-thread communication channel to notify
+the event loop (of threads) of our shutdown and other events. This is
+required if an application uses @code{MHD_USE_INTERNAL_POLLING_THREAD}
+and then performs @code{MHD_quiesce_daemon} (which eliminates our
+ability to signal termination via the listen socket). In these modes,
+@code{MHD_quiesce_daemon} will fail if this option was not set. Also,
+use of this option is automatic (as in, you do not even have to
+specify it), if @code{MHD_USE_NO_LISTEN_SOCKET} is specified. In
+"external" select mode, this option is always simply ignored.
+
+Using this option also guarantees that MHD will not call
+@code{shutdown()} on the listen socket, which means a parent
+process can continue to use the socket.
+
+@item MHD_ALLOW_SUSPEND_RESUME
+Enables using @code{MHD_suspend_connection} and
+@code{MHD_resume_connection}, as performing these calls requires some
+additional inter-thred communication channels to be created, and code
+not using these calls should not pay the cost.
+
+@item MHD_USE_TCP_FASTOPEN
+@cindex listen
+Enable TCP_FASTOPEN on the listen socket. TCP_FASTOPEN is currently
+supported on Linux >= 3.6. On other systems using this option with
+cause @code{MHD_start_daemon} to fail.
+
+
+@item MHD_ALLOW_UPGRADE
+@cindex upgrade
+This option must be set if you want to upgrade connections
+(via ``101 Switching Protocols'' responses). This requires MHD to
+allocate additional resources, and hence we require this
+special flag so we only use the resources that are really needed.
+
+
+@item MHD_USE_AUTO
+Automatically select best event loop style (polling function)
+depending on requested mode by other MHD flags and functions available
+on platform. If application doesn't have requirements for any
+specific polling function, it's recommended to use this flag. This
+flag is very convenient for multiplatform applications.
+
+@item MHD_USE_POST_HANDSHAKE_AUTH_SUPPORT
+Tell the TLS library to support post handshake client authentication.
+Only useful in combination with @code{MHD_USE_TLS}.
+
+This option will only work if the underlying TLS library
+supports it (i.e. GnuTLS after 3.6.3). If the TLS library
+does not support it, MHD may ignore the option and proceed
+without supporting this features.
+
+@item MHD_USE_INSECURE_TLS_EARLY_DATA
+Tell the TLS library to support TLS v1.3 early data (0-RTT) with the
+resulting security drawbacks. Only enable this if you really know what
+you are doing. MHD currently does NOT enforce that this only affects
+GET requests! You have been warned.
+
+This option will only work if the underlying TLS library
+supports it (i.e. GnuTLS after 3.6.3). If the TLS library
+does not support it, MHD may ignore the option and proceed
+without supporting this features.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_OPTION
+MHD options. Passed in the varargs portion of
+@code{MHD_start_daemon()}.
+
+@table @code
+@item MHD_OPTION_END
+No more options / last option. This is used to terminate the VARARGs
+list.
+
+@item MHD_OPTION_CONNECTION_MEMORY_LIMIT
+@cindex memory, limiting memory utilization
+Maximum memory size per connection (followed by a @code{size_t}). The
+default is 32 kB (32*1024 bytes) as defined by the internal constant
+@code{MHD_POOL_SIZE_DEFAULT}. Values above 128k are unlikely to
+result in much benefit, as half of the memory will be typically used
+for IO, and TCP buffers are unlikely to support window sizes above 64k
+on most systems.
+
+@item MHD_OPTION_CONNECTION_MEMORY_INCREMENT
+@cindex memory
+Increment to use for growing the read buffer (followed by a
+@code{size_t}). The default is 1024 (bytes). Increasing this value
+will make MHD use memory for reading more aggressively, which can
+reduce the number of @code{recvfrom} calls but may increase the number
+of @code{sendto} calls. The given value must fit within
+MHD_OPTION_CONNECTION_MEMORY_LIMIT.
+
+@item MHD_OPTION_CONNECTION_LIMIT
+@cindex connection, limiting number of connections
+Maximum number of concurrent connections to accept (followed by an
+@code{unsigned int}). The default is @code{FD_SETSIZE - 4} (the
+maximum number of file descriptors supported by @code{select} minus
+four for @code{stdin}, @code{stdout}, @code{stderr} and the server
+socket). In other words, the default is as large as possible.
+
+If the connection limit is reached, MHD's behavior depends a bit on
+other options. If @code{MHD_USE_ITC} was given, MHD
+will stop accepting connections on the listen socket. This will cause
+the operating system to queue connections (up to the @code{listen()}
+limit) above the connection limit. Those connections will be held
+until MHD is done processing at least one of the active connections.
+If @code{MHD_USE_ITC} is not set, then MHD will continue
+to @code{accept()} and immediately @code{close()} these connections.
+
+Note that if you set a low connection limit, you can easily get into
+trouble with browsers doing request pipelining. For example, if your
+connection limit is ``1'', a browser may open a first connection to
+access your ``index.html'' file, keep it open but use a second
+connection to retrieve CSS files, images and the like. In fact, modern
+browsers are typically by default configured for up to 15 parallel
+connections to a single server. If this happens, MHD will refuse to
+even accept the second connection until the first connection is
+closed --- which does not happen until timeout. As a result, the
+browser will fail to render the page and seem to hang. If you expect
+your server to operate close to the connection limit, you should
+first consider using a lower timeout value and also possibly add
+a ``Connection: close'' header to your response to ensure that
+request pipelining is not used and connections are closed immediately
+after the request has completed:
+@example
+MHD_add_response_header (response,
+ MHD_HTTP_HEADER_CONNECTION,
+ "close");
+@end example
+
+@item MHD_OPTION_CONNECTION_TIMEOUT
+@cindex timeout
+After how many seconds of inactivity should a connection automatically
+be timed out? (followed by an @code{unsigned int}; use zero for no
+timeout). The default is zero (no timeout).
+
+@item MHD_OPTION_NOTIFY_COMPLETED
+Register a function that should be called whenever a request has been
+completed (this can be used for application-specific clean up).
+Requests that have never been presented to the application (via
+@code{MHD_AccessHandlerCallback()}) will not result in
+notifications.
+
+This option should be followed by @strong{TWO} pointers. First a
+pointer to a function of type @code{MHD_RequestCompletedCallback()}
+and second a pointer to a closure to pass to the request completed
+callback. The second pointer maybe @code{NULL}.
+
+@item MHD_OPTION_NOTIFY_CONNECTION
+Register a function that should be called when the TCP connection to a
+client is opened or closed. The registered callback is called twice per
+TCP connection, with @code{MHD_CONNECTION_NOTIFY_STARTED} and
+@code{MHD_CONNECTION_NOTIFY_CLOSED} respectively. An additional
+argument can be used to store TCP connection specific information,
+which can be retrieved using @code{MHD_CONNECTION_INFO_SOCKET_CONTEXT}
+during the lifetime of the TCP connection.
+Note @code{MHD_OPTION_NOTIFY_COMPLETED} and the @code{req_cls} argument
+to the @code{MHD_AccessHandlerCallback} are per HTTP request (and there
+can be multiple HTTP requests per TCP connection).
+
+This option should be followed by @strong{TWO} pointers. First a
+pointer to a function of type @code{MHD_NotifyConnectionCallback()}
+and second a pointer to a closure to pass to the request completed
+callback. The second pointer maybe @code{NULL}.
+
+@item MHD_OPTION_PER_IP_CONNECTION_LIMIT
+Limit on the number of (concurrent) connections made to the
+server from the same IP address. Can be used to prevent one
+IP from taking over all of the allowed connections. If the
+same IP tries to establish more than the specified number of
+connections, they will be immediately rejected. The option
+should be followed by an @code{unsigned int}. The default is
+zero, which means no limit on the number of connections
+from the same IP address.
+
+@item MHD_OPTION_LISTEN_BACKLOG_SIZE
+Set the size of the @code{listen()} back log queue of the TCP socket.
+Takes an @code{unsigned int} as the argument. Default is the
+platform-specific value of @code{SOMAXCONN}.
+
+@item MHD_OPTION_STRICT_FOR_CLIENT
+Specify how strict we should enforce the HTTP protocol.
+Takes an @code{int} as the argument. Default is zero.
+
+If set to 1, MHD will be strict about the protocol. Specifically, at
+the moment, this flag uses MHD to reject HTTP 1.1 connections without
+a "Host" header. This is required by the standard, but of course in
+violation of the "be as liberal as possible in what you accept" norm.
+It is recommended to set this to 1 if you are testing clients against
+MHD, and 0 in production.
+
+If set to -1 MHD will be permissive about the protocol, allowing
+slight deviations that are technically not allowed by the
+RFC. Specifically, at the moment, this flag causes MHD to allow spaces
+in header field names. This is disallowed by the standard.
+
+It is not recommended to set it to -1 on publicly available servers as
+it may potentially lower level of protection.
+
+@item MHD_OPTION_SERVER_INSANITY
+@cindex testing
+Allows the application to disable certain sanity precautions in MHD. With
+these, the client can break the HTTP protocol, so this should never be used in
+production. The options are, however, useful for testing HTTP clients against
+"broken" server implementations. This argument must be followed by an
+@code{unsigned int}, corresponding to an @code{enum MHD_DisableSanityCheck}.
+
+Right now, no sanity checks can be disabled.
+
+@item MHD_OPTION_SOCK_ADDR
+@cindex bind, restricting bind
+Bind daemon to the supplied socket address. This option should be followed by a
+@code{struct sockaddr *}. If @code{MHD_USE_IPv6} is specified,
+the @code{struct sockaddr*} should point to a @code{struct sockaddr_in6},
+otherwise to a @code{struct sockaddr_in}. If this option is not specified,
+the daemon will listen to incoming connections from anywhere. If you use this
+option, the 'port' argument from @code{MHD_start_daemon} is ignored and the port
+from the given @code{struct sockaddr *} will be used instead.
+
+@item MHD_OPTION_URI_LOG_CALLBACK
+@cindex debugging
+@cindex logging
+@cindex query string
+Specify a function that should be called before parsing the URI from
+the client. The specified callback function can be used for processing
+the URI (including the options) before it is parsed. The URI after
+parsing will no longer contain the options, which maybe inconvenient for
+logging. This option should be followed by two arguments, the first
+one must be of the form
+@example
+ void * my_logger(void * cls, const char * uri, struct MHD_Connection *con)
+@end example
+where the return value will be passed as
+@code{*req_cls} in calls to the @code{MHD_AccessHandlerCallback}
+when this request is processed later; returning a
+value of @code{NULL} has no special significance; (however,
+note that if you return non-@code{NULL}, you can no longer
+rely on the first call to the access handler having
+@code{NULL == *req_cls} on entry)
+@code{cls} will be set to the second argument following
+MHD_OPTION_URI_LOG_CALLBACK. Finally, @code{uri} will
+be the 0-terminated URI of the request.
+
+Note that during the time of this call, most of the connection's state
+is not initialized (as we have not yet parsed he headers). However,
+information about the connecting client (IP, socket) is available.
+
+@item MHD_OPTION_HTTPS_MEM_KEY
+@cindex SSL
+@cindex TLS
+Memory pointer to the private key to be used by the
+HTTPS daemon. This option should be followed by an
+"const char*" argument.
+This should be used in conjunction with 'MHD_OPTION_HTTPS_MEM_CERT'.
+
+@item MHD_OPTION_HTTPS_KEY_PASSWORD
+@cindex SSL
+@cindex TLS
+Memory pointer to the password that decrypts the
+private key to be used by the HTTPS daemon.
+This option should be followed by an
+"const char*" argument.
+This should be used in conjunction with 'MHD_OPTION_HTTPS_MEM_KEY'.
+
+The password (or passphrase) is only used immediately during
+@code{MHD_start_daemon()}. Thus, the application may want to
+erase it from memory afterwards for additional security.
+
+@item MHD_OPTION_HTTPS_MEM_CERT
+@cindex SSL
+@cindex TLS
+Memory pointer to the certificate to be used by the
+HTTPS daemon. This option should be followed by an
+"const char*" argument.
+This should be used in conjunction with 'MHD_OPTION_HTTPS_MEM_KEY'.
+
+@item MHD_OPTION_HTTPS_MEM_TRUST
+@cindex SSL
+@cindex TLS
+Memory pointer to the CA certificate to be used by the
+HTTPS daemon to authenticate and trust clients certificates.
+This option should be followed by an "const char*" argument.
+The presence of this option activates the request of certificate
+to the client. The request to the client is marked optional, and
+it is the responsibility of the server to check the presence
+of the certificate if needed.
+Note that most browsers will only present a client certificate
+only if they have one matching the specified CA, not sending
+any certificate otherwise.
+
+@item MHD_OPTION_HTTPS_CRED_TYPE
+@cindex SSL
+@cindex TLS
+Daemon credentials type. Either certificate or anonymous,
+this option should be followed by one of the values listed in
+"enum gnutls_credentials_type_t".
+
+@item MHD_OPTION_HTTPS_PRIORITIES
+@cindex SSL
+@cindex TLS
+@cindex cipher
+SSL/TLS protocol version and ciphers.
+This option must be followed by an "const char *" argument
+specifying the SSL/TLS protocol versions and ciphers that
+are acceptable for the application. The string is passed
+unchanged to gnutls_priority_init. If this option is not
+specified, ``NORMAL'' is used.
+
+@item MHD_OPTION_HTTPS_CERT_CALLBACK
+@cindex SSL
+@cindex TLS
+@cindex SNI
+Use a callback to determine which X.509 certificate should be used for
+a given HTTPS connection. This option should be followed by a
+argument of type "gnutls_certificate_retrieve_function2 *". This
+option provides an alternative to MHD_OPTION_HTTPS_MEM_KEY and
+MHD_OPTION_HTTPS_MEM_CERT. You must use this version if multiple
+domains are to be hosted at the same IP address using TLS's Server
+Name Indication (SNI) extension. In this case, the callback is
+expected to select the correct certificate based on the SNI
+information provided. The callback is expected to access the SNI data
+using gnutls_server_name_get(). Using this option requires GnuTLS 3.0
+or higher.
+
+@item MHD_OPTION_HTTPS_CERT_CALLBACK2
+@cindex SSL
+@cindex TLS
+@cindex SNI
+@cindex OCSP
+Use a callback to determine which X.509 certificate should be
+used for a given HTTPS connection. This option should be
+followed by a argument of type `gnutls_certificate_retrieve_function3 *`.
+This option provides an
+alternative/extension to #MHD_OPTION_HTTPS_CERT_CALLBACK.
+You must use this version if you want to use OCSP stapling.
+Using this option requires GnuTLS 3.6.3 or higher.
+
+@item MHD_OPTION_GNUTLS_PSK_CRED_HANDLER
+@cindex SSL
+@cindex TLS
+@cindex PSK
+Use pre-shared key for TLS credentials.
+Pass a pointer to callback of type
+@code{MHD_PskServerCredentialsCallback} and a closure.
+The function will be called to
+retrieve the shared key for a given username.
+
+@item MHD_OPTION_DIGEST_AUTH_RANDOM
+@cindex digest auth
+@cindex random
+Digest Authentication nonce's seed.
+
+This option should be followed by two arguments. First an integer of
+type "size_t" which specifies the size of the buffer pointed to by the
+second argument in bytes. Note that the application must ensure that
+the buffer of the second argument remains allocated and unmodified
+while the daemon is running. For security, you SHOULD provide a fresh
+random nonce when using MHD with Digest Authentication.
+
+@item MHD_OPTION_NONCE_NC_SIZE
+@cindex digest auth
+@cindex replay attack
+
+Size of an array of nonce and nonce counter map. This option must be
+followed by an "unsigned int" argument that have the size (number of
+elements) of a map of a nonce and a nonce-counter. If this option
+is not specified, a default value of 4 will be used (which might be
+too small for servers handling many requests). If you do not use
+digest authentication at all, you can specify a value of zero to
+save some memory.
+
+You should calculate the value of NC_SIZE based on the number of
+connections per second multiplied by your expected session duration
+plus a factor of about two for hash table collisions. For example, if
+you expect 100 digest-authenticated connections per second and the
+average user to stay on your site for 5 minutes, then you likely need
+a value of about 60000. On the other hand, if you can only expect
+only 10 digest-authenticated connections per second, tolerate browsers
+getting a fresh nonce for each request and expect a HTTP request
+latency of 250 ms, then a value of about 5 should be fine.
+
+
+@item MHD_OPTION_LISTEN_SOCKET
+@cindex systemd
+Listen socket to use. Pass a listen socket for MHD to use
+(systemd-style). If this option is used, MHD will not open its own
+listen socket(s). The argument passed must be of type "int" and refer
+to an existing socket that has been bound to a port and is listening.
+
+@item MHD_OPTION_EXTERNAL_LOGGER
+@cindex logging
+Use the given function for logging error messages.
+This option must be followed by two arguments; the
+first must be a pointer to a function
+of type 'void fun(void * arg, const char * fmt, va_list ap)'
+and the second a pointer of type 'void*' which will
+be passed as the "arg" argument to "fun".
+
+Note that MHD will not generate any log messages without
+the MHD_USE_ERROR_LOG flag set and if MHD was compiled
+with the "--disable-messages" flag.
+
+@item MHD_OPTION_THREAD_POOL_SIZE
+@cindex performance
+Number (unsigned int) of threads in thread pool. Enable
+thread pooling by setting this value to to something
+greater than 1. Currently, thread mode must be
+MHD_USE_INTERNAL_POLLING_THREAD if thread pooling is enabled
+(@code{MHD_start_daemon} returns @code{NULL} for an unsupported thread
+mode).
+
+@item MHD_OPTION_ARRAY
+@cindex options
+@cindex foreign-function interface
+This option can be used for initializing MHD using options from an
+array. A common use for this is writing an FFI for MHD. The actual
+options given are in an array of 'struct MHD_OptionItem', so this
+option requires a single argument of type 'struct MHD_OptionItem'.
+The array must be terminated with an entry @code{MHD_OPTION_END}.
+
+An example for code using MHD_OPTION_ARRAY is:
+@example
+struct MHD_OptionItem ops[] = @{
+ @{ MHD_OPTION_CONNECTION_LIMIT, 100, NULL @},
+ @{ MHD_OPTION_CONNECTION_TIMEOUT, 10, NULL @},
+ @{ MHD_OPTION_END, 0, NULL @}
+@};
+d = MHD_start_daemon(0, 8080, NULL, NULL, dh, NULL,
+ MHD_OPTION_ARRAY, ops,
+ MHD_OPTION_END);
+@end example
+For options that expect a single pointer argument, the
+second member of the @code{struct MHD_OptionItem} is ignored.
+For options that expect two pointer arguments, the first
+argument must be cast to @code{intptr_t}.
+
+@item MHD_OPTION_UNESCAPE_CALLBACK
+@cindex internationalization
+@cindex escaping
+
+Specify a function that should be called for unescaping escape
+sequences in URIs and URI arguments. Note that this function will NOT
+be used by the MHD_PostProcessor. If this option is not specified,
+the default method will be used which decodes escape sequences of the
+form "%HH". This option should be followed by two arguments, the
+first one must be of the form
+
+@example
+ size_t my_unescaper(void * cls, struct MHD_Connection *c, char *s)
+@end example
+
+where the return value must be @code{strlen(s)} and @code{s} should be
+updated. Note that the unescape function must not lengthen @code{s}
+(the result must be shorter than the input and still be 0-terminated).
+@code{cls} will be set to the second argument following
+MHD_OPTION_UNESCAPE_CALLBACK.
+
+
+@item MHD_OPTION_THREAD_STACK_SIZE
+@cindex stack
+@cindex thread
+@cindex pthread
+@cindex embedded systems
+Maximum stack size for threads created by MHD. This option must be
+followed by a @code{size_t}). Not specifying this option or using
+a value of zero means using the system default (which is likely to
+differ based on your platform).
+
+@item MHD_OPTION_TCP_FASTQUEUE_QUEUE_SIZE
+@cindex listen
+When the flag @code{MHD_USE_TCP_FASTOPEN} is used, this option sets the
+connection handshake queue size for the TCP FASTOPEN connections. Note
+that a TCP FASTOPEN connection handshake occupies more resources than a
+TCP handshake as the SYN packets also contain DATA which is kept in the
+associate state until handshake is completed. If this option is not
+given the queue size is set to a default value of 10. This option must
+be followed by a @code{unsigned int}.
+
+@item MHD_OPTION_HTTPS_MEM_DHPARAMS
+@cindex TLS
+@cindex SSL
+@cindex DH
+Memory pointer for the Diffie-Hellman parameters (dh.pem) to be used
+by the HTTPS daemon for key exchange. This option must be followed by
+a @code{const char *} argument. The argument would be a zero-terminated
+string with a PEM encoded PKCS3 DH parameters structure suitable
+for passing to @code{gnutls_dh_parms_import_pkcs3}.
+
+@item MHD_OPTION_LISTENING_ADDRESS_REUSE
+@cindex bind, restricting bind
+@cindex reusing listening address
+This option must be followed by a @code{unsigned int} argument.
+If this option is present and true (nonzero) parameter is given, allow reusing
+the address:port of the listening socket (using @code{SO_REUSEPORT} on most
+platforms, and @code{SO_REUSEADDR} on Windows). If a false (zero) parameter is
+given, disallow reusing the the address:port of the listening socket (this
+usually requires no special action, but @code{SO_EXCLUSIVEADDRUSE} is needed on
+Windows). If this option is not present @code{SO_REUSEADDR} is used on all
+platforms except Windows so reusing of address:port is disallowed.
+
+@end table
+@end deftp
+
+
+@deftp {C Struct} MHD_OptionItem
+Entry in an MHD_OPTION_ARRAY. See the @code{MHD_OPTION_ARRAY} option
+argument for its use.
+
+The @code{option} member is used to specify which option is specified
+in the array. The other members specify the respective argument.
+
+Note that for options taking only a single pointer, the
+@code{ptr_value} member should be set. For options taking two pointer
+arguments, the first pointer must be cast to @code{intptr_t} and both
+the @code{value} and the @code{ptr_value} members should be used to
+pass the two pointers.
+@end deftp
+
+
+@deftp {Enumeration} MHD_ValueKind
+The @code{MHD_ValueKind} specifies the source of the key-value pairs in
+the HTTP protocol.
+
+@table @code
+@item MHD_HEADER_KIND
+HTTP header.
+
+@item MHD_COOKIE_KIND
+@cindex cookie
+Cookies. Note that the original HTTP header containing the cookie(s)
+will still be available and intact.
+
+@item MHD_POSTDATA_KIND
+@cindex POST method
+@code{POST} data. This is available only if a content encoding
+supported by MHD is used (currently only @acronym{URL} encoding), and
+only if the posted content fits within the available memory pool. Note
+that in that case, the upload data given to the
+@code{MHD_AccessHandlerCallback()} will be empty (since it has
+already been processed).
+
+@item MHD_GET_ARGUMENT_KIND
+@code{GET} (URI) arguments.
+
+@item MHD_FOOTER_KIND
+HTTP footer (only for http 1.1 chunked encodings).
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_RequestTerminationCode
+The @code{MHD_RequestTerminationCode} specifies reasons why a request
+has been terminated (or completed).
+
+@table @code
+@item MHD_REQUEST_TERMINATED_COMPLETED_OK
+We finished sending the response.
+
+@item MHD_REQUEST_TERMINATED_WITH_ERROR
+Error handling the connection (resources exhausted, other side closed
+connection, application error accepting request, etc.)
+
+@item MHD_REQUEST_TERMINATED_TIMEOUT_REACHED
+No activity on the connection for the number of seconds specified using
+@code{MHD_OPTION_CONNECTION_TIMEOUT}.
+
+@item MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN
+We had to close the session since MHD was being shut down.
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_ResponseMemoryMode
+The @code{MHD_ResponeMemoryMode} specifies how MHD should treat
+the memory buffer given for the response in
+@code{MHD_create_response_from_buffer}.
+
+@table @code
+@item MHD_RESPMEM_PERSISTENT
+Buffer is a persistent (static/global) buffer that won't change
+for at least the lifetime of the response, MHD should just use
+it, not free it, not copy it, just keep an alias to it.
+
+@item MHD_RESPMEM_MUST_FREE
+Buffer is heap-allocated with @code{malloc} (or equivalent) and
+should be freed by MHD after processing the response has
+concluded (response reference counter reaches zero).
+
+@item MHD_RESPMEM_MUST_COPY
+Buffer is in transient memory, but not on the heap (for example,
+on the stack or non-malloc allocated) and only valid during the
+call to @code{MHD_create_response_from_buffer}. MHD must make its
+own private copy of the data for processing.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_ResponseFlags
+Response-specific flags. Passed as an argument to
+@code{MHD_set_response_options()}.
+
+@table @code
+@item MHD_RF_NONE
+No special handling.
+
+@item MHD_RF_HTTP_VERSION_1_0_ONLY
+Only respond in conservative HTTP 1.0-mode. In particular,
+do not (automatically) sent "Connection" headers and always
+close the connection after generating the response.
+
+By default, MHD will respond using the same HTTP version which
+was set in the request. You can also set the
+@code{MHD_RF_HTTP_VERSION_1_0_RESPONSE} flag to force version 1.0
+in the response.
+
+@item MHD_RF_HTTP_VERSION_1_0_RESPONSE
+Only respond in HTTP 1.0-mode. Contrary to the
+@code{MHD_RF_HTTP_VERSION_1_0_ONLY} flag, the response's HTTP version will
+always be set to 1.0 and ``Connection'' headers are still supported.
+
+You can even combine this option with MHD_RF_HTTP_VERSION_1_0_ONLY to
+change the response's HTTP version while maintaining strict compliance
+with HTTP 1.0 regarding connection management.
+
+This solution is not perfect as this flag is set on the response which
+is created after header processing. So MHD will behave as a HTTP 1.1
+server until the response is queued. It means that an invalid HTTP 1.1
+request will fail even if the response is sent with HTTP 1.0 and the
+request would be valid if interpreted with this version. For example,
+this request will fail in strict mode:
+
+@verbatim
+GET / HTTP/1.1
+@end verbatim
+
+as the ``Host'' header is missing and is mandatory in HTTP 1.1, but it
+should succeed when interpreted with HTTP 1.0.
+
+@item MHD_RF_INSANITY_HEADER_CONTENT_LENGTH
+Disable sanity check preventing clients from manually
+setting the HTTP content length option.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_ResponseOptions
+Response-specific options. Passed in the varargs portion of
+@code{MHD_set_response_options()}.
+
+@table @code
+@item MHD_RO_END
+No more options / last option. This is used to terminate the VARARGs
+list.
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_WEBSOCKET_FLAG
+@cindex websocket
+Options for the MHD websocket stream.
+
+This is used for initialization of a websocket stream when calling
+@code{MHD_websocket_stream_init} or @code{MHD_websocket_stream_init2} and
+alters the behavior of the websocket stream.
+
+Note that websocket streams are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@table @code
+@item MHD_WEBSOCKET_FLAG_SERVER
+The websocket stream is initialized in server mode (default).
+Thus all outgoing payload will not be masked.
+All incoming payload must be masked.
+
+This flag cannot be used together with @code{MHD_WEBSOCKET_FLAG_CLIENT}.
+
+@item MHD_WEBSOCKET_FLAG_CLIENT
+The websocket stream is initialized in client mode.
+You will usually never use that mode in combination with @emph{libmicrohttpd},
+because @emph{libmicrohttpd} provides a server and not a client.
+In client mode all outgoing payload will be masked
+(XOR-ed with random values).
+All incoming payload must be unmasked.
+If you use this mode, you must always call @code{MHD_websocket_stream_init2}
+instead of @code{MHD_websocket_stream_init}, because you need
+to pass a random number generator callback function for masking.
+
+This flag cannot be used together with @code{MHD_WEBSOCKET_FLAG_SERVER}.
+
+@item MHD_WEBSOCKET_FLAG_NO_FRAGMENTS
+You don't want to get fragmented data while decoding (default).
+Fragmented frames will be internally put together until
+they are complete.
+Whether or not data is fragmented is decided
+by the sender of the data during encoding.
+
+This cannot be used together with @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS}.
+
+@item MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS
+You want fragmented data, if it appears while decoding.
+You will receive the content of the fragmented frame,
+but if you are decoding text, you will never get an unfinished
+UTF-8 sequence (if the sequence appears between two fragments).
+Instead the text will end before the unfinished UTF-8 sequence.
+With the next fragment, which finishes the UTF-8 sequence,
+you will get the complete UTF-8 sequence.
+
+This cannot be used together with @code{MHD_WEBSOCKET_FLAG_NO_FRAGMENTS}.
+
+@item MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR
+If the websocket stream becomes invalid during decoding due to
+protocol errors, a matching close frame will automatically
+be generated.
+The close frame will be returned via the parameters
+@code{payload} and @code{payload_len} of @code{MHD_websocket_decode} and
+the return value is negative (a value of @code{enum MHD_WEBSOCKET_STATUS}).
+
+The generated close frame must be freed by the caller
+with @code{MHD_websocket_free}.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_WEBSOCKET_FRAGMENTATION
+@cindex websocket
+This enumeration is used to specify the fragmentation behavior
+when encoding of data (text/binary) for a websocket stream.
+This is used with @code{MHD_websocket_encode_text} or
+@code{MHD_websocket_encode_binary}.
+
+Note that websocket streams are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@table @code
+@item MHD_WEBSOCKET_FRAGMENTATION_NONE
+You don't want to use fragmentation.
+The encoded frame consists of only one frame.
+
+@item MHD_WEBSOCKET_FRAGMENTATION_FIRST
+You want to use fragmentation.
+The encoded frame is the first frame of
+a series of data frames of the same type
+(text or binary).
+You may send control frames (ping, pong or close)
+between these data frames.
+
+@item MHD_WEBSOCKET_FRAGMENTATION_FOLLOWING
+You want to use fragmentation.
+The encoded frame is not the first frame of
+the series of data frames, but also not the last one.
+You may send control frames (ping, pong or close)
+between these data frames.
+
+@item MHD_WEBSOCKET_FRAGMENTATION_LAST
+You want to use fragmentation.
+The encoded frame is the last frame of
+the series of data frames, but also not the first one.
+After this frame, you may send all types of frames again.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_WEBSOCKET_STATUS
+@cindex websocket
+This enumeration is used for the return value of almost
+every websocket stream function.
+Errors are negative and values equal to or above zero mean a success.
+Positive values are only used by @code{MHD_websocket_decode}.
+
+Note that websocket streams are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@table @code
+@item MHD_WEBSOCKET_STATUS_OK
+The call succeeded.
+Especially for @code{MHD_websocket_decode} this means that no error occurred,
+but also no frame has been completed yet.
+For other functions this means simply a success.
+
+@item MHD_WEBSOCKET_STATUS_TEXT_FRAME
+@code{MHD_websocket_decode} has decoded a text frame.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded text (if any).
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_BINARY_FRAME
+@code{MHD_websocket_decode} has decoded a binary frame.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded binary data (if any).
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_CLOSE_FRAME
+@code{MHD_websocket_decode} has decoded a close frame.
+This means you must close the socket using @code{MHD_upgrade_action}
+with @code{MHD_UPGRADE_ACTION_CLOSE}.
+You may respond with a close frame before closing.
+The parameters @code{payload} and @code{payload_len} are filled with
+the close reason (if any).
+The close reason starts with a two byte sequence of close code
+in network byte order (see @code{enum MHD_WEBSOCKET_CLOSEREASON}).
+After these two bytes a UTF-8 encoded close reason may follow.
+You can call @code{MHD_websocket_split_close_reason} to split that
+close reason.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_PING_FRAME
+@code{MHD_websocket_decode} has decoded a ping frame.
+You should respond to this with a pong frame.
+The pong frame must contain the same binary data as
+the corresponding ping frame (if it had any).
+The parameters @code{payload} and @code{payload_len} are filled with
+the binary ping data (if any).
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_PONG_FRAME
+@code{MHD_websocket_decode} has decoded a pong frame.
+You should usually only receive pong frames if you sent
+a ping frame before.
+The binary data should be equal to your ping frame and can be
+used to distinguish the response if you sent multiple ping frames.
+The parameters @code{payload} and @code{payload_len} are filled with
+the binary pong data (if any).
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_TEXT_FIRST_FRAGMENT
+@code{MHD_websocket_decode} has decoded a text frame fragment.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded text (if any).
+This is like @code{MHD_WEBSOCKET_STATUS_TEXT_FRAME}, but it can only
+appear if you specified @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS} during
+the call of @code{MHD_websocket_stream_init} or
+@code{MHD_websocket_stream_init2}.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_TEXT_FIRST_FRAGMENT
+@code{MHD_websocket_decode} has decoded a binary frame fragment.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded binary data (if any).
+This is like @code{MHD_WEBSOCKET_STATUS_BINARY_FRAME}, but it can only
+appear if you specified @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS} during
+the call of @code{MHD_websocket_stream_init} or
+@code{MHD_websocket_stream_init2}.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_TEXT_NEXT_FRAGMENT
+@code{MHD_websocket_decode} has decoded the next text frame fragment.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded text (if any).
+This is like @code{MHD_WEBSOCKET_STATUS_TEXT_FIRST_FRAGMENT}, but it appears
+only after the first and before the last fragment of a series of fragments.
+It can only appear if you specified @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS}
+during the call of @code{MHD_websocket_stream_init} or
+@code{MHD_websocket_stream_init2}.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_BINARY_NEXT_FRAGMENT
+@code{MHD_websocket_decode} has decoded the next binary frame fragment.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded binary data (if any).
+This is like @code{MHD_WEBSOCKET_STATUS_BINARY_FIRST_FRAGMENT}, but it appears
+only after the first and before the last fragment of a series of fragments.
+It can only appear if you specified @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS}
+during the call of @code{MHD_websocket_stream_init} or
+@code{MHD_websocket_stream_init2}.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_TEXT_LAST_FRAGMENT
+@code{MHD_websocket_decode} has decoded the last text frame fragment.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded text (if any).
+This is like @code{MHD_WEBSOCKET_STATUS_TEXT_FIRST_FRAGMENT}, but it appears
+only for the last fragment of a series of fragments.
+It can only appear if you specified @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS}
+during the call of @code{MHD_websocket_stream_init} or
+@code{MHD_websocket_stream_init2}.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_BINARY_LAST_FRAGMENT
+@code{MHD_websocket_decode} has decoded the last binary frame fragment.
+The parameters @code{payload} and @code{payload_len} are filled with
+the decoded binary data (if any).
+This is like @code{MHD_WEBSOCKET_STATUS_BINARY_FIRST_FRAGMENT}, but it appears
+only for the last fragment of a series of fragments.
+It can only appear if you specified @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS}
+during the call of @code{MHD_websocket_stream_init} or
+@code{MHD_websocket_stream_init2}.
+You must free the returned @code{payload} after use with
+@code{MHD_websocket_free}.
+
+@item MHD_WEBSOCKET_STATUS_PROTOCOL_ERROR
+The call failed and the stream is invalid now for decoding.
+You must close the websocket now using @code{MHD_upgrade_action}
+with @code{MHD_UPGRADE_ACTION_CLOSE}.
+You may send a close frame before closing.
+This is only used by @code{MHD_websocket_decode} and happens
+if the stream contains errors (i. e. invalid byte data).
+
+@item MHD_WEBSOCKET_STATUS_STREAM_BROKEN
+You tried to decode something, but the stream has already
+been marked invalid.
+You must close the websocket now using @code{MHD_upgrade_action}
+with @code{MHD_UPGRADE_ACTION_CLOSE}.
+You may send a close frame before closing.
+This is only used by @code{MHD_websocket_decode} and happens
+if you call @code{MDM_websocket_decode} again after
+has been invalidated.
+You can call @code{MHD_websocket_stream_is_valid} at any time
+to check whether a stream is invalid or not.
+
+@item MHD_WEBSOCKET_STATUS_MEMORY_ERROR
+A memory allocation failed. The stream remains valid.
+If this occurred while decoding, the decoding could be
+possible later if enough memory is available.
+This could happen while decoding if you received a too big data frame.
+You could try to specify max_payload_size during the call of
+@code{MHD_websocket_stream_init} or @code{MHD_websocket_stream_init2} to
+avoid this and close the websocket instead.
+
+@item MHD_WEBSOCKET_STATUS_PARAMETER_ERROR
+You passed invalid parameters during the function call
+(i. e. a NULL pointer for a required parameter).
+The stream remains valid.
+
+@item MHD_WEBSOCKET_STATUS_MAXIMUM_SIZE_EXCEEDED
+The maximum payload size has been exceeded.
+If you got this return code from @code{MHD_websocket_decode} then
+the stream becomes invalid and the websocket must be closed
+using @code{MHD_upgrade_action} with @code{MHD_UPGRADE_ACTION_CLOSE}.
+You may send a close frame before closing.
+The maximum payload size is specified during the call of
+@code{MHD_websocket_stream_init} or @code{MHD_websocket_stream_init2}.
+This can also appear if you specified 0 as maximum payload size
+when the message is greater than the maximum allocatable memory size
+(i. e. more than 4 GiB on 32 bit systems).
+If you got this return code from @code{MHD_websocket_encode_close},
+@code{MHD_websocket_encode_ping} or @code{MHD_websocket_encode_pong} then
+you passed to much payload data. The stream remains valid then.
+
+@item MHD_WEBSOCKET_STATUS_UTF8_ENCODING_ERROR
+An UTF-8 sequence is invalid.
+If you got this return code from @code{MHD_websocket_decode} then
+the stream becomes invalid and you must close the websocket
+using @code{MHD_upgrade_action} with @code{MHD_UPGRADE_ACTION_CLOSE}.
+You may send a close frame before closing.
+If you got this from @code{MHD_websocket_encode_text} or
+@code{MHD_websocket_encode_close} then you passed invalid UTF-8 text.
+The stream remains valid then.
+
+@item MHD_WEBSOCKET_STATUS_NO_WEBSOCKET_HANDSHAKE_HEADER
+A check routine for the HTTP headers came to the conclusion that
+the header value isn't valid for a websocket handshake request.
+This value can only be returned from the following functions:
+@code{MHD_websocket_check_http_version},
+@code{MHD_websocket_check_connection_header},
+@code{MHD_websocket_check_upgrade_header},
+@code{MHD_websocket_check_version_header},
+@code{MHD_websocket_create_accept_header}
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_WEBSOCKET_CLOSEREASON
+@cindex websocket
+Enumeration of possible close reasons for websocket close frames.
+
+The possible values are specified in RFC 6455 7.4.1
+These close reasons here are the default set specified by RFC 6455,
+but also other close reasons could be used.
+
+The definition is for short:
+@itemize @bullet
+@item 0-999 are never used (if you pass 0 in
+@code{MHD_websocket_encode_close} then no close reason is used).
+@item 1000-2999 are specified by RFC 6455.
+@item 3000-3999 are specified by libraries, etc. but must be registered by IANA.
+@item 4000-4999 are reserved for private use.
+@end itemize
+
+Note that websocket streams are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@table @code
+@item MHD_WEBSOCKET_CLOSEREASON_NO_REASON
+This value is used as placeholder for @code{MHD_websocket_encode_close}
+to tell that you don't want to specify any reason.
+If you use this value then no reason text may be used.
+This value cannot be a result of decoding, because this value
+is not a valid close reason for the websocket protocol.
+
+@item MHD_WEBSOCKET_CLOSEREASON_REGULAR
+You close the websocket because it fulfilled its purpose and shall
+now be closed in a normal, planned way.
+
+@item MHD_WEBSOCKET_CLOSEREASON_GOING_AWAY
+You close the websocket because you are shutting down the server or
+something similar.
+
+@item MHD_WEBSOCKET_CLOSEREASON_PROTOCOL_ERROR
+You close the websocket because a protocol error occurred
+during decoding (i. e. invalid byte data).
+
+@item MHD_WEBSOCKET_CLOSEREASON_UNSUPPORTED_DATATYPE
+You close the websocket because you received data which you don't accept.
+For example if you received a binary frame,
+but your application only expects text frames.
+
+@item MHD_WEBSOCKET_CLOSEREASON_MALFORMED_UTF8
+You close the websocket because it contains malformed UTF-8.
+The UTF-8 validity is automatically checked by @code{MHD_websocket_decode},
+so you don't need to check it on your own.
+UTF-8 is specified in RFC 3629.
+
+@item MHD_WEBSOCKET_CLOSEREASON_POLICY_VIOLATED
+You close the websocket because you received a frame which is too big
+to process.
+You can specify the maximum allowed payload size during the call of
+@code{MHD_websocket_stream_init} or @code{MHD_websocket_stream_init2}.
+
+@item MHD_WEBSOCKET_CLOSEREASON_MISSING_EXTENSION
+This status code can be sent by the client if it
+expected a specific extension, but this extension hasn't been negotiated.
+
+@item MHD_WEBSOCKET_CLOSEREASON_UNEXPECTED_CONDITION
+The server closes the websocket because it encountered
+an unexpected condition that prevented it from fulfilling the request.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_WEBSOCKET_UTF8STEP
+@cindex websocket
+Enumeration of possible UTF-8 check steps for websocket functions
+
+These values are used during the encoding of fragmented text frames
+or for error analysis while encoding text frames.
+Its values specify the next step of the UTF-8 check.
+UTF-8 sequences consist of one to four bytes.
+This enumeration just says how long the current UTF-8 sequence is
+and what is the next expected byte.
+
+Note that websocket streams are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@table @code
+@item MHD_WEBSOCKET_UTF8STEP_NORMAL
+There is no open UTF-8 sequence.
+The next byte must be 0x00-0x7F or 0xC2-0xF4.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF2TAIL_1OF1
+The second byte of a two byte UTF-8 sequence.
+The first byte was 0xC2-0xDF.
+The next byte must be 0x80-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF3TAIL1_1OF2
+The second byte of a three byte UTF-8 sequence.
+The first byte was 0xE0.
+The next byte must be 0xA0-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF3TAIL2_1OF2
+The second byte of a three byte UTF-8 sequence.
+The first byte was 0xED.
+The next byte must by 0x80-0x9F.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF3TAIL_1OF2
+The second byte of a three byte UTF-8 sequence.
+The first byte was 0xE1-0xEC or 0xEE-0xEF.
+The next byte must be 0x80-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF3TAIL_2OF2
+The third byte of a three byte UTF-8 sequence.
+The next byte must be 0x80-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF4TAIL1_1OF3
+The second byte of a four byte UTF-8 sequence.
+The first byte was 0xF0.
+The next byte must be 0x90-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF4TAIL2_1OF3
+The second byte of a four byte UTF-8 sequence.
+The first byte was 0xF4.
+The next byte must be 0x80-0x8F.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF4TAIL_1OF3
+The second byte of a four byte UTF-8 sequence.
+The first byte was 0xF1-0xF3.
+The next byte must be 0x80-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF4TAIL_2OF3
+The third byte of a four byte UTF-8 sequence.
+The next byte must be 0x80-0xBF.
+
+@item MHD_WEBSOCKET_UTF8STEP_UTF4TAIL_3OF3
+The fourth byte of a four byte UTF-8 sequence.
+The next byte must be 0x80-0xBF.
+
+@end table
+@end deftp
+
+
+@deftp {Enumeration} MHD_WEBSOCKET_VALIDITY
+@cindex websocket
+Enumeration of validity values of a websocket stream
+
+These values are used for @code{MHD_websocket_stream_is_valid}
+and specify the validity status.
+
+Note that websocket streams are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@table @code
+@item MHD_WEBSOCKET_VALIDITY_INVALID
+The stream is invalid.
+It cannot be used for decoding anymore.
+
+@item MHD_WEBSOCKET_VALIDITY_VALID
+The stream is valid.
+Decoding works as expected.
+
+@item MHD_WEBSOCKET_VALIDITY_ONLY_VALID_FOR_CONTROL_FRAMES
+The stream has received a close frame and
+is partly invalid.
+You can still use the stream for decoding,
+but if a data frame is received an error will be reported.
+After a close frame has been sent, no data frames
+may follow from the sender of the close frame.
+
+@end table
+@end deftp
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-struct
+@chapter Structures type definition
+
+
+@deftp {C Struct} MHD_Daemon
+Handle for the daemon (listening on a socket for HTTP traffic).
+@end deftp
+
+
+@deftp {C Struct} MHD_Connection
+Handle for a connection / HTTP request. With HTTP/1.1, multiple
+requests can be run over the same connection. However, MHD will only
+show one request per TCP connection to the client at any given time.
+@end deftp
+
+
+@deftp {C Struct} MHD_Response
+Handle for a response.
+@end deftp
+
+
+@deftp {C Struct} MHD_IoVec
+An element of an array of memory buffers.
+@end deftp
+
+
+@deftp {C Struct} MHD_PostProcessor
+@cindex POST method
+Handle for @code{POST} processing.
+@end deftp
+
+
+@deftp {C Union} MHD_ConnectionInfo
+Information about a connection.
+@end deftp
+
+
+@deftp {C Union} MHD_DaemonInfo
+Information about an MHD daemon.
+@end deftp
+
+
+@deftp {C Struct} MHD_WebSocketStream
+@cindex websocket
+Information about a MHD websocket stream.
+@end deftp
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-cb
+@chapter Callback functions definition
+
+
+@deftypefn {Function Pointer} enum MHD_Result {*MHD_AcceptPolicyCallback} (void *cls, const struct sockaddr * addr, socklen_t addrlen)
+Invoked in the context of a connection to allow or deny a client to
+connect. This callback return @code{MHD_YES} if connection is allowed,
+@code{MHD_NO} if not.
+
+@table @var
+@item cls
+custom value selected at callback registration time;
+@item addr
+address information from the client;
+@item addrlen
+length of the address information.
+@end table
+@end deftypefn
+
+
+@deftypefn {Function Pointer} enum MHD_Result {*MHD_AccessHandlerCallback} (void *cls, struct MHD_Connection * connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **req_cls)
+Invoked in the context of a connection to answer a request from the
+client. This callback must call MHD functions (example: the
+@code{MHD_Response} ones) to provide content to give back to the client
+and return an HTTP status code (i.e. @code{200} for OK, @code{404},
+etc.).
+
+@ref{microhttpd-post}, for details on how to code this callback.
+
+Must return @code{MHD_YES} if the connection was handled successfully,
+@code{MHD_NO} if the socket must be closed due to a serious error while
+handling the request
+
+@table @var
+@item cls
+custom value selected at callback registration time;
+
+@item url
+the URL requested by the client;
+
+@item method
+the HTTP method used by the client (@code{GET}, @code{PUT},
+@code{DELETE}, @code{POST}, etc.);
+
+@item version
+the HTTP version string (i.e. @code{HTTP/1.1});
+
+@item upload_data
+the data being uploaded (excluding headers):
+@cindex POST method
+@cindex PUT method
+
+@code{POST} data @strong{will} be made available
+incrementally in @var{upload_data}; even if @code{POST}
+data is available, the first time the callback is
+invoked there won't be upload data, as this is done
+just after MHD parses the headers. If supported by
+the client and the HTTP version, the application can
+at this point queue an error response to possibly
+avoid the upload entirely. If no response is generated,
+MHD will (if required) automatically send a 100 CONTINUE
+reply to the client.
+
+Afterwards, POST data will be passed to the callback
+to be processed incrementally by the application. The
+application may return @code{MHD_NO} to forcefully
+terminate the TCP connection without generating a
+proper HTTP response. Once all of the upload data has
+been provided to the application, the application
+will be called again with 0 bytes of upload data.
+At this point, a response should be queued to complete
+the handling of the request.
+
+@item upload_data_size
+set initially to the size of the @var{upload_data} provided; this
+callback must update this value to the number of bytes @strong{NOT}
+processed; unless external select is used, the callback maybe
+required to process at least some data. If the callback fails to
+process data in multi-threaded or internal-select mode and if the
+read-buffer is already at the maximum size that MHD is willing to
+use for reading (about half of the maximum amount of memory allowed
+for the connection), then MHD will abort handling the connection
+and return an internal server error to the client. In order to
+avoid this, clients must be able to process upload data incrementally
+and reduce the value of @code{upload_data_size}.
+
+@item req_cls
+reference to a pointer, initially set to @code{NULL}, that this callback can
+set to some address and that will be preserved by MHD for future
+calls for this request;
+
+since the access handler may be called many times (i.e., for a
+@code{PUT}/@code{POST} operation with plenty of upload data) this allows
+the application to easily associate some request-specific state;
+
+if necessary, this state can be cleaned up in the global
+@code{MHD_RequestCompletedCallback} (which can be set with the
+@code{MHD_OPTION_NOTIFY_COMPLETED}).
+@end table
+@end deftypefn
+
+
+@deftypefn {Function Pointer} void {*MHD_RequestCompletedCallback} (void *cls, struct MHD_Connectionconnection, void **req_cls, enum MHD_RequestTerminationCode toe)
+Signature of the callback used by MHD to notify the application about
+completed requests.
+
+@table @var
+@item cls
+custom value selected at callback registration time;
+
+@item connection
+connection handle;
+
+@item req_cls
+value as set by the last call to the
+@code{MHD_AccessHandlerCallback};
+
+@item toe
+reason for request termination see @code{MHD_OPTION_NOTIFY_COMPLETED}.
+@end table
+@end deftypefn
+
+
+@deftypefn {Function Pointer} enum MHD_Result {*MHD_KeyValueIterator} (void *cls, enum MHD_ValueKind kind, const char *key, const char *value, size_t value_size)
+Iterator over key-value pairs. This iterator can be used to iterate
+over all of the cookies, headers, or @code{POST}-data fields of a
+request, and also to iterate over the headers that have been added to a
+response.
+
+@table @var
+@item cls
+custom value specified when iteration was triggered;
+
+@item kind
+kind of the header we are looking at
+
+@item key
+key for the value, can be an empty string
+
+@item value
+value corresponding value, can be NULL
+
+@item value_size
+number of bytes in @code{value}. This argument was introduced in
+@code{MHD_VERSION} 0x00096301 to allow applications to use binary
+zeros in values. Applications using this argument must ensure that
+they are using a sufficiently recent version of MHD, i.e. by testing
+@code{MHD_get_version()} for values above or equal to 0.9.64.
+Applications that do not need zeros in values and that want to compile
+without warnings against newer versions of MHD should not declare this
+argument and cast the function pointer argument to
+@code{MHD_KeyValueIterator}.
+
+@end table
+
+Return @code{MHD_YES} to continue iterating, @code{MHD_NO} to abort the
+iteration.
+@end deftypefn
+
+
+@deftypefn {Function Pointer} ssize_t {*MHD_ContentReaderCallback} (void *cls, uint64_t pos, char *buf, size_t max)
+Callback used by MHD in order to obtain content. The callback has to
+copy at most @var{max} bytes of content into @var{buf}. The total
+number of bytes that has been placed into @var{buf} should be returned.
+
+Note that returning zero will cause MHD to try again.
+Thus, returning zero should only be used in conjunction
+with @code{MHD_suspend_connection()} to avoid busy waiting.
+
+While usually the callback simply returns the number of bytes written
+into @var{buf}, there are two special return value:
+
+@code{MHD_CONTENT_READER_END_OF_STREAM} (-1) should be returned
+for the regular end of transmission (with chunked encoding, MHD will then
+terminate the chunk and send any HTTP footers that might be
+present; without chunked encoding and given an unknown
+response size, MHD will simply close the connection; note
+that while returning @code{MHD_CONTENT_READER_END_OF_STREAM} is not technically
+legal if a response size was specified, MHD accepts this
+and treats it just as @code{MHD_CONTENT_READER_END_WITH_ERROR}.
+
+@code{MHD_CONTENT_READER_END_WITH_ERROR} (-2) is used to indicate a server
+error generating the response; this will cause MHD to simply
+close the connection immediately. If a response size was
+given or if chunked encoding is in use, this will indicate
+an error to the client. Note, however, that if the client
+does not know a response size and chunked encoding is not in
+use, then clients will not be able to tell the difference between
+@code{MHD_CONTENT_READER_END_WITH_ERROR} and
+@code{MHD_CONTENT_READER_END_OF_STREAM}.
+This is not a limitation of MHD but rather of the HTTP protocol.
+
+@table @var
+@item cls
+custom value selected at callback registration time;
+
+@item pos
+position in the datastream to access; note that if an
+@code{MHD_Response} object is re-used, it is possible for the same
+content reader to be queried multiple times for the same data; however,
+if an @code{MHD_Response} is not re-used, MHD guarantees that
+@var{pos} will be the sum of all non-negative return values obtained
+from the content reader so far.
+@end table
+
+Return @code{-1} on error (MHD will no longer try to read content and
+instead close the connection with the client).
+@end deftypefn
+
+
+@deftypefn {Function Pointer} void {*MHD_ContentReaderFreeCallback} (void *cls)
+This method is called by MHD if we are done with a content reader.
+It should be used to free resources associated with the content reader.
+@end deftypefn
+
+
+@deftypefn {Function Pointer} enum MHD_Result {*MHD_PostDataIterator} (void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
+Iterator over key-value pairs where the value maybe made available in
+increments and/or may not be zero-terminated. Used for processing
+@code{POST} data.
+
+@table @var
+@item cls
+custom value selected at callback registration time;
+
+@item kind
+type of the value;
+
+@item key
+zero-terminated key for the value;
+
+@item filename
+name of the uploaded file, @code{NULL} if not known;
+
+@item content_type
+mime-type of the data, @code{NULL} if not known;
+
+@item transfer_encoding
+encoding of the data, @code{NULL} if not known;
+
+@item data
+pointer to size bytes of data at the specified offset;
+
+@item off
+offset of data in the overall value;
+
+@item size
+number of bytes in data available.
+@end table
+
+Return @code{MHD_YES} to continue iterating, @code{MHD_NO} to abort the
+iteration.
+@end deftypefn
+
+
+@deftypefn {Function Pointer} void* {*MHD_WebSocketMallocCallback} (size_t buf_len)
+@cindex websocket
+This callback function is used internally by many websocket functions
+for allocating data.
+By default @code{malloc} is used.
+You can use your own allocation function with @code{MHD_websocket_stream_init2}
+if you wish to.
+This can be useful for operating systems like Windows
+where @code{malloc}, @code{realloc} and @code{free} are compiler-dependent.
+You can call the associated @code{malloc} callback of
+a websocket stream with @code{MHD_websocket_malloc}.
+
+@table @var
+@item buf_len
+size of the buffer to allocate in bytes.
+@end table
+
+Return the pointer of the allocated buffer or @code{NULL} on failure.
+@end deftypefn
+
+
+@deftypefn {Function Pointer} void* {*MHD_WebSocketReallocCallback} (void *buf, size_t new_buf_len)
+@cindex websocket
+This callback function is used internally by many websocket
+functions for reallocating data.
+By default @code{realloc} is used.
+You can use your own reallocation function with
+@code{MHD_websocket_stream_init2} if you wish to.
+This can be useful for operating systems like Windows
+where @code{malloc}, @code{realloc} and @code{free} are compiler-dependent.
+You can call the associated @code{realloc} callback of
+a websocket stream with @code{MHD_websocket_realloc}.
+
+@table @var
+@item buf
+current buffer, may be @code{NULL};
+
+@item new_buf_len
+new size of the buffer in bytes.
+@end table
+
+Return the pointer of the reallocated buffer or @code{NULL} on failure.
+On failure the old pointer must remain valid.
+@end deftypefn
+
+
+@deftypefn {Function Pointer} void {*MHD_WebSocketFreeCallback} (void *buf)
+@cindex websocket
+This callback function is used internally by many websocket
+functions for freeing data.
+By default @code{free} is used.
+You can use your own free function with
+@code{MHD_websocket_stream_init2} if you wish to.
+This can be useful for operating systems like Windows
+where @code{malloc}, @code{realloc} and @code{free} are compiler-dependent.
+You can call the associated @code{free} callback of
+a websocket stream with @code{MHD_websocket_free}.
+
+@table @var
+@item cls
+current buffer to free, this may be @code{NULL} then nothing happens.
+@end table
+@end deftypefn
+
+
+@deftypefn {Function Pointer} size_t {*MHD_WebSocketRandomNumberGenerator} (void *cls, void* buf, size_t buf_len)
+@cindex websocket
+This callback function is used for generating random numbers
+for masking payload data in client mode.
+If you use websockets in server mode with @emph{libmicrohttpd} then
+you don't need a random number generator, because
+the server doesn't mask its outgoing messages.
+However if you wish to use a websocket stream in client mode,
+you must pass this callback function to @code{MHD_websocket_stream_init2}.
+
+@table @var
+@item cls
+closure specified in @code{MHD_websocket_stream_init2};
+@item buf
+buffer to fill with random values;
+@item buf_len
+size of buffer in bytes.
+@end table
+
+Return the number of generated random bytes.
+The return value should usually equal to buf_len.
+@end deftypefn
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-init
+@chapter Starting and stopping the server
+
+@deftypefun {void} MHD_set_panic_func (MHD_PanicCallback cb, void *cls)
+Set a handler for fatal errors.
+
+@table @var
+@item cb
+function to call if MHD encounters a fatal internal error. If no handler was set explicitly, MHD will call @code{abort}.
+
+@item cls
+closure argument for cb; the other arguments are the name of the source file, line number and a string describing the nature of the fatal error (which can be @code{NULL})
+@end table
+@end deftypefun
+
+@deftypefun {struct MHD_Daemon *} MHD_start_daemon (unsigned int flags, unsigned short port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls, ...)
+Start a webserver on the given port.
+
+@table @var
+@item flags
+OR-ed combination of @code{MHD_FLAG} values;
+
+@item port
+port to bind to;
+
+@item apc
+callback to call to check which clients will be allowed to connect; you
+can pass @code{NULL} in which case connections from any @acronym{IP} will be
+accepted;
+
+@item apc_cls
+extra argument to @var{apc};
+
+@item dh
+default handler for all URIs;
+
+@item dh_cls
+extra argument to @var{dh}.
+@end table
+
+Additional arguments are a list of options (type-value pairs,
+terminated with @code{MHD_OPTION_END}). It is mandatory to use
+@code{MHD_OPTION_END} as last argument, even when there are no
+additional arguments.
+
+Return @code{NULL} on error, handle to daemon on success.
+@end deftypefun
+
+
+@deftypefun MHD_socket MHD_quiesce_daemon (struct MHD_Daemon *daemon)
+@cindex quiesce
+Stop accepting connections from the listening socket. Allows clients
+to continue processing, but stops accepting new connections. Note
+that the caller is responsible for closing the returned socket;
+however, if MHD is run using threads (anything but external select
+mode), it must not be closed until AFTER @code{MHD_stop_daemon} has
+been called (as it is theoretically possible that an existing thread
+is still using it).
+
+This function is useful in the special case that a listen socket
+is to be migrated to another process (i.e. a newer version of the
+HTTP server) while existing connections should continue to be
+processed until they are finished.
+
+Return @code{-1} on error (daemon not listening), the handle to the
+listen socket otherwise.
+
+@end deftypefun
+
+
+@deftypefun void MHD_stop_daemon (struct MHD_Daemon *daemon)
+Shutdown an HTTP daemon.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_run (struct MHD_Daemon *daemon)
+Run webserver operations (without blocking unless in client callbacks).
+This method should be called by clients in combination with
+@code{MHD_get_fdset()} if the client-controlled @code{select}-method is used.
+@cindex select
+@cindex poll
+
+This function will work for external @code{poll} and @code{select} mode.
+However, if using external @code{select} mode, you may want to
+instead use @code{MHD_run_from_select}, as it is more efficient.
+
+@table @var
+@item daemon
+daemon to process connections of
+@end table
+
+Return @code{MHD_YES} on success, @code{MHD_NO} if this daemon was not
+started with the right options for this call.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_run_from_select (struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set)
+Run webserver operations given sets of ready socket handles.
+@cindex select
+
+This method should be called by clients in combination with
+@code{MHD_get_fdset} if the client-controlled (external)
+select method is used.
+
+You can use this function instead of @code{MHD_run} if you called
+@code{select} on the result from @code{MHD_get_fdset}. File descriptors in
+the sets that are not controlled by MHD will be ignored. Calling
+this function instead of @code{MHD_run} is more efficient as MHD will
+not have to call @code{select} again to determine which operations are
+ready.
+
+@table @var
+@item daemon
+daemon to process connections of
+@item read_fd_set
+set of descriptors that must be ready for reading without blocking
+@item write_fd_set
+set of descriptors that must be ready for writing without blocking
+@item except_fd_set
+ignored, can be NULL
+@end table
+
+Return @code{MHD_YES} on success, @code{MHD_NO} on serious internal
+errors.
+
+@end deftypefun
+
+
+
+@deftypefun void MHD_add_connection (struct MHD_Daemon *daemon, int client_socket, const struct sockaddr *addr, socklen_t addrlen)
+Add another client connection to the set of connections
+managed by MHD. This API is usually not needed (since
+MHD will accept inbound connections on the server socket).
+Use this API in special cases, for example if your HTTP
+server is behind NAT and needs to connect out to the
+HTTP client, or if you are building a proxy.
+
+If you use this API in conjunction with a internal select or a thread
+pool, you must set the option @code{MHD_USE_ITC} to
+ensure that the freshly added connection is immediately processed by
+MHD.
+
+The given client socket will be managed (and closed!) by MHD after
+this call and must no longer be used directly by the application
+afterwards.
+
+@table @var
+@item daemon
+daemon that manages the connection
+@item client_socket
+socket to manage (MHD will expect to receive an HTTP request from this socket next).
+@item addr
+IP address of the client
+@item addrlen
+number of bytes in addr
+@end table
+
+This function will return @code{MHD_YES} on success,
+@code{MHD_NO} if this daemon could
+not handle the connection (i.e. malloc failed, etc).
+The socket will be closed in any case; 'errno' is set
+to indicate further details about the error.
+@end deftypefun
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c -----------------------------------------------------------
+@node microhttpd-inspect
+@chapter Implementing external @code{select}
+
+
+@deftypefun enum MHD_Result MHD_get_fdset (struct MHD_Daemon *daemon, fd_set * read_fd_set, fd_set * write_fd_set, fd_set * except_fd_set, int *max_fd)
+Obtain the @code{select()} sets for this daemon. The daemon's socket
+is added to @var{read_fd_set}. The list of currently existent
+connections is scanned and their file descriptors added to the correct
+set.
+
+When calling this function, FD_SETSIZE is assumed to be platform's
+default. If you changed FD_SETSIZE for your application,
+you should use @code{MHD_get_fdset2()} instead.
+
+This function should only be called in when MHD is configured to use
+external select with @code{select()} or with @code{epoll()}. In
+the latter case, it will only add the single @code{epoll()} file
+descriptor used by MHD to the sets.
+
+After the call completed successfully: the variable referenced by
+@var{max_fd} references the file descriptor with highest integer
+identifier. The variable must be set to zero before invoking this
+function.
+
+Return @code{MHD_YES} on success, @code{MHD_NO} if: the arguments are
+invalid (example: @code{NULL} pointers); this daemon was not started with
+the right options for this call.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_get_fdset2 (struct MHD_Daemon *daemon, fd_set * read_fd_set, fd_set * write_fd_set, fd_set * except_fd_set, int *max_fd, unsigned int fd_setsize)
+Like @code{MHD_get_fdset()}, except that you can manually specify the value of FD_SETSIZE used by your application.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_get_timeout (struct MHD_Daemon *daemon, unsigned long long *timeout)
+@cindex timeout
+Obtain timeout value for select for this daemon (only needed if
+connection timeout is used). The returned value is how many
+milliseconds @code{select} should at most block, not the timeout value
+set for connections. This function must not be called if the
+@code{MHD_USE_THREAD_PER_CONNECTION} mode is in use (since then it is
+not meaningful to ask for a timeout, after all, there is concurrenct
+activity). The function must also not be called by user-code if
+@code{MHD_USE_INTERNAL_POLLING_THREAD} is in use. In the latter case, the
+behavior is undefined.
+
+@table @var
+@item daemon
+which daemon to obtain the timeout from.
+@item timeout
+will be set to the timeout (in milliseconds).
+@end table
+
+Return @code{MHD_YES} on success, @code{MHD_NO} if timeouts are not used
+(or no connections exist that would necessitate the use of a timeout
+right now).
+@end deftypefun
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c -----------------------------------------------------------
+@node microhttpd-requests
+@chapter Handling requests
+
+
+@deftypefun int MHD_get_connection_values (struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
+Get all the headers matching @var{kind} from the request. The @var{kind}
+argument can be a bitmask, ORing the various header kinds that are
+requested.
+
+The @var{iterator} callback is invoked once for each header, with
+@var{iterator_cls} as first argument. After version 0.9.19, the
+headers are iterated in the same order as they were received from
+the network; previous versions iterated over the headers in reverse
+order.
+
+@code{MHD_get_connection_values} returns the number of entries
+iterated over; this can be less than the number of headers if, while
+iterating, @var{iterator} returns @code{MHD_NO}.
+
+@var{iterator} can be @code{NULL}: in this case this function just counts
+and returns the number of headers.
+
+In the case of @code{MHD_GET_ARGUMENT_KIND}, the @var{value} argument
+will be @code{NULL} if the URL contained a key without an equals operator.
+For example, for a HTTP request to the URL ``http://foo/bar?key'', the
+@var{value} argument is @code{NULL}; in contrast, a HTTP request to the URL
+``http://foo/bar?key='', the @var{value} argument is the empty string.
+The normal case is that the URL contains ``http://foo/bar?key=value''
+in which case @var{value} would be the string ``value'' and @var{key}
+would contain the string ``key''.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_set_connection_value (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
+This function can be used to append an entry to
+the list of HTTP headers of a connection (so that the
+@code{MHD_get_connection_values function} will return
+them -- and the MHD PostProcessor will also
+see them). This maybe required in certain
+situations (see Mantis #1399) where (broken)
+HTTP implementations fail to supply values needed
+by the post processor (or other parts of the
+application).
+
+This function MUST only be called from within
+the MHD_AccessHandlerCallback (otherwise, access
+maybe improperly synchronized). Furthermore,
+the client must guarantee that the key and
+value arguments are 0-terminated strings that
+are NOT freed until the connection is closed.
+(The easiest way to do this is by passing only
+arguments to permanently allocated strings.).
+
+@var{connection} is the connection for which
+the entry for @var{key} of the given @var{kind}
+should be set to the given @var{value}.
+
+The function returns @code{MHD_NO} if the operation
+could not be performed due to insufficient memory
+and @code{MHD_YES} on success.
+@end deftypefun
+
+
+@deftypefun {const char *} MHD_lookup_connection_value (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
+Get a particular header value. If multiple values match the
+@var{kind}, return one of them (the ``first'', whatever that means).
+@var{key} must reference a zero-terminated ASCII-coded string
+representing the header to look for: it is compared against the
+headers using (basically) @code{strcasecmp()}, so case is ignored.
+@end deftypefun
+
+@deftypefun {const char *} MHD_lookup_connection_value_n (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, size_t key_size, const char **value_ptr, size_t *value_size_ptr)
+Get a particular header value. If multiple values match the
+@var{kind}, return one of them (the ``first'', whatever that means).
+@var{key} must reference an ASCII-coded string
+representing the header to look for: it is compared against the
+headers using (basically) @code{strncasecmp()}, so case is ignored.
+The @var{value_ptr} is set to the address of the value found,
+and @var{value_size_ptr} is set to the number of bytes in the
+value.
+@end deftypefun
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-responses
+@chapter Building responses to requests
+
+
+@noindent
+Response objects handling by MHD is asynchronous with respect to the
+application execution flow. Instances of the @code{MHD_Response}
+structure are not associated to a daemon and neither to a client
+connection: they are managed with reference counting.
+
+In the simplest case: we allocate a new @code{MHD_Response} structure
+for each response, we use it once and finally we destroy it.
+
+MHD allows more efficient resources usages.
+
+Example: we allocate a new @code{MHD_Response} structure for each
+response @strong{kind}, we use it every time we have to give that
+response and we finally destroy it only when the daemon shuts down.
+
+@menu
+* microhttpd-response enqueue:: Enqueuing a response.
+* microhttpd-response create:: Creating a response object.
+* microhttpd-response headers:: Adding headers to a response.
+* microhttpd-response options:: Setting response options.
+* microhttpd-response inspect:: Inspecting a response object.
+* microhttpd-response upgrade:: Creating a response for protocol upgrades.
+@end menu
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-response enqueue
+@section Enqueuing a response
+
+
+@deftypefun enum MHD_Result MHD_queue_response (struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
+Queue a response to be transmitted to the client as soon as possible
+but only after MHD_AccessHandlerCallback returns. This function
+checks that it is legal to queue a response at this time for the
+given connection. It also increments the internal reference
+counter for the response object (the counter will be decremented
+automatically once the response has been transmitted).
+
+@table @var
+@item connection
+the connection identifying the client;
+
+@item status_code
+HTTP status code (i.e. @code{200} for OK);
+
+@item response
+response to transmit.
+@end table
+
+Return @code{MHD_YES} on success or if message has been queued. Return
+@code{MHD_NO}: if arguments are invalid (example: @code{NULL} pointer); on
+error (i.e. reply already sent).
+@end deftypefun
+
+
+@deftypefun void MHD_destroy_response (struct MHD_Response *response)
+Destroy a response object and associated resources (decrement the
+reference counter). Note that MHD may keep some of the resources
+around if the response is still in the queue for some clients, so the
+memory may not necessarily be freed immediately.
+@end deftypefun
+
+
+An explanation of reference counting@footnote{Note to readers acquainted
+to the Tcl API: reference counting on @code{MHD_Connection}
+structures is handled in the same way as Tcl handles @code{Tcl_Obj}
+structures through @code{Tcl_IncrRefCount()} and
+@code{Tcl_DecrRefCount()}.}:
+
+@enumerate
+@item
+a @code{MHD_Response} object is allocated:
+
+@example
+struct MHD_Response * response = MHD_create_response_from_buffer(...);
+/* here: reference counter = 1 */
+@end example
+
+@item
+the @code{MHD_Response} object is enqueued in a @code{MHD_Connection}:
+
+@example
+MHD_queue_response(connection, , response);
+/* here: reference counter = 2 */
+@end example
+
+@item
+the creator of the response object discharges responsibility for it:
+
+@example
+MHD_destroy_response(response);
+/* here: reference counter = 1 */
+@end example
+
+@item
+the daemon handles the connection sending the response's data to the
+client then decrements the reference counter by calling
+@code{MHD_destroy_response()}: the counter's value drops to zero and
+the @code{MHD_Response} object is released.
+@end enumerate
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-response create
+@section Creating a response object
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_callback (uint64_t size, size_t block_size, MHD_ContentReaderCallback crc, void *crc_cls, MHD_ContentReaderFreeCallback crfc)
+Create a response object. The response object can be extended with
+header information and then it can be used any number of times.
+
+@table @var
+@item size
+size of the data portion of the response, @code{-1} for unknown;
+
+@item block_size
+preferred block size for querying @var{crc} (advisory only, MHD may
+still call @var{crc} using smaller chunks); this is essentially the
+buffer size used for @acronym{IO}, clients should pick a value that is
+appropriate for @acronym{IO} and memory performance requirements;
+
+@item crc
+callback to use to obtain response data;
+
+@item crc_cls
+extra argument to @var{crc};
+
+@item crfc
+callback to call to free @var{crc_cls} resources.
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_fd (uint64_t size, int fd)
+Create a response object. The response object can be extended with
+header information and then it can be used any number of times.
+
+@table @var
+@item size
+size of the data portion of the response (should be smaller or equal to the
+size of the file)
+
+@item fd
+file descriptor referring to a file on disk with the data; will be
+closed when response is destroyed; note that 'fd' must be an actual
+file descriptor (not a pipe or socket) since MHD might use 'sendfile'
+or 'seek' on it. The descriptor should be in blocking-IO mode.
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_pipe (int fd)
+Create a response object. The response object can be extended with
+header information and then it can be used ONLY ONCE.
+
+@table @var
+@item fd
+file descriptor of the read-end of the pipe; will be
+closed when response is destroyed.
+The descriptor should be in blocking-IO mode.
+@end table
+
+Return @code{NULL} on error (i.e. out of memory).
+@end deftypefun
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_fd_at_offset (size_t size, int fd, off_t offset)
+Create a response object. The response object can be extended with
+header information and then it can be used any number of times.
+Note that you need to be a bit careful about @code{off_t} when
+writing this code. Depending on your platform, MHD is likely
+to have been compiled with support for 64-bit files. When you
+compile your own application, you must make sure that @code{off_t}
+is also a 64-bit value. If not, your compiler may pass a 32-bit
+value as @code{off_t}, which will result in 32-bits of garbage.
+
+If you use the autotools, use the @code{AC_SYS_LARGEFILE} autoconf
+macro and make sure to include the generated @file{config.h} file
+before @file{microhttpd.h} to avoid problems. If you do not have a
+build system and only want to run on a GNU/Linux system, you could
+also use
+@verbatim
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <microhttpd.h>
+@end verbatim
+to ensure 64-bit @code{off_t}. Note that if your operating system
+does not support 64-bit files, MHD will be compiled with a 32-bit
+@code{off_t} (in which case the above would be wrong).
+
+@table @var
+@item size
+size of the data portion of the response (number of bytes to transmit from the
+file starting at offset).
+
+@item fd
+file descriptor referring to a file on disk with the data; will be
+closed when response is destroyed; note that 'fd' must be an actual
+file descriptor (not a pipe or socket) since MHD might use 'sendfile'
+or 'seek' on it. The descriptor should be in blocking-IO mode.
+
+@item offset
+offset to start reading from in the file
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_buffer (size_t size, void *data, enum MHD_ResponseMemoryMode mode)
+Create a response object. The response object can be extended with
+header information and then it can be used any number of times.
+
+@table @var
+@item size
+size of the data portion of the response;
+
+@item buffer
+the data itself;
+
+@item mode
+memory management options for buffer; use
+MHD_RESPMEM_PERSISTENT if the buffer is static/global memory,
+use MHD_RESPMEM_MUST_FREE if the buffer is heap-allocated and
+should be freed by MHD and MHD_RESPMEM_MUST_COPY if the
+buffer is in transient memory (i.e. on the stack) and must
+be copied by MHD;
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_buffer_with_free_callback (size_t size, void *data, MHD_ContentReaderFreeCallback crfc)
+Create a response object. The buffer at the end must be free'd
+by calling the @var{crfc} function.
+
+@table @var
+@item size
+size of the data portion of the response;
+
+@item buffer
+the data itself;
+
+@item crfc
+function to call at the end to free memory allocated at @var{buffer}.
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_data (size_t size, void *data, int must_free, int must_copy)
+Create a response object. The response object can be extended with
+header information and then it can be used any number of times.
+This function is deprecated, use @code{MHD_create_response_from_buffer} instead.
+
+@table @var
+@item size
+size of the data portion of the response;
+
+@item data
+the data itself;
+
+@item must_free
+if true: MHD should free data when done;
+
+@item must_copy
+if true: MHD allocates a block of memory and use it to make a copy of
+@var{data} embedded in the returned @code{MHD_Response} structure;
+handling of the embedded memory is responsibility of MHD; @var{data}
+can be released anytime after this call returns.
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+
+Example: create a response from a statically allocated string:
+
+@example
+const char * data = "<html><body><p>Error!</p></body></html>";
+
+struct MHD_Connection * connection = ...;
+struct MHD_Response * response;
+
+response = MHD_create_response_from_buffer (strlen(data), data,
+ MHD_RESPMEM_PERSISTENT);
+MHD_queue_response(connection, 404, response);
+MHD_destroy_response(response);
+@end example
+
+
+@deftypefun {struct MHD_Response *} MHD_create_response_from_iovec (const struct MHD_IoVec *iov, int iovcnt, MHD_ContentReaderFreeCallback crfc, void *cls)
+Create a response object from an array of memory buffers.
+The response object can be extended with header information and then be used
+any number of times.
+@table @var
+@item iov
+the array for response data buffers, an internal copy of this will be made; however, note that the data pointed to by the @var{iov} is not copied and must be preserved unchanged at the given locations until the response is no longer in use and the @var{crfc} is called;
+
+@item iovcnt
+the number of elements in @var{iov};
+
+@item crfc
+the callback to call to free resources associated with @var{iov};
+
+@item cls
+the argument to @var{crfc};
+@end table
+
+Return @code{NULL} on error (i.e. invalid arguments, out of memory).
+@end deftypefun
+
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-response headers
+@section Adding headers to a response
+
+
+@deftypefun enum MHD_Result MHD_add_response_header (struct MHD_Response *response, const char *header, const char *content)
+Add a header line to the response. The strings referenced by
+@var{header} and @var{content} must be zero-terminated and they are
+duplicated into memory blocks embedded in @var{response}.
+
+Notice that the strings must not hold newlines, carriage returns or tab
+chars.
+
+MHD_add_response_header() prevents applications from setting a
+``Transfer-Encoding'' header to values other than ``identity'' or
+``chunked'' as other transfer encodings are not supported by MHD. Note
+that usually MHD will pick the transfer encoding correctly
+automatically, but applications can use the header to force a
+particular behavior.
+
+MHD_add_response_header() also prevents applications from setting a
+``Content-Length'' header. MHD will automatically set a correct
+``Content-Length'' header if it is possible and allowed.
+
+Return @code{MHD_NO} on error (i.e. invalid header or content format or
+memory allocation error).
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_add_response_footer (struct MHD_Response *response, const char *footer, const char *content)
+Add a footer line to the response. The strings referenced by
+@var{footer} and @var{content} must be zero-terminated and they are
+duplicated into memory blocks embedded in @var{response}.
+
+Notice that the strings must not hold newlines, carriage returns or tab
+chars. You can add response footers at any time before signalling the
+end of the response to MHD (not just before calling 'MHD_queue_response').
+Footers are useful for adding cryptographic checksums to the reply or to
+signal errors encountered during data generation. This call was introduced
+in MHD 0.9.3.
+
+Return @code{MHD_NO} on error (i.e. invalid header or content format or
+memory allocation error).
+@end deftypefun
+
+
+
+@deftypefun enum MHD_Result MHD_del_response_header (struct MHD_Response *response, const char *header, const char *content)
+Delete a header (or footer) line from the response. Return @code{MHD_NO} on error
+(arguments are invalid or no such header known).
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-response options
+@section Setting response options
+
+
+@deftypefun enum MHD_Result MHD_set_response_options (struct MHD_Response *response, enum MHD_ResponseFlags flags, ...)
+Set special flags and options for a response.
+
+Calling this functions sets the given flags and options for the response.
+
+@table @var
+@item response
+which response should be modified;
+
+@item flags
+flags to set for the response;
+
+@end table
+
+Additional arguments are a list of options (type-value pairs,
+terminated with @code{MHD_RO_END}). It is mandatory to use
+@code{MHD_RO_END} as last argument, even when there are no
+additional arguments.
+
+Return @code{MHD_NO} on error, @code{MHD_YES} on success.
+@end deftypefun
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-response inspect
+@section Inspecting a response object
+
+
+@deftypefun int MHD_get_response_headers (struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
+Get all of the headers added to a response.
+
+Invoke the @var{iterator} callback for each header in the response,
+using @var{iterator_cls} as first argument. Return number of entries
+iterated over. @var{iterator} can be @code{NULL}: in this case the function
+just counts headers.
+
+@var{iterator} should not modify the its key and value arguments, unless
+we know what we are doing.
+@end deftypefun
+
+
+@deftypefun {const char *} MHD_get_response_header (struct MHD_Response *response, const char *key)
+Find and return a pointer to the value of a particular header from the
+response. @var{key} must reference a zero-terminated string
+representing the header to look for. The search is case sensitive.
+Return @code{NULL} if header does not exist or @var{key} is @code{NULL}.
+
+We should not modify the value, unless we know what we are doing.
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-response upgrade
+@section Creating a response for protocol upgrades
+@cindex WebSockets
+@cindex Upgrade
+@cindex HTTP2
+@cindex RFC2817
+
+With RFC 2817 a mechanism to switch protocols within HTTP was
+introduced. Here, a client sends a request with a ``Connection:
+Upgrade'' header. The server responds with a ``101 Switching
+Protocols'' response header, after which the two parties begin to
+speak a different (non-HTTP) protocol over the TCP connection.
+
+This mechanism is used for upgrading HTTP 1.1 connections to HTTP2 or
+HTTPS, as well as for implementing WebSockets. Which protocol
+upgrade is performed is negotiated between server and client in
+additional headers, in particular the ``Upgrade'' header.
+
+MHD supports switching protocols using this mechanism only if the
+@code{MHD_ALLOW_SUSPEND_RESUME} flag has been set when starting
+the daemon. If this flag has been set, applications can upgrade
+a connection by queueing a response (using the
+@code{MHD_HTTP_SWITCHING_PROTOCOLS} status code) which must
+have been created with the following function:
+
+
+@deftypefun enum MHD_Result MHD_create_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, void *upgrade_handler_cls)
+Create a response suitable for switching protocols. Returns @code{MHD_YES} on success. @code{upgrade_handler} must not be @code{NULL}.
+
+When creating this type of response, the ``Connection: Upgrade''
+header will be set automatically for you. MHD requires that you
+additionally set an ``Upgrade:'' header. The ``Upgrade'' header
+must simply exist, the specific value is completely up to the
+application.
+
+@end deftypefun
+
+The @code{upgrade_handler} argument to the above has the following type:
+
+
+@deftypefn {Function Pointer} void {*MHD_UpgradeHandler} (void *cls, struct MHD_Connection *connection, const char *extra_in, size_t extra_in_size, MHD_socket sock, struct MHD_UpgradeResponseHandle *urh)
+This function will be called once MHD has transmitted the header of the response to the connection that is being upgraded. At this point, the application is expected to take over the socket @code{sock} and speak the non-HTTP protocol to which the connection was upgraded. MHD will no longer use the socket; this includes handling timeouts. The application must call @code{MHD_upgrade_action} with an upgrade action of @code{MHD_UPGRADE_ACTION_CLOSE} when it is done processing the connection to close the socket. The application must not call @code{MHD_stop_daemon} on the respective daemon as long as it is still handling the connection. The arguments given to the @code{upgrade_handler} have the following meaning:
+
+@table @var
+@item cls
+matches the @code{upgrade_handler_cls} that was given to @code{MHD_create_response_for_upgrade}
+@item connection
+identifies the connection that is being upgraded;
+
+@item req_cls
+last value left in `*req_cls` in the `MHD_AccessHandlerCallback`
+
+@item extra_in
+buffer of bytes MHD read ``by accident'' from the socket already. This can happen if the client eagerly transmits more than just the HTTP request. The application should treat these as if it had read them from the socket.
+
+@item extra_in_size
+number of bytes in @code{extra_in}
+
+@item sock
+the socket which the application can now use directly for some bi-directional communication with the client. The application can henceforth use @code{recv()} and @code{send()} or @code{read()} and @code{write()} system calls on the socket. However, @code{ioctl()} and @code{setsockopt()} functions will not work as expected when using HTTPS. Such operations may be supported in the future via @code{MHD_upgrade_action}. Most importantly, the application must never call @code{close()} on this socket. Closing the socket must be done using @code{MHD_upgrade_action}. However, while close is forbidden, the application may call @code{shutdown()} on the socket.
+
+@item urh
+argument for calls to @code{MHD_upgrade_action}. Applications must eventually use this function to perform the @code{close()} action on the socket.
+@end table
+
+@end deftypefn
+
+@deftypefun enum MHD_Result MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh, enum MHD_UpgradeAction action, ...)
+Perform special operations related to upgraded connections.
+
+@table @var
+@item urh
+identifies the upgraded connection to perform an action on
+
+@item action
+specifies the action to perform; further arguments to the function depend on the specifics of the action.
+@end table
+
+@end deftypefun
+
+
+@deftp {Enumeration} MHD_UpgradeAction
+Set of actions to be performed on upgraded connections. Passed as an argument to
+@code{MHD_upgrade_action()}.
+
+@table @code
+@item MHD_UPGRADE_ACTION_CLOSE
+Closes the connection. Must be called once the application is done with the client. Takes no additional arguments.
+@item MHD_UPGRADE_ACTION_CORK_ON
+Enable corking on the underlying socket.
+@item MHD_UPGRADE_ACTION_CORK_OFF
+Disable corking on the underlying socket.
+
+@end table
+@end deftp
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-flow
+@chapter Flow control.
+
+@noindent
+Sometimes it may be possible that clients upload data faster
+than an application can process it, or that an application
+needs an extended period of time to generate a response.
+If @code{MHD_USE_THREAD_PER_CONNECTION} is used, applications
+can simply deal with this by performing their logic within the
+thread and thus effectively blocking connection processing
+by MHD. In all other modes, blocking logic must not be
+placed within the callbacks invoked by MHD as this would also
+block processing of other requests, as a single thread may be
+responsible for tens of thousands of connections.
+
+Instead, applications using thread modes other than
+@code{MHD_USE_THREAD_PER_CONNECTION} should use the
+following functions to perform flow control.
+
+@deftypefun enum MHD_Result MHD_suspend_connection (struct MHD_Connection *connection)
+Suspend handling of network data for a given connection. This can
+be used to dequeue a connection from MHD's event loop (external
+select, internal select or thread pool; not applicable to
+thread-per-connection!) for a while.
+
+If you use this API in conjunction with a internal select or a
+thread pool, you must set the option @code{MHD_ALLOW_SUSPEND_RESUME} to
+ensure that a resumed connection is immediately processed by MHD.
+
+Suspended connections continue to count against the total number of
+connections allowed (per daemon, as well as per IP, if such limits
+are set). Suspended connections will NOT time out; timeouts will
+restart when the connection handling is resumed. While a
+connection is suspended, MHD will not detect disconnects by the
+client.
+
+The only safe time to suspend a connection is from the
+@code{MHD_AccessHandlerCallback} or from the respective
+@code{MHD_ContentReaderCallback} (but in this case the
+response object must not be shared among multiple
+connections).
+
+When suspending from the @code{MHD_AccessHandlerCallback}
+you MUST afterwards return @code{MHD_YES} from the access handler
+callback (as MHD_NO would imply to both close and suspend
+the connection, which is not allowed).
+
+Finally, it is an API violation to call @code{MHD_stop_daemon} while
+having suspended connections (this will at least create memory and
+socket leaks or lead to undefined behavior). You must explicitly
+resume all connections before stopping the daemon.
+
+@table @var
+@item connection
+the connection to suspend
+@end table
+@end deftypefun
+
+@deftypefun enum MHD_Result MHD_resume_connection (struct MHD_Connection *connection)
+Resume handling of network data for suspended connection. It is safe
+to resume a suspended connection at any time. Calling this function
+on a connection that was not previously suspended will result in
+undefined behavior.
+
+If you are using this function in ``external'' select mode, you must
+make sure to run @code{MHD_run} afterwards (before again calling
+@code{MHD_get_fdset}), as otherwise the change may not be reflected in
+the set returned by @code{MHD_get_fdset} and you may end up with a
+connection that is stuck until the next network activity.
+
+You can check whether a connection is currently suspended using
+@code{MHD_get_connection_info} by querying for
+@code{MHD_CONNECTION_INFO_CONNECTION_SUSPENDED}.
+
+@table @var
+@item connection
+the connection to resume
+@end table
+@end deftypefun
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-dauth
+@chapter Utilizing Authentication
+
+@noindent
+MHD support three types of client authentication.
+
+Basic authentication uses a simple authentication method based
+on BASE64 algorithm. Username and password are exchanged in clear
+between the client and the server, so this method must only be used
+for non-sensitive content or when the session is protected with https.
+When using basic authentication MHD will have access to the clear
+password, possibly allowing to create a chained authentication
+toward an external authentication server.
+
+Digest authentication uses a one-way authentication method based
+on MD5 hash algorithm. Only the hash will transit over the network,
+hence protecting the user password. The nonce will prevent replay
+attacks. This method is appropriate for general use, especially
+when https is not used to encrypt the session.
+
+Client certificate authentication uses a X.509 certificate from
+the client. This is the strongest authentication mechanism but it
+requires the use of HTTPS. Client certificate authentication can
+be used simultaneously with Basic or Digest Authentication in order
+to provide a two levels authentication (like for instance separate
+machine and user authentication). A code example for using
+client certificates is presented in the MHD tutorial.
+
+@menu
+* microhttpd-dauth basic:: Using Basic Authentication.
+* microhttpd-dauth digest:: Using Digest Authentication.
+@end menu
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-dauth basic
+@section Using Basic Authentication
+
+@deftypefun {void} MHD_free (void *ptr)
+Free the memory given at @code{ptr}. Used to free data structures allocated by MHD. Calls @code{free(ptr)}.
+@end deftypefun
+
+@deftypefun {char *} MHD_basic_auth_get_username_password3 (struct MHD_Connection *connection)
+Get the username and password from the basic authorization header sent by the client.
+Return @code{NULL} if no Basic Authorization header set by the client or if Base64
+encoding is invalid; a pointer to the structure with username and password
+if found values set by the client.
+If returned value is not @code{NULL}, the value must be @code{MHD_free()}'ed.
+@end deftypefun
+
+@deftypefun {enum MHD_Result} MHD_queue_basic_auth_fail_response3 (struct MHD_Connection *connection, const char *realm, int prefer_utf8, struct MHD_Response *response)
+Queues a response to request basic authentication from the client.
+Return @code{MHD_YES} if successful, otherwise @code{MHD_NO}.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{prefer_utf8} if set to @code{MHD_YES} then parameter @code{charset} with value
+@code{UTF-8} will be added to the response authentication header which indicates
+that UTF-8 encoding is preferred for username and password.
+
+@var{response} a response structure to specify what shall be presented to the
+client with a 401 HTTP status.
+@end deftypefun
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-dauth digest
+@section Using Digest Authentication
+
+MHD supports MD5 (deprecated by IETF) and SHA-256 hash algorithms
+for digest authentication. The @code{MHD_DigestAuthAlgorithm} enumeration
+is used to specify which algorithm should be used.
+
+@deftp {Enumeration} MHD_DigestAuthAlgorithm
+Which digest algorithm should be used. Must be used consistently.
+
+@table @code
+@item MHD_DIGEST_ALG_AUTO
+Have MHD pick an algorithm currently considered secure. For now defaults to SHA-256.
+
+@item MHD_DIGEST_ALG_MD5
+Force use of (deprecated, ancient, insecure) MD5.
+
+@item MHD_DIGEST_ALG_SHA256
+Force use of SHA-256.
+
+@end table
+@end deftp
+
+@deftp {Enumeration} MHD_DigestAuthResult
+The result of digest authentication of the client.
+
+@table @code
+@item MHD_DAUTH_OK
+Authentication OK.
+
+@item MHD_DAUTH_ERROR
+General error, like ``out of memory''.
+
+@item MHD_DAUTH_WRONG_HEADER
+No ``Authorization'' header or wrong format of the header.
+
+@item MHD_DAUTH_WRONG_USERNAME
+Wrong ``username''.
+
+@item MHD_DAUTH_WRONG_REALM
+Wrong ``realm''.
+
+@item MHD_DAUTH_WRONG_URI
+Wrong ``URI'' (or URI parameters).
+
+@item MHD_DAUTH_NONCE_STALE
+The ``nonce'' is too old. Suggest the client to retry with the same username and
+password to get the fresh ``nonce''.
+The validity of the ``nonce'' may not be checked.
+
+@item MHD_DAUTH_NONCE_WRONG
+The ``nonce'' is wrong. May indicate an attack attempt.
+
+@item MHD_DAUTH_RESPONSE_WRONG
+The ``response'' is wrong. May indicate an attack attempt.
+
+@end table
+@end deftp
+
+
+@deftypefun {char *} MHD_digest_auth_get_username (struct MHD_Connection *connection)
+Find and return a pointer to the username value from the request header.
+Return @code{NULL} if the value is not found or header does not exist.
+If returned value is not @code{NULL}, the value must be @code{MHD_free()}'ed.
+@end deftypefun
+
+@deftypefun enum MHD_DigestAuthResult MHD_digest_auth_check3 (struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout, enum MHD_DigestAuthAlgorithm algo)
+Checks if the provided values in the WWW-Authenticate header are valid
+and sound according to RFC7616. If valid return @code{MHD_DAUTH_OK}, otherwise return the error code.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{username} must reference to a zero-terminated string representing the username,
+it is usually the returned value from MHD_digest_auth_get_username.
+
+@var{password} must reference to a zero-terminated string representing the password,
+most probably it will be the result of a lookup of the username against a local database.
+
+@var{nonce_timeout} the nonce validity duration in seconds.
+Most of the time it is sound to specify 300 seconds as its values.
+
+@var{algo} which digest algorithm should we use.
+@end deftypefun
+
+@deftypefun int MHD_digest_auth_check2 (struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout, enum MHD_DigestAuthAlgorithm algo)
+Checks if the provided values in the WWW-Authenticate header are valid
+and sound according to RFC2716. If valid return @code{MHD_YES}, otherwise return @code{MHD_NO}.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{username} must reference to a zero-terminated string representing the username,
+it is usually the returned value from MHD_digest_auth_get_username.
+
+@var{password} must reference to a zero-terminated string representing the password,
+most probably it will be the result of a lookup of the username against a local database.
+
+@var{nonce_timeout} is the amount of time in seconds for a nonce to be invalid.
+Most of the time it is sound to specify 300 seconds as its values.
+
+@var{algo} which digest algorithm should we use.
+@end deftypefun
+
+
+@deftypefun int MHD_digest_auth_check (struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout)
+Checks if the provided values in the WWW-Authenticate header are valid
+and sound according to RFC2716. If valid return @code{MHD_YES}, otherwise return @code{MHD_NO}.
+Deprecated, use @code{MHD_digest_auth_check2} instead.
+
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{username} must reference to a zero-terminated string representing the username,
+it is usually the returned value from MHD_digest_auth_get_username.
+
+@var{password} must reference to a zero-terminated string representing the password,
+most probably it will be the result of a lookup of the username against a local database.
+
+@var{nonce_timeout} is the amount of time in seconds for a nonce to be invalid.
+Most of the time it is sound to specify 300 seconds as its values.
+@end deftypefun
+
+
+
+@deftypefun enum MHD_DigestAuthResult MHD_digest_auth_check_digest3 (struct MHD_Connection *connection, const char *realm, const char *username, const uint8_t *digest, unsigned int nonce_timeout, enum MHD_DigestAuthAlgorithm algo)
+Checks if the provided values in the WWW-Authenticate header are valid
+and sound according to RFC7616. If valid return @code{MHD_DAUTH_OK}, otherwise return the error code.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{username} must reference to a zero-terminated string representing the username,
+it is usually the returned value from MHD_digest_auth_get_username.
+
+@var{digest} the pointer to the binary digest for the precalculated hash value ``username:realm:password'' with specified @var{algo}.
+
+@var{digest_size} the number of bytes in @var{digest} (the size must match @var{algo}!)
+
+@var{nonce_timeout} the nonce validity duration in seconds.
+Most of the time it is sound to specify 300 seconds as its values.
+
+@var{algo} digest authentication algorithm to use.
+@end deftypefun
+
+@deftypefun int MHD_digest_auth_check_digest2 (struct MHD_Connection *connection, const char *realm, const char *username, const uint8_t *digest, unsigned int nonce_timeout, enum MHD_DigestAuthAlgorithm algo)
+Checks if the provided values in the WWW-Authenticate header are valid
+and sound according to RFC2716. If valid return @code{MHD_YES}, otherwise return @code{MHD_NO}.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{username} must reference to a zero-terminated string representing the username,
+it is usually the returned value from MHD_digest_auth_get_username.
+
+@var{digest} pointer to the binary MD5 sum for the precalculated hash value ``userame:realm:password''. The size must match the selected @var{algo}!
+
+@var{nonce_timeout} is the amount of time in seconds for a nonce to be invalid.
+Most of the time it is sound to specify 300 seconds as its values.
+
+@var{algo} digest authentication algorithm to use.
+@end deftypefun
+
+@deftypefun int MHD_digest_auth_check_digest (struct MHD_Connection *connection, const char *realm, const char *username, const unsigned char digest[MHD_MD5_DIGEST_SIZE], unsigned int nonce_timeout)
+Checks if the provided values in the WWW-Authenticate header are valid
+and sound according to RFC2716. If valid return @code{MHD_YES}, otherwise return @code{MHD_NO}.
+Deprecated, use @code{MHD_digest_auth_check_digest2} instead.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{username} must reference to a zero-terminated string representing the username,
+it is usually the returned value from MHD_digest_auth_get_username.
+
+@var{digest} pointer to the binary MD5 sum for the precalculated hash value ``userame:realm:password'' of @code{MHD_MD5_DIGEST_SIZE} bytes.
+
+@var{nonce_timeout} is the amount of time in seconds for a nonce to be invalid.
+Most of the time it is sound to specify 300 seconds as its values.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_queue_auth_fail_response2 (struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale, enum MHD_DigestAuthAlgorithm algo)
+Queues a response to request authentication from the client,
+return @code{MHD_YES} if successful, otherwise @code{MHD_NO}.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{opaque} must reference to a zero-terminated string representing a value
+that gets passed to the client and expected to be passed again to the server
+as-is. This value can be a hexadecimal or base64 string.
+
+@var{response} a response structure to specify what shall be presented to the
+client with a 401 HTTP status.
+
+@var{signal_stale} a value that signals "stale=true" in the response header to
+indicate the invalidity of the nonce and no need to ask for authentication
+parameters and only a new nonce gets generated. @code{MHD_YES} to generate a new
+nonce, @code{MHD_NO} to ask for authentication parameters.
+
+@var{algo} which digest algorithm should we use. The same algorithm
+must then be selected when checking digests received from clients!
+
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_queue_auth_fail_response (struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale)
+Queues a response to request authentication from the client,
+return @code{MHD_YES} if successful, otherwise @code{MHD_NO}.
+
+@var{realm} must reference to a zero-terminated string representing the realm.
+
+@var{opaque} must reference to a zero-terminated string representing a value
+that gets passed to the client and expected to be passed again to the server
+as-is. This value can be a hexadecimal or base64 string.
+
+@var{response} a response structure to specify what shall be presented to the
+client with a 401 HTTP status.
+
+@var{signal_stale} a value that signals "stale=true" in the response header to
+indicate the invalidity of the nonce and no need to ask for authentication
+parameters and only a new nonce gets generated. @code{MHD_YES} to generate a new
+nonce, @code{MHD_NO} to ask for authentication parameters.
+@end deftypefun
+
+Example: handling digest authentication requests and responses.
+
+@example
+#define PAGE "<html><head><title>libmicrohttpd demo</title></head><body>Access granted</body></html>"
+#define DENIED "<html><head><title>libmicrohttpd demo</title></head><body>Access denied</body></html>"
+#define OPAQUE "11733b200778ce33060f31c9af70a870ba96ddd4"
+
+static int
+ahc_echo (void *cls,
+ struct MHD_Connection *connection,
+ const char *url,
+ const char *method,
+ const char *version,
+ const char *upload_data, size_t *upload_data_size, void **ptr)
+@{
+ struct MHD_Response *response;
+ char *username;
+ const char *password = "testpass";
+ const char *realm = "test@@example.com";
+ int ret;
+ static int already_called_marker;
+
+ if (&already_called_marker != *req_cls)
+ @{ /* Called for the first time, request not fully read yet */
+ *req_cls = &already_called_marker;
+ /* Wait for complete request */
+ return MHD_YES;
+ @}
+
+ username = MHD_digest_auth_get_username (connection);
+ if (username == NULL)
+ @{
+ response = MHD_create_response_from_buffer(strlen (DENIED),
+ DENIED,
+ MHD_RESPMEM_PERSISTENT);
+ ret = MHD_queue_auth_fail_response2 (connection,
+ realm,
+ OPAQUE,
+ response,
+ MHD_NO,
+ MHD_DIGEST_ALG_SHA256);
+ MHD_destroy_response(response);
+ return ret;
+ @}
+ ret = MHD_digest_auth_check2 (connection,
+ realm,
+ username,
+ password,
+ 300,
+ MHD_DIGEST_ALG_SHA256);
+ MHD_free(username);
+ if ( (ret == MHD_INVALID_NONCE) ||
+ (ret == MHD_NO) )
+ @{
+ response = MHD_create_response_from_buffer(strlen (DENIED),
+ DENIED,
+ MHD_RESPMEM_PERSISTENT);
+ if (NULL == response)
+ return MHD_NO;
+ ret = MHD_queue_auth_fail_response2 (connection,
+ realm,
+ OPAQUE,
+ response,
+ (ret == MHD_INVALID_NONCE) ? MHD_YES : MHD_NO,
+ MHD_DIGEST_ALG_SHA256);
+ MHD_destroy_response(response);
+ return ret;
+ @}
+ response = MHD_create_response_from_buffer (strlen(PAGE),
+ PAGE,
+ MHD_RESPMEM_PERSISTENT);
+ ret = MHD_queue_response (connection,
+ MHD_HTTP_OK,
+ response);
+ MHD_destroy_response(response);
+ return ret;
+@}
+@end example
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-post
+@chapter Adding a @code{POST} processor
+@cindex POST method
+
+@menu
+* microhttpd-post api:: Programming interface for the
+ @code{POST} processor.
+@end menu
+
+
+@noindent
+MHD provides the post processor API to make it easier for applications to
+parse the data of a client's @code{POST} request: the
+@code{MHD_AccessHandlerCallback} will be invoked multiple times to
+process data as it arrives; at each invocation a new chunk of data must
+be processed. The arguments @var{upload_data} and @var{upload_data_size}
+are used to reference the chunk of data.
+
+When @code{MHD_AccessHandlerCallback} is invoked for a new request:
+its @code{*@var{req_cls}} argument is set to @code{NULL}. When @code{POST}
+data comes in the upload buffer it is @strong{mandatory} to use the
+@var{req_cls} to store a reference to per-request data. The fact
+that the pointer was initially @code{NULL} can be used to detect that
+this is a new request.
+
+One method to detect that a new request was started is
+to set @code{*req_cls} to an unused integer:
+
+@example
+int
+access_handler (void *cls,
+ struct MHD_Connection * connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data, size_t *upload_data_size,
+ void **req_cls)
+@{
+ static int old_connection_marker;
+ int new_connection = (NULL == *req_cls);
+
+ if (new_connection)
+ @{
+ /* new connection with POST */
+ *req_cls = &old_connection_marker;
+ @}
+
+ ...
+@}
+@end example
+
+@noindent
+In contrast to the previous example, for @code{POST} requests in particular,
+it is more common to use the value of @code{*req_cls} to keep track of
+actual state used during processing, such as the post processor (or a
+struct containing a post processor):
+
+@example
+int
+access_handler (void *cls,
+ struct MHD_Connection * connection,
+ const char *url,
+ const char *method, const char *version,
+ const char *upload_data, size_t *upload_data_size,
+ void **req_cls)
+@{
+ struct MHD_PostProcessor * pp = *req_cls;
+
+ if (pp == NULL)
+ @{
+ pp = MHD_create_post_processor(connection, ...);
+ *req_cls = pp;
+ return MHD_YES;
+ @}
+ if (*upload_data_size)
+ @{
+ MHD_post_process(pp, upload_data, *upload_data_size);
+ *upload_data_size = 0;
+ return MHD_YES;
+ @}
+ else
+ @{
+ MHD_destroy_post_processor(pp);
+ return MHD_queue_response(...);
+ @}
+@}
+@end example
+
+Note that the callback from @code{MHD_OPTION_NOTIFY_COMPLETED}
+should be used to destroy the post processor. This cannot be
+done inside of the access handler since the connection may not
+always terminate normally.
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-post api
+@section Programming interface for the @code{POST} processor
+@cindex POST method
+
+@deftypefun {struct MHD_PostProcessor *} MHD_create_post_processor (struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iterator, void *iterator_cls)
+Create a PostProcessor. A PostProcessor can be used to (incrementally)
+parse the data portion of a @code{POST} request.
+
+@table @var
+@item connection
+the connection on which the @code{POST} is happening (used to determine
+the @code{POST} format);
+
+@item buffer_size
+maximum number of bytes to use for internal buffering (used only for the
+parsing, specifically the parsing of the keys). A tiny value (256-1024)
+should be sufficient; do @strong{NOT} use a value smaller than 256;
+for good performance, use 32k or 64k (i.e. 65536).
+
+@item iterator
+iterator to be called with the parsed data; must @strong{NOT} be
+@code{NULL};
+
+@item iterator_cls
+custom value to be used as first argument to @var{iterator}.
+@end table
+
+Return @code{NULL} on error (out of memory, unsupported encoding), otherwise
+a PP handle.
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_post_process (struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
+Parse and process @code{POST} data. Call this function when @code{POST}
+data is available (usually during an @code{MHD_AccessHandlerCallback})
+with the @var{upload_data} and @var{upload_data_size}. Whenever
+possible, this will then cause calls to the
+@code{MHD_IncrementalKeyValueIterator}.
+
+@table @var
+@item pp
+the post processor;
+
+@item post_data
+@var{post_data_len} bytes of @code{POST} data;
+
+@item post_data_len
+length of @var{post_data}.
+@end table
+
+Return @code{MHD_YES} on success, @code{MHD_NO} on error
+(out-of-memory, iterator aborted, parse error).
+@end deftypefun
+
+
+@deftypefun enum MHD_Result MHD_destroy_post_processor (struct MHD_PostProcessor *pp)
+Release PostProcessor resources. After this function is being called,
+the PostProcessor is guaranteed to no longer call its iterator. There
+is no special call to the iterator to indicate the end of the post processing
+stream. After destroying the PostProcessor, the programmer should
+perform any necessary work to complete the processing of the iterator.
+
+Return @code{MHD_YES} if processing completed nicely, @code{MHD_NO}
+if there were spurious characters or formatting problems with
+the post request. It is common to ignore the return value
+of this function.
+
+
+@end deftypefun
+
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-info
+@chapter Obtaining and modifying status information.
+
+
+@menu
+* microhttpd-info daemon:: State information about an MHD daemon
+* microhttpd-info conn:: State information about a connection
+* microhttpd-option conn:: Modify per-connection options
+@end menu
+
+
+@c ------------------------------------------------------------
+@node microhttpd-info daemon
+@section Obtaining state information about an MHD daemon
+
+@deftypefun {const union MHD_DaemonInfo *} MHD_get_daemon_info (struct MHD_Daemon *daemon, enum MHD_DaemonInfoType infoType, ...)
+Obtain information about the given daemon. This function
+is currently not fully implemented.
+
+@table @var
+@item daemon
+the daemon about which information is desired;
+
+@item infoType
+type of information that is desired
+
+@item ...
+additional arguments about the desired information (depending on
+infoType)
+@end table
+
+Returns a union with the respective member (depending on
+infoType) set to the desired information), or @code{NULL}
+in case the desired information is not available or
+applicable.
+@end deftypefun
+
+
+@deftp {Enumeration} MHD_DaemonInfoType
+Values of this enum are used to specify what
+information about a daemon is desired.
+@table @code
+@item MHD_DAEMON_INFO_KEY_SIZE
+Request information about the key size for a particular cipher
+algorithm. The cipher algorithm should be passed as an extra argument
+(of type 'enum MHD_GNUTLS_CipherAlgorithm'). No longer supported,
+using this value will cause @code{MHD_get_daemon_info} to return NULL.
+
+@item MHD_DAEMON_INFO_MAC_KEY_SIZE
+Request information about the key size for a particular cipher
+algorithm. The cipher algorithm should be passed as an extra argument
+(of type 'enum MHD_GNUTLS_HashAlgorithm'). No longer supported,
+using this value will cause @code{MHD_get_daemon_info} to return NULL.
+
+@item MHD_DAEMON_INFO_LISTEN_FD
+@cindex listen
+Request the file-descriptor number that MHD is using to listen to the
+server socket. This can be useful if no port
+was specified and a client needs to learn what port
+is actually being used by MHD.
+No extra arguments should be passed.
+
+@item MHD_DAEMON_INFO_EPOLL_FD
+@cindex epoll
+Request the file-descriptor number that MHD is using for epoll. If
+the build is not supporting epoll, NULL is returned; if we are using a
+thread pool or this daemon was not started with
+@code{MHD_USE_EPOLL}, (a pointer to) -1 is returned. If we are
+using @code{MHD_USE_INTERNAL_POLLING_THREAD} or are in 'external' select mode, the
+internal epoll FD is returned. This function must be used in external
+select mode with epoll to obtain the FD to call epoll on. No extra
+arguments should be passed.
+
+@item MHD_DAEMON_INFO_CURRENT_CONNECTIONS
+@cindex connection, limiting number of connections
+Request the number of current connections handled by the daemon. No
+extra arguments should be passed and a pointer to a @code{union
+MHD_DaemonInfo} value is returned, with the @code{num_connections}
+member of type @code{unsigned int} set to the number of active
+connections.
+
+Note that in multi-threaded or internal-select mode, the real number of current
+connections may already be different when @code{MHD_get_daemon_info} returns.
+The number of current connections can be used (even in multi-threaded and
+internal-select mode) after @code{MHD_quiesce_daemon} to detect whether all
+connections have been handled.
+
+@end table
+@end deftp
+
+
+
+@c ------------------------------------------------------------
+@node microhttpd-info conn
+@section Obtaining state information about a connection
+
+
+@deftypefun {const union MHD_ConnectionInfo *} MHD_get_connection_info (struct MHD_Connection *connection, enum MHD_ConnectionInfoType infoType, ...)
+Obtain information about the given connection.
+
+@table @var
+@item connection
+the connection about which information is desired;
+
+@item infoType
+type of information that is desired
+
+@item ...
+additional arguments about the desired information (depending on
+infoType)
+@end table
+
+Returns a union with the respective member (depending on
+infoType) set to the desired information), or @code{NULL}
+in case the desired information is not available or
+applicable.
+@end deftypefun
+
+@deftp {Enumeration} MHD_ConnectionInfoType
+Values of this enum are used to specify what information about a
+connection is desired.
+
+@table @code
+
+@item MHD_CONNECTION_INFO_CIPHER_ALGO
+What cipher algorithm is being used (HTTPS connections only).
+@code{NULL} is returned for non-HTTPS connections.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_PROTOCOL,
+Allows finding out the TLS/SSL protocol used
+(HTTPS connections only).
+@code{NULL} is returned for non-HTTPS connections.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_CLIENT_ADDRESS
+Returns information about the address of the client. Returns
+essentially a @code{struct sockaddr **} (since the API returns
+a @code{union MHD_ConnectionInfo *} and that union contains
+a @code{struct sockaddr *}).
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_GNUTLS_SESSION,
+Takes no extra arguments. Allows access to the underlying GNUtls session,
+including access to the underlying GNUtls client certificate
+(HTTPS connections only). Takes no extra arguments.
+@code{NULL} is returned for non-HTTPS connections.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT,
+Dysfunctional (never implemented, deprecated). Use
+MHD_CONNECTION_INFO_GNUTLS_SESSION to get the @code{gnutls_session_t}
+and then call @code{gnutls_certificate_get_peers()}.
+
+@item MHD_CONNECTION_INFO_DAEMON
+Returns information about @code{struct MHD_Daemon} which manages
+this connection.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_CONNECTION_FD
+Returns the file descriptor (usually a TCP socket) associated with
+this connection (in the ``connect-fd'' member of the returned struct).
+Note that manipulating the descriptor directly can have problematic
+consequences (as in, break HTTP). Applications might use this access
+to manipulate TCP options, for example to set the ``TCP-NODELAY''
+option for COMET-like applications. Note that MHD will set TCP-CORK
+after sending the HTTP header and clear it after finishing the footers
+automatically (if the platform supports it). As the connection
+callbacks are invoked in between, those might be used to set different
+values for TCP-CORK and TCP-NODELAY in the meantime.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_CONNECTION_SUSPENDED
+Returns pointer to an integer that is @code{MHD_YES} if the connection
+is currently suspended (and thus can be safely resumed) and
+@code{MHD_NO} otherwise.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_SOCKET_CONTEXT
+Returns the client-specific pointer to a @code{void *} that was
+(possibly) set during a @code{MHD_NotifyConnectionCallback} when the
+socket was first accepted. Note that this is NOT the same as the
+@code{req_cls} argument of the @code{MHD_AccessHandlerCallback}. The
+@code{req_cls} is fresh for each HTTP request, while the
+@code{socket_context} is fresh for each socket.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
+Returns pointer to an @code{unsigned int} that is the current timeout
+used for the connection (in seconds, 0 for no timeout). Note that
+while suspended connections will not timeout, the timeout value
+returned for suspended connections will be the timeout that the
+connection will use after it is resumed, and thus might not be zero.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_REQUEST_HEADER_SIZE
+@cindex performance
+Returns pointer to an @code{size_t} that represents the size of the
+HTTP header received from the client. Only valid after the first callback
+to the access handler.
+
+Takes no extra arguments.
+
+@item MHD_CONNECTION_INFO_HTTP_STATUS
+Returns the HTTP status code of the response that was
+queued. Returns NULL if no response was queued yet.
+
+Takes no extra arguments.
+
+@end table
+@end deftp
+
+
+
+@c ------------------------------------------------------------
+@node microhttpd-option conn
+@section Setting custom options for an individual connection
+@cindex timeout
+
+
+
+@deftypefun {int} MHD_set_connection_option (struct MHD_Connection *daemon, enum MHD_CONNECTION_OPTION option, ...)
+Set a custom option for the given connection.
+
+@table @var
+@item connection
+the connection for which an option should be set or modified;
+
+@item option
+option to set
+
+@item ...
+additional arguments for the option (depending on option)
+@end table
+
+Returns @code{MHD_YES} on success, @code{MHD_NO} for errors
+(i.e. option argument invalid or option unknown).
+@end deftypefun
+
+
+@deftp {Enumeration} MHD_CONNECTION_OPTION
+Values of this enum are used to specify which option for a
+connection should be changed.
+
+@table @code
+
+@item MHD_CONNECTION_OPTION_TIMEOUT
+Set a custom timeout for the given connection. Specified
+as the number of seconds, given as an @code{unsigned int}. Use
+zero for no timeout.
+
+@end table
+@end deftp
+
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-util
+@chapter Utility functions.
+
+
+@menu
+* microhttpd-util feature:: Test supported MHD features
+* microhttpd-util unescape:: Unescape strings
+@end menu
+
+
+@c ------------------------------------------------------------
+@node microhttpd-util feature
+@section Testing for supported MHD features
+
+
+@deftp {Enumeration} MHD_FEATURE
+Values of this enum are used to specify what
+information about a daemon is desired.
+@table @code
+@item MHD_FEATURE_MESSAGES
+Get whether messages are supported. If supported then in debug
+mode messages can be printed to stderr or to external logger.
+
+@item MHD_FEATURE_SSL
+Get whether HTTPS is supported. If supported then flag
+MHD_USE_SSL and options MHD_OPTION_HTTPS_MEM_KEY,
+MHD_OPTION_HTTPS_MEM_CERT, MHD_OPTION_HTTPS_MEM_TRUST,
+MHD_OPTION_HTTPS_MEM_DHPARAMS, MHD_OPTION_HTTPS_CRED_TYPE,
+MHD_OPTION_HTTPS_PRIORITIES can be used.
+
+@item MHD_FEATURE_HTTPS_CERT_CALLBACK
+Get whether option #MHD_OPTION_HTTPS_CERT_CALLBACK is
+supported.
+
+@item MHD_FEATURE_IPv6
+Get whether IPv6 is supported. If supported then flag
+MHD_USE_IPv6 can be used.
+
+@item MHD_FEATURE_IPv6_ONLY
+Get whether IPv6 without IPv4 is supported. If not supported
+then IPv4 is always enabled in IPv6 sockets and
+flag MHD_USE_DUAL_STACK if always used when MHD_USE_IPv6 is
+specified.
+
+@item MHD_FEATURE_POLL
+Get whether @code{poll()} is supported. If supported then flag
+MHD_USE_POLL can be used.
+
+@item MHD_FEATURE_EPOLL
+Get whether @code{epoll()} is supported. If supported then Flags
+MHD_USE_EPOLL and
+MHD_USE_EPOLL_INTERNAL_THREAD can be used.
+
+@item MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET
+Get whether shutdown on listen socket to signal other
+threads is supported. If not supported flag
+MHD_USE_ITC is automatically forced.
+
+@item MHD_FEATURE_SOCKETPAIR
+Get whether a @code{socketpair()} is used internally instead of
+a @code{pipe()} to signal other threads.
+
+@item MHD_FEATURE_TCP_FASTOPEN
+Get whether TCP Fast Open is supported. If supported then
+flag MHD_USE_TCP_FASTOPEN and option
+MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE can be used.
+
+@item MHD_FEATURE_BASIC_AUTH
+Get whether HTTP Basic authorization is supported. If supported
+then functions @code{MHD_basic_auth_get_username_password()} and
+@code{MHD_queue_basic_auth_fail_response()} can be used.
+
+@item MHD_FEATURE_DIGEST_AUTH
+Get whether HTTP Digest authorization is supported. If
+supported then options MHD_OPTION_DIGEST_AUTH_RANDOM,
+MHD_OPTION_NONCE_NC_SIZE and functions @code{MHD_digest_auth_check()},
+can be used.
+
+@item MHD_FEATURE_POSTPROCESSOR
+Get whether postprocessor is supported. If supported then
+functions @code{MHD_create_post_processor()},
+@code{MHD_post_process()}, @code{MHD_destroy_post_processor()}
+can be used.
+
+@item MHD_FEATURE_SENDFILE
+Get whether @code{sendfile()} is supported.
+
+@end table
+@end deftp
+
+
+
+@deftypefun {int} MHD_is_feature_supported (enum MHD_FEATURE feature)
+Get information about supported MHD features. Indicate that MHD was
+compiled with or without support for particular feature. Some features
+require additional support by the kernel. However, kernel support is not
+checked by this function.
+
+@table @var
+@item feature
+type of requested information
+@end table
+
+Returns @code{MHD_YES} if the feature is supported,
+and @code{MHD_NO} if not.
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-util unescape
+@section Unescape strings
+
+@deftypefun {size_t} MHD_http_unescape (char *val)
+Process escape sequences ('%HH') Updates val in place; the result
+should be UTF-8 encoded and cannot be larger than the input. The
+result must also still be 0-terminated.
+
+@table @var
+@item val
+value to unescape (modified in the process), must be
+a 0-terminated UTF-8 string.
+@end table
+
+Returns length of the resulting val (@code{strlen(val)} may be
+shorter afterwards due to elimination of escape sequences).
+
+@end deftypefun
+
+
+
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+@c ------------------------------------------------------------
+@node microhttpd-websocket
+@chapter Websocket functions.
+
+@noindent
+Websocket functions provide what you need to use an upgraded connection
+as a websocket.
+These functions are only available if you include the header file
+@code{microhttpd_ws.h} and compiled @emph{libmicrohttpd} with websockets.
+
+@menu
+* microhttpd-websocket handshake:: Websocket handshake functions
+* microhttpd-websocket stream:: Websocket stream functions
+* microhttpd-websocket decode:: Websocket decode functions
+* microhttpd-websocket encode:: Websocket encode functions
+* microhttpd-websocket memory:: Websocket memory functions
+@end menu
+
+@c ------------------------------------------------------------
+@node microhttpd-websocket handshake
+@section Websocket handshake functions
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_check_http_version (const char* http_version)
+@cindex websocket
+Checks the HTTP version of the incoming request.
+Websocket requests are only allowed for HTTP/1.1 or above.
+
+@table @var
+@item http_version
+The value of the @code{version} parameter of your
+@code{access_handler} callback.
+If you pass @code{NULL} then this is handled like a not
+matching HTTP version.
+@end table
+
+Returns 0 when the HTTP version is
+valid for a websocket request and
+a value less than zero when the HTTP version isn't
+valid for a websocket request.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_check_connection_header (const char* connection_header)
+@cindex websocket
+Checks the value of the @code{Connection} HTTP request header.
+Websocket requests require the token @code{Upgrade} in
+the @code{Connection} HTTP request header.
+
+@table @var
+@item connection_header
+Value of the @code{Connection} request header.
+You can get this request header value by passing
+@code{MHD_HTTP_HEADER_CONNECTION} to
+@code{MHD_lookup_connection_value()}.
+If you pass @code{NULL} then this is handled like a not
+matching @code{Connection} header value.
+@end table
+
+Returns 0 when the @code{Connection} header is
+valid for a websocket request and
+a value less than zero when the @code{Connection} header isn't
+valid for a websocket request.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_check_upgrade_header (const char* upgrade_header)
+@cindex websocket
+Checks the value of the @code{Upgrade} HTTP request header.
+Websocket requests require the value @code{websocket} in
+the @code{Upgrade} HTTP request header.
+
+@table @var
+@item upgrade_header
+Value of the @code{Upgrade} request header.
+You can get this request header value by passing
+@code{MHD_HTTP_HEADER_UPGRADE} to
+@code{MHD_lookup_connection_value()}.
+If you pass @code{NULL} then this is handled like a not
+matching @code{Upgrade} header value.
+@end table
+
+Returns 0 when the @code{Upgrade} header is
+valid for a websocket request and
+a value less than zero when the @code{Upgrade} header isn't
+valid for a websocket request.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_check_version_header (const char* version_header)
+@cindex websocket
+Checks the value of the @code{Sec-WebSocket-Version} HTTP request header.
+Websocket requests require the value @code{13} in
+the @code{Sec-WebSocket-Version} HTTP request header.
+
+@table @var
+@item version_header
+Value of the @code{Sec-WebSocket-Version} request header.
+You can get this request header value by passing
+@code{MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION} to
+@code{MHD_lookup_connection_value()}.
+If you pass @code{NULL} then this is handled like a not
+matching @code{Sec-WebSocket-Version} header value.
+@end table
+
+Returns 0 when the @code{Sec-WebSocket-Version} header is
+valid for a websocket request and
+a value less than zero when the @code{Sec-WebSocket-Version} header isn't
+valid for a websocket request.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_create_accept_header (const char* sec_websocket_key, char* sec_websocket_accept)
+@cindex websocket
+Checks the value of the @code{Sec-WebSocket-Key}
+HTTP request header and generates the value for
+the @code{Sec-WebSocket-Accept} HTTP response header.
+The generated value must be sent to the client.
+
+@table @var
+@item sec_websocket_key
+Value of the @code{Sec-WebSocket-Key} request header.
+You can get this request header value by passing
+@code{MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY} to
+@code{MHD_lookup_connection_value()}.
+If you pass @code{NULL} then this is handled like a not
+matching @code{Sec-WebSocket-Key} header value.
+
+@item sec_websocket_accept
+Response buffer, which will receive
+the generated value for the @code{Sec-WebSocket-Accept}
+HTTP response header.
+This buffer must be at least 29 bytes long and
+will contain the response value plus a terminating @code{NUL}
+character on success.
+Must not be @code{NULL}.
+You can add this HTTP header to your response by passing
+@code{MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT} to
+@code{MHD_add_response_header()}.
+@end table
+
+Returns 0 when the @code{Sec-WebSocket-Key} header was
+not empty and a result value for the @code{Sec-WebSocket-Accept}
+was calculated.
+A value less than zero is returned when the @code{Sec-WebSocket-Key}
+header isn't valid for a websocket request or when any
+error occurred.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-websocket stream
+@section Websocket stream functions
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_stream_init (struct MHD_WebSocketStream **ws, int flags, size_t max_payload_size)
+@cindex websocket
+Creates a new websocket stream, used for decoding/encoding.
+
+@table @var
+@item ws
+pointer a variable to fill with the newly created
+@code{struct MHD_WebSocketStream},
+receives @code{NULL} on error. May not be @code{NULL}.
+
+If not required anymore, free the created websocket stream with
+@code{MHD_websocket_stream_free()}.
+
+@item flags
+combination of @code{enum MHD_WEBSOCKET_FLAG} values to
+modify the behavior of the websocket stream.
+
+@item max_payload_size
+maximum size for incoming payload data in bytes. Use 0 to allow each size.
+@end table
+
+Returns 0 on success, negative values on error.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_stream_init2 (struct MHD_WebSocketStream **ws, int flags, size_t max_payload_size, MHD_WebSocketMallocCallback callback_malloc, MHD_WebSocketReallocCallback callback_realloc, MHD_WebSocketFreeCallback callback_free, void* cls_rng, MHD_WebSocketRandomNumberGenerator callback_rng)
+@cindex websocket
+Creates a new websocket stream, used for decoding/encoding,
+but with custom memory functions for malloc, realloc and free.
+Also a random number generator can be specified for client mode.
+
+@table @var
+@item ws
+pointer a variable to fill with the newly created
+@code{struct MHD_WebSocketStream},
+receives @code{NULL} on error. Must not be @code{NULL}.
+
+If not required anymore, free the created websocket stream with
+@code{MHD_websocket_stream_free}.
+
+@item flags
+combination of @code{enum MHD_WEBSOCKET_FLAG} values to
+modify the behavior of the websocket stream.
+
+@item max_payload_size
+maximum size for incoming payload data in bytes. Use 0 to allow each size.
+
+@item callback_malloc
+callback function for allocating memory. Must not be @code{NULL}.
+The shorter @code{MHD_websocket_stream_init()} passes a reference to @code{malloc} here.
+
+@item callback_realloc
+callback function for reallocating memory. Must not be @code{NULL}.
+The shorter @code{MHD_websocket_stream_init()} passes a reference to @code{realloc} here.
+
+@item callback_free
+callback function for freeing memory. Must not be @code{NULL}.
+The shorter @code{MHD_websocket_stream_init()} passes a reference to @code{free} here.
+
+@item cls_rng
+closure for the random number generator.
+This is only required when
+@code{MHD_WEBSOCKET_FLAG_CLIENT} is passed in @code{flags}.
+The given value is passed to the random number generator callback.
+May be @code{NULL} if not needed.
+Should be @code{NULL} when you are not using @code{MHD_WEBSOCKET_FLAG_CLIENT}.
+The shorter @code{MHD_websocket_stream_init} passes @code{NULL} here.
+
+@item callback_rng
+callback function for a secure random number generator.
+This is only required when @code{MHD_WEBSOCKET_FLAG_CLIENT} is
+passed in @code{flags} and must not be @code{NULL} then.
+Should be @code{NULL} otherwise.
+The shorter @code{MHD_websocket_stream_init()} passes @code{NULL} here.
+@end table
+
+Returns 0 on success, negative values on error.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_stream_free (struct MHD_WebSocketStream *ws)
+@cindex websocket
+Frees a previously allocated websocket stream
+
+@table @var
+@item ws
+websocket stream to free, this value may be @code{NULL}.
+@end table
+
+Returns 0 on success, negative values on error.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_stream_invalidate (struct MHD_WebSocketStream *ws)
+@cindex websocket
+Invalidates a websocket stream.
+After invalidation a websocket stream cannot be used for decoding anymore.
+Encoding is still possible.
+
+@table @var
+@item ws
+websocket stream to invalidate.
+@end table
+
+Returns 0 on success, negative values on error.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_VALIDITY} MHD_websocket_stream_is_valid (struct MHD_WebSocketStream *ws)
+@cindex websocket
+Queries whether a websocket stream is valid.
+Invalidated websocket streams cannot be used for decoding anymore.
+Encoding is still possible.
+
+@table @var
+@item ws
+websocket stream to invalidate.
+@end table
+
+Returns 0 if invalid, 1 if valid for all types or
+2 if valid only for control frames.
+Can be compared with @code{enum MHD_WEBSOCKET_VALIDITY}.
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-websocket decode
+@section Websocket decode functions
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_decode (struct MHD_WebSocketStream* ws, const char* streambuf, size_t streambuf_len, size_t* streambuf_read_len, char** payload, size_t* payload_len)
+@cindex websocket
+Decodes a byte sequence for a websocket stream.
+Decoding is done until either a frame is complete or
+the end of the byte sequence is reached.
+
+@table @var
+@item ws
+websocket stream for decoding.
+
+@item streambuf
+byte sequence for decoding.
+This is what you typically received via @code{recv()}.
+
+@item streambuf_len
+length of the byte sequence in parameter @code{streambuf}.
+
+@item streambuf_read_len
+pointer to a variable, which receives the number of bytes,
+that has been processed by this call.
+This value may be less than the value of @code{streambuf_len} when
+a frame is decoded before the end of the buffer is reached.
+The remaining bytes of @code{buf} must be passed to
+the next call of this function.
+
+@item payload
+pointer to a variable, which receives the allocated buffer with the payload
+data of the decoded frame. Must not be @code{NULL}.
+If no decoded data is available or an error occurred @code{NULL} is returned.
+When the returned value is not @code{NULL} then the buffer contains always
+@code{payload_len} bytes plus one terminating @code{NUL} character
+(regardless of the frame type).
+
+The caller must free this buffer using @code{MHD_websocket_free()}.
+
+If you passed the flag @code{MHD_WEBSOCKET_FLAG_GENERATE_CLOSE_FRAMES_ON_ERROR}
+upon creation of the websocket stream and a decoding error occurred
+(function return value less than 0), then this buffer contains
+a generated close frame, which must be sent via the socket to the recipient.
+
+If you passed the flag @code{MHD_WEBSOCKET_FLAG_WANT_FRAGMENTS}
+upon creation of the websocket stream then
+this payload may only be a part of the complete message.
+Only complete UTF-8 sequences are returned for fragmented text frames.
+If necessary the UTF-8 sequence will be completed with the next text fragment.
+
+@item payload_len
+pointer to a variable, which receives length of the result
+@code{payload} buffer in bytes.
+Must not be @code{NULL}.
+This receives 0 when no data is available, when the decoded payload
+has a length of zero or when an error occurred.
+@end table
+
+Returns a value greater than zero when a frame is complete.
+Compare with @code{enum MHD_WEBSOCKET_STATUS} to distinguish the frame type.
+Returns 0 when the call succeeded, but no frame is available.
+Returns a value less than zero on errors.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_split_close_reason (const char* payload, size_t payload_len, unsigned short* reason_code, const char** reason_utf8, size_t* reason_utf8_len)
+@cindex websocket
+Splits the payload of a decoded close frame.
+
+@table @var
+@item payload
+payload of the close frame.
+This parameter may only be @code{NULL} if @code{payload_len} is 0.
+
+@item payload_len
+length of @code{payload}.
+
+@item reason_code
+pointer to a variable, which receives the numeric close reason.
+If there was no close reason, this is 0.
+This value can be compared with @code{enum MHD_WEBSOCKET_CLOSEREASON}.
+May be @code{NULL}.
+
+@item reason_utf8
+pointer to a variable, which receives the literal close reason.
+If there was no literal close reason, this will be @code{NULL}.
+May be @code{NULL}.
+
+Please note that no memory is allocated in this function.
+If not @code{NULL} the returned value of this parameter
+points to a position in the specified @code{payload}.
+
+@item reason_utf8_len
+pointer to a variable, which receives the length of the literal close reason.
+If there was no literal close reason, this is 0.
+May be @code{NULL}.
+@end table
+
+Returns 0 on success or a value less than zero on errors.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-websocket encode
+@section Websocket encode functions
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_encode_text (struct MHD_WebSocketStream* ws, const char* payload_utf8, size_t payload_utf8_len, int fragmentation, char** frame, size_t* frame_len, int* utf8_step)
+@cindex websocket
+Encodes an UTF-8 encoded text into websocket text frame
+
+@table @var
+@item ws
+websocket stream;
+
+@item payload_utf8
+text to send. This must be UTF-8 encoded.
+If you don't want UTF-8 then send a binary frame
+with @code{MHD_websocket_encode_binary()} instead.
+May be be @code{NULL} if @code{payload_utf8_len} is 0,
+must not be @code{NULL} otherwise.
+
+@item payload_utf8_len
+length of @code{payload_utf8} in bytes.
+
+@item fragmentation
+A value of @code{enum MHD_WEBSOCKET_FRAGMENTATION}
+to specify the fragmentation behavior.
+Specify @code{MHD_WEBSOCKET_FRAGMENTATION_NONE} or just 0
+if you don't want to use fragmentation (default).
+
+@item frame
+pointer to a variable, which receives a buffer with the encoded text frame.
+Must not be @code{NULL}.
+The buffer contains what you typically send via @code{send()} to the recipient.
+If no encoded data is available the variable receives @code{NULL}.
+
+If the variable is not @code{NULL} then the buffer contains always
+@code{frame_len} bytes plus one terminating @code{NUL} character.
+The caller must free this buffer using @code{MHD_websocket_free()}.
+
+@item frame_len
+pointer to a variable, which receives the length of the encoded frame in bytes.
+Must not be @code{NULL}.
+
+@item utf8_step
+If fragmentation is used (the parameter @code{fragmentation} is not 0)
+then is parameter is required and must not be @code{NULL}.
+If no fragmentation is used, this parameter is optional and
+should be @code{NULL}.
+
+This parameter is a pointer to a variable which contains the last check status
+of the UTF-8 sequence. It is required to continue a previous
+UTF-8 sequence check when fragmentation is used, because a UTF-8 sequence
+could be split upon fragments.
+
+@code{enum MHD_WEBSOCKET_UTF8STEP} is used for this value.
+If you start a new fragment using
+@code{MHD_WEBSOCKET_FRAGMENTATION_NONE} or
+@code{MHD_WEBSOCKET_FRAGMENTATION_FIRST} the old value of this variable
+will be discarded and the value of this variable will be initialized
+to @code{MHD_WEBSOCKET_UTF8STEP_NORMAL}.
+On all other fragmentation modes the previous value of the pointed variable
+will be used to continue the UTF-8 sequence check.
+@end table
+
+Returns 0 on success or a value less than zero on errors.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_encode_binary (struct MHD_WebSocketStream* ws, const char* payload, size_t payload_len, int fragmentation, char** frame, size_t* frame_len)
+@cindex websocket
+Encodes binary data into websocket binary frame
+
+@table @var
+@item ws
+websocket stream;
+
+@item payload
+binary data to send.
+May be be @code{NULL} if @code{payload_len} is 0,
+must not be @code{NULL} otherwise.
+
+@item payload_len
+length of @code{payload} in bytes.
+
+@item fragmentation
+A value of @code{enum MHD_WEBSOCKET_FRAGMENTATION}
+to specify the fragmentation behavior.
+Specify @code{MHD_WEBSOCKET_FRAGMENTATION_NONE} or just 0
+if you don't want to use fragmentation (default).
+
+@item frame
+pointer to a variable, which receives a buffer with the encoded binary frame.
+Must not be @code{NULL}.
+The buffer contains what you typically send via @code{send()} to the recipient.
+If no encoded data is available the variable receives @code{NULL}.
+
+If the variable is not @code{NULL} then the buffer contains always
+@code{frame_len} bytes plus one terminating @code{NUL} character.
+The caller must free this buffer using @code{MHD_websocket_free()}.
+
+@item frame_len
+pointer to a variable, which receives the length of the encoded frame in bytes.
+Must not be @code{NULL}.
+@end table
+
+Returns 0 on success or a value less than zero on errors.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_encode_ping (struct MHD_WebSocketStream* ws, const char* payload, size_t payload_len, char** frame, size_t* frame_len)
+@cindex websocket
+Encodes a websocket ping frame.
+Ping frames are used to check whether a recipient is still available
+and what latency the websocket connection has.
+
+@table @var
+@item ws
+websocket stream;
+
+@item payload
+binary ping data to send.
+May be @code{NULL} if @code{payload_len} is 0.
+
+@item payload_len
+length of @code{payload} in bytes.
+This may not exceed 125 bytes.
+
+@item frame
+pointer to a variable, which receives a buffer with the encoded ping frame.
+Must not be @code{NULL}.
+The buffer contains what you typically send via @code{send()} to the recipient.
+If no encoded data is available the variable receives @code{NULL}.
+
+If the variable is not @code{NULL} then the buffer contains always
+@code{frame_len} bytes plus one terminating @code{NUL} character.
+The caller must free this buffer using @code{MHD_websocket_free()}.
+
+@item frame_len
+pointer to a variable, which receives the length of the encoded frame in bytes.
+Must not be @code{NULL}.
+@end table
+
+Returns 0 on success or a value less than zero on errors.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_encode_pong (struct MHD_WebSocketStream* ws, const char* payload, size_t payload_len, char** frame, size_t* frame_len)
+@cindex websocket
+Encodes a websocket pong frame.
+Pong frames are used to answer a previously received websocket ping frame.
+
+@table @var
+@item ws
+websocket stream;
+
+@item payload
+binary pong data to send, which should be
+the decoded payload from the received ping frame.
+May be @code{NULL} if @code{payload_len} is 0.
+
+@item payload_len
+length of @code{payload} in bytes.
+This may not exceed 125 bytes.
+
+@item frame
+pointer to a variable, which receives a buffer with the encoded pong frame.
+Must not be @code{NULL}.
+The buffer contains what you typically send via @code{send()} to the recipient.
+If no encoded data is available the variable receives @code{NULL}.
+
+If the variable is not @code{NULL} then the buffer contains always
+@code{frame_len} bytes plus one terminating @code{NUL} character.
+The caller must free this buffer using @code{MHD_websocket_free()}.
+
+@item frame_len
+pointer to a variable, which receives the length of the encoded frame in bytes.
+Must not be @code{NULL}.
+@end table
+
+Returns 0 on success or a value less than zero on errors.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@deftypefun {enum MHD_WEBSOCKET_STATUS} MHD_websocket_encode_close (struct MHD_WebSocketStream* ws, unsigned short reason_code, const char* reason_utf8, size_t reason_utf8_len, char** frame, size_t* frame_len)
+@cindex websocket
+Encodes a websocket close frame.
+Close frames are used to close a websocket connection in a formal way.
+
+@table @var
+@item ws
+websocket stream;
+
+@item reason_code
+reason for close.
+You can use @code{enum MHD_WEBSOCKET_CLOSEREASON} for typical reasons,
+but you are not limited to these values.
+The allowed values are specified in RFC 6455 7.4.
+If you don't want to enter a reason, you can specify
+@code{MHD_WEBSOCKET_CLOSEREASON_NO_REASON} (or just 0) then
+no reason is encoded.
+
+@item reason_utf8
+An UTF-8 encoded text reason why the connection is closed.
+This may be @code{NULL} if @code{reason_utf8_len} is 0.
+This must be @code{NULL} if @code{reason_code} equals to zero
+(@code{MHD_WEBSOCKET_CLOSEREASON_NO_REASON}).
+
+@item reason_utf8_len
+length of the UTF-8 encoded text reason in bytes.
+This may not exceed 123 bytes.
+
+@item frame
+pointer to a variable, which receives a buffer with the encoded close frame.
+Must not be @code{NULL}.
+The buffer contains what you typically send via @code{send()} to the recipient.
+If no encoded data is available the variable receives @code{NULL}.
+
+If the variable is not @code{NULL} then the buffer contains always
+@code{frame_len} bytes plus one terminating @code{NUL} character.
+The caller must free this buffer using @code{MHD_websocket_free()}.
+
+@item frame_len
+pointer to a variable, which receives the length of the encoded frame in bytes.
+Must not be @code{NULL}.
+@end table
+
+Returns 0 on success or a value less than zero on errors.
+Can be compared with @code{enum MHD_WEBSOCKET_STATUS}.
+@end deftypefun
+
+
+@c ------------------------------------------------------------
+@node microhttpd-websocket memory
+@section Websocket memory functions
+
+
+@deftypefun {void*} MHD_websocket_malloc (struct MHD_WebSocketStream* ws, size_t buf_len)
+@cindex websocket
+Allocates memory with the associated @code{malloc()} function
+of the websocket stream.
+The memory allocation function could be different for a websocket stream if
+@code{MHD_websocket_stream_init2()} has been used for initialization.
+
+@table @var
+@item ws
+websocket stream;
+
+@item buf_len
+size of the buffer to allocate in bytes.
+@end table
+
+Returns the pointer of the allocated buffer or @code{NULL} on failure.
+@end deftypefun
+
+
+@deftypefun {void*} MHD_websocket_realloc (struct MHD_WebSocketStream* ws, void* buf, size_t new_buf_len)
+@cindex websocket
+Reallocates memory with the associated @code{realloc()} function
+of the websocket stream.
+The memory reallocation function could be different for a websocket stream if
+@code{MHD_websocket_stream_init2()} has been used for initialization.
+
+@table @var
+@item ws
+websocket stream;
+
+@item buf
+current buffer, may be @code{NULL};
+
+@item new_buf_len
+new size of the buffer in bytes.
+@end table
+
+Return the pointer of the reallocated buffer or @code{NULL} on failure.
+On failure the old pointer remains valid.
+@end deftypefun
+
+
+@deftypefun {void} MHD_websocket_free (struct MHD_WebSocketStream* ws, void* buf)
+@cindex websocket
+Frees memory with the associated @code{free()} function
+of the websocket stream.
+The memory free function could be different for a websocket stream if
+@code{MHD_websocket_stream_init2()} has been used for initialization.
+
+@table @var
+@item ws
+websocket stream;
+
+@item buf
+buffer to free, this may be @code{NULL} then nothing happens.
+@end table
+
+@end deftypefun
+
+
+
+
+
+@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+@c **********************************************************
+@c ******************* Appendices *************************
+@c **********************************************************
+
+@node GNU-LGPL
+@unnumbered GNU-LGPL
+@cindex license
+@include lgpl.texi
+
+@node eCos License
+@unnumbered eCos License
+@cindex license
+@include ecos.texi
+
+@node GNU-GPL
+@unnumbered GNU General Public License
+@cindex license
+@include gpl-2.0.texi
+
+@node GNU-FDL
+@unnumbered GNU-FDL
+@cindex license
+@include fdl-1.3.texi
+
+@node Concept Index
+@unnumbered Concept Index
+
+@printindex cp
+
+@node Function and Data Index
+@unnumbered Function and Data Index
+
+@printindex fn
+
+@node Type Index
+@unnumbered Type Index
+
+@printindex tp
+
+@bye
diff --git a/doc/libmicrohttpd_performance_data.eps b/doc/libmicrohttpd_performance_data.eps
@@ -0,0 +1,8468 @@
+%!PS-Adobe-3.0 EPSF-3.0
+%%Creator: (ImageMagick)
+%%Title: (libmicrohttpd_performance_data.eps)
+%%CreationDate: (2014-02-19T07:16:22+01:00)
+%%BoundingBox: -0 -0 640 480
+%%HiResBoundingBox: 0 0 640 480
+%%DocumentData: Clean7Bit
+%%LanguageLevel: 1
+%%Pages: 1
+%%EndComments
+
+%%BeginDefaults
+%%EndDefaults
+
+%%BeginProlog
+%
+% Display a color image. The image is displayed in color on
+% Postscript viewers or printers that support color, otherwise
+% it is displayed as grayscale.
+%
+/DirectClassPacket
+{
+ %
+ % Get a DirectClass packet.
+ %
+ % Parameters:
+ % red.
+ % green.
+ % blue.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ compression 0 eq
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/DirectClassImage
+{
+ %
+ % Display a DirectClass image.
+ %
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { DirectClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayDirectClassPacket } image
+ } ifelse
+} bind def
+
+/GrayDirectClassPacket
+{
+ %
+ % Get a DirectClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % red
+ % green
+ % blue
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile color_packet readhexstring pop pop
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 eq
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/GrayPseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet; convert to grayscale.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ color_packet 0 get 0.299 mul
+ color_packet 1 get 0.587 mul add
+ color_packet 2 get 0.114 mul add
+ cvi
+ /gray_packet exch def
+ compression 0 eq
+ {
+ /number_pixels 1 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add def
+ } ifelse
+ 0 1 number_pixels 1 sub
+ {
+ pixels exch gray_packet put
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassPacket
+{
+ %
+ % Get a PseudoClass packet.
+ %
+ % Parameters:
+ % index: index into the colormap.
+ % length: number of pixels minus one of this color (optional).
+ %
+ currentfile byte readhexstring pop 0 get
+ /offset exch 3 mul def
+ /color_packet colormap offset 3 getinterval def
+ compression 0 eq
+ {
+ /number_pixels 3 def
+ }
+ {
+ currentfile byte readhexstring pop 0 get
+ /number_pixels exch 1 add 3 mul def
+ } ifelse
+ 0 3 number_pixels 1 sub
+ {
+ pixels exch color_packet putinterval
+ } for
+ pixels 0 number_pixels getinterval
+} bind def
+
+/PseudoClassImage
+{
+ %
+ % Display a PseudoClass image.
+ %
+ % Parameters:
+ % class: 0-PseudoClass or 1-Grayscale.
+ %
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ class 0 gt
+ {
+ currentfile buffer readline pop
+ token pop /depth exch def pop
+ /grays columns 8 add depth sub depth mul 8 idiv string def
+ columns rows depth
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { currentfile grays readhexstring pop } image
+ }
+ {
+ %
+ % Parameters:
+ % colors: number of colors in the colormap.
+ % colormap: red, green, blue color packets.
+ %
+ currentfile buffer readline pop
+ token pop /colors exch def pop
+ /colors colors 3 mul def
+ /colormap colors string def
+ currentfile colormap readhexstring pop pop
+ systemdict /colorimage known
+ {
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { PseudoClassPacket } false 3 colorimage
+ }
+ {
+ %
+ % No colorimage operator; convert to grayscale.
+ %
+ columns rows 8
+ [
+ columns 0 0
+ rows neg 0 rows
+ ]
+ { GrayPseudoClassPacket } image
+ } ifelse
+ } ifelse
+} bind def
+
+/DisplayImage
+{
+ %
+ % Display a DirectClass or PseudoClass image.
+ %
+ % Parameters:
+ % x & y translation.
+ % x & y scale.
+ % label pointsize.
+ % image label.
+ % image columns & rows.
+ % class: 0-DirectClass or 1-PseudoClass.
+ % compression: 0-none or 1-RunlengthEncoded.
+ % hex color packets.
+ %
+ gsave
+ /buffer 512 string def
+ /byte 1 string def
+ /color_packet 3 string def
+ /pixels 768 string def
+
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ x y translate
+ currentfile buffer readline pop
+ token pop /x exch def
+ token pop /y exch def pop
+ currentfile buffer readline pop
+ token pop /pointsize exch def pop
+ /Times-Roman findfont pointsize scalefont setfont
+ x y scale
+ currentfile buffer readline pop
+ token pop /columns exch def
+ token pop /rows exch def pop
+ currentfile buffer readline pop
+ token pop /class exch def pop
+ currentfile buffer readline pop
+ token pop /compression exch def pop
+ class 0 gt { PseudoClassImage } { DirectClassImage } ifelse
+ grestore
+} bind def
+%%EndProlog
+%%Page: 1 1
+%%PageBoundingBox: 0 0 640 480
+userdict begin
+DisplayImage
+0 0
+640 480
+12
+640 480
+1
+0
+0
+102
+FFFFFF
+000000
+A0A0A0
+FF0000
+00C000
+0080FF
+C000FF
+00EEEE
+C04000
+C8C800
+4169E1
+FFC020
+008040
+C080FF
+306080
+8B0000
+408000
+FF80FF
+7FFFD4
+A52A2A
+FFFF00
+40E0D0
+000000
+1A1A1A
+333333
+4D4D4D
+666666
+7F7F7F
+999999
+B3B3B3
+C0C0C0
+CCCCCC
+E5E5E5
+FFFFFF
+F03232
+90EE90
+ADD8E6
+F055F0
+E0FFFF
+EEDD82
+FFB6C1
+AFEEEE
+FFD700
+00FF00
+006400
+00FF7F
+228B22
+2E8B57
+0000FF
+00008B
+191970
+000080
+0000CD
+87CEEB
+00FFFF
+FF00FF
+00CED1
+FF1493
+FF7F50
+F08080
+FF4500
+FA8072
+E9967A
+F0E68C
+BDB76B
+B8860B
+F5F5DC
+A08020
+FFA500
+EE82EE
+9400D3
+DDA0DD
+905040
+556B2F
+801400
+801414
+804014
+804080
+8060C0
+8060FF
+808000
+FF8040
+FFA040
+FFA060
+FFA070
+FFC0C0
+FFFF80
+FFFFC0
+CDB79E
+F0FFF0
+A0B6CD
+C1FFC1
+CDC0B0
+7CFF40
+A0FF20
+BEBEBE
+BFBFBF
+5F5F5F
+1F1F1F
+DFDFDF
+9F9F9F
+3F3F3F
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001010101010101010100010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000606101010000000000006361010161630000000000636101016163000000
+0063610101616300000000000000000000000000000000000000000000000000606101010000
+0000000000636101016163000000006361010161630000000063610101616300000000636101
+0161630000000063610101616300000000006361010161630000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000161000000000000006101
+0000010000000000000000010000000101010162651B63000000000100000000000000000000
+0000000000000001000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000010000000001010101010101010000
+0000000000000060650162616300000000010101010101000000006361010161630000000000
+00631B6562016261600000000000606162016265640000000000006361620101626160000001
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000621B6301000000000000621B63631B620000000000621B63631B6200000000621B63631B
+6200000000000000000000000000000000000000000000000000621B63010000000000000062
+1B63631B6200000000621B63631B6200000000621B63631B6200000000621B63631B62000000
+00621B63631B620000000000621B63631B620000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000162630000000000636501000001000000
+0000000000010000000100000063601B62640000000100000000000000000000000000000000
+0001000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000010000000000000000000000000000000000
+000000000000000000000000000000000001000000000000000000001B610000000000000000
+606264636364650000000001000000000000000000621B63631B620000000000606261606300
+631B621B00000000656463006360651B00000000646264630063646501000001000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000001
+00000000001B610000000061640000001B6100000000616400001B6100000000616400000000
+0000000000000000000000000000000000000000000000010000000000001B61000000006164
+00001B6100000000616400001B6100000000616400001B6100000000616400001B6100000000
+61640000001B6100000000616400000100000000000000000000000000000000000000000000
+000000000000000000000000000000011B610000000000616401000001000000000000000001
+0000000100000000000060626300000100000000000000000000000000000000000100000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000062600000000000000000656400000000
+64640000000100000000000000001B6100000000616400000064626000000000000000656100
+000000000000000063010000006362630000000000001B000001000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000001000000000001001B620162640000000001006162010000606501
+626400000000006065016264000000000000000000010000000000636101621B000000010061
+6201656300000000000000000000000000000000636162016264000000000001000000000065
+6000000000606500000065600000000060650000656000000000606500000000000000000000
+00000001001B6201626400000000000000010000000000006560000000006065000065600000
+0000606500006560000000006065000065600000000060650000656000000000606500000065
+60000000006065000001000000000000006362000000000000006260001B6201016560000000
+0000000000000000000163626300000063620001000001000000000000000001000000010000
+00000000001B6100000100000000001B62010165600000000000000100000000010061620165
+630000000060650162640000000001001B6201626400000000636162016264000001001B6201
+626400000001006162621B00006162016100000000636101621B000000000100616201000001
+0000000060626400010000000000000000000060650101656000000001001B62016264000000
+0000000000010000000000000000006065000000000000000000016300000000636500000001
+0000000000000000656000000000606500006362600060650101656001006260000000000000
+0000636200000061640000000000000000000001000000000000000001000001010101010101
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000001000000000001611B630060626400000001616400000063626400606260000000
+63626400606260000000000000000000000000000062640063611B0000016164636364626300
+0000000000000000000000000063621B63006061000000000001000000000062630000000063
+620000006263000000006362000062630000000063620000000000000000000000000001611B
+6300606264000000000000010000000000006263000000006362000062630000000063620000
+6263000000006362000062630000000063620000626300000000636200000062630000000063
+62000000000000000000000061640000000000646500611B6300636065000000000000000000
+0000000100611B0000001B1B0001000001000000000000000001000000010000000000000063
+6200000000000000611B63006360650000000000000000000000016164636364626300006362
+640060626000000001611B6300606264000063621B63006061000001611B6300606264000001
+61646363651B61646363656400000062640063611B0000000161640000000001000000606260
+0000000000000000000000006062646363646260000001611B63006062640000000000000001
+0000000000000000006564000000000000000000016300000000636200000001620162616300
+0000626300000000636200001B610060626463636401010064610000000000000060651B0000
+0062630000000000000000000001000000000000000001000000000000001B62000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000011B000000006065000000011B00000000611B0000006065000000611B00000060
+6500000000000000000000000000000000000063620000011B000000001B6100000000000000
+00000000000000611B0000000000000000000001000000000001000000000000010000000100
+0000000000010000010000000000000100000000000000000000000000011B00000000606500
+0000000000010000000000000100000000000001000001000000000000010000010000000000
+0001000001000000000000010000010000000000000100000001000000000000010000000000
+0000000000006062000000000062600001000000000000000000000000000000000000010063
+6200000062630001000001010101010101010101000000010000000000000000010000000000
+0000010000000000000000000000000000000000011B000000001B610000611B000000606500
+0000011B0000000060650000611B00000000000000011B000000006065000001640000006001
+640000006065000000000000006362000000011B000000000001000064656300000000000000
+00000000000061640000000064610000011B0000000060650000000000000001000000000000
+00006362000000000000000000006564000000006401000000656000631B6260000001000000
+0000000100006260006564000000006401006362000000000101010165000000000100000000
+0000000000000001010101010101010101000000000000646263000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000001
+6300000000636200000001630000000062630000006362000000626300000063620000000000
+0000000000000000001B62010101010000016300000000636200000000000000000000000000
+0062630000000000000000000001000000000001000000000000010000000100000000000001
+0000010000000000000100000000000000000000000000016300000000636200000000000001
+0000000000000100000000000001000001000000000000010000010000000000000100000100
+0000000000010000010000000000000100000001000000000000010000000000000000000000
+0065640000001B65000065616300000000000000000000000000000000010000656400646100
+0001000001000000000000000001000000010000000000000000010000000000000065616300
+0000000000000000000000000000016300000000636200006263000000636200000001630000
+0000636200006263000000000000000163000000006362000001630000000001630000000001
+0000001B62010101010000000163000000000001001B61000000000000000000000000000000
+62630000000063620000016300000000636200000000000000010000000000000000611B0000
+0000000000000000606264636364620100000000000000006465000001000000000000010000
+01000001630000000063010000010000000000006364621B0000000100000000000101010100
+0001000000000000000001000000000060626300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000001000000000000
+0100000001000000000001010101010101000000010101010101010000000000000000000000
+0000616560000000010000010000000000000100000000000000000101010100000100000000
+0000000000000001000000000062630000000063620000006263000000006362000062630000
+0000636200000000000000010101010000010000000000000100000000000001000000000000
+6263000000006362000062630000000063620000626300000000636200006263000000006362
+0000626300000000636200000062630000000063620000000000000000000000006062000000
+6264000063610162616000000000000000000000000000010000606200626000000100000100
+0000000000000001000000010000000000000063620000000000000063610162616000000000
+0000000000000000010000000000000100000101010101010100000001000000000000010000
+0100000000000000000100000000000001000001000000000001000000000001000061656000
+0000010000000100000000000001006263000000000000000000000000000000010000000000
+0001000001000000000000010000000000000001000000000000006362630000000001010101
+0000006065010165646200000000000000006301000062630000000063620000010000016300
+0000006301006362000000000000000060620000006263000000000000000100000100000000
+0000000001000000006062600000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000001000000000000010000000100
+0000000062630000000000000000626300000000000000000000000000000000000062630000
+0063010000016300000000636200000000000000000000000000006263000000000000000000
+0001000000000065600000000060650000006560000000006065000065600000000060650000
+0000000000000000000000010000000000000100000000000001000000000000656000000000
+6065000065600000000060650000656000000000606500006560000000006065000065600000
+00006065000000656000000000606500000000000000000000000000651B001B620000000000
+006364656100000000000000000000000001000000621B620000000100000100000000000000
+000100000001000000000000001B610000000000000000000063646561000000000000000000
+0000016300000000636200006263000000000000000001000000000000010000626300000000
+0000000100000000000001000001000000000001000000000001000062630000006301000000
+0100000000000001006462630000000000000000000000000000626300000000636200000100
+0000000000010000000000000001000000000000001B61000000000000000000000000000000
+0000606100000000000000006301000065600000000060650000626000656400000000640100
+646100000000000000000001000000611B000000000000000100000100000000000000000100
+0000636260000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000001000000000000010000000100000000006164
+0000000000000000616400000000000000000000000000000000000062630000001B01000001
+1B000000001B610000000000000000000000000000611B000000000000000000000100000000
+001B610000000061640000001B6100000000616400001B610000000061640000000000000000
+00000000000100000000000001000000000000010000000000001B6100000000616400001B61
+00000000616400001B6100000000616400001B6100000000616400001B610000000061640000
+001B610000000061640000000000000000000000000064016301640000000000000000630100
+0000000000000000000000010000006401640000000100000100000000000000000100000001
+00000000000063626300000000000000000000000063010000000000000000000000011B0000
+00001B6100006164000000000000000001000000000000010000611B00000000000000010000
+0000000001000001000000000001000000000001000062630000001B01000000010000000000
+0001000060626000000000000000000000000000616400000000646100000100000000000001
+0000000000000001000000000000006263000000000000000000000000000000000065600000
+000000000000646500001B6100000000616400001B6100606264636364620160626300000000
+0000000060620000006362630000000000000100000100000000000000000100006362640000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000001000000000000010000000100000000006362646300606500
+00006362646300606500000000000000000000000000616163631B6101000001616463636462
+63000000000000000000000000000063621B63006061000000000001000000000000621B6363
+1B620000000000621B63631B6200000000621B63631B62000000000000000000000000000001
+000000000000010000000000000100000000000000621B63631B6200000000621B63631B6200
+000000621B63631B6200000000621B63631B6200000000621B63631B620000000000621B6363
+1B620000000000000000000000000000006262620000000065646300631B6500000100000000
+000000000001000000000000000000010000010000000000000000010000000100000063601B
+6264000000000000000065646300631B65000000000000000000000001616463636462630000
+636264630060650000000100000000000001000063621B630060610000010000000000000100
+00010000000000010000000000010000616163631B6101000000010000000000000100000060
+6264000000000000000000000000606264636364626000000100000000000001000000000000
+000100000000000064650000000000000000000000000065600063616100000065646300631B
+6260000000621B63631B62000000636260006065010165600165630000006560630063646260
+0000000064621B630000631B010000010000000000000000010000621B000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000001000000000000010000000100000000000060650101656000000000606501
+0165600000000000000000000000000063616201610001000001006162016563000000000000
+0000000000000000000063616201656400000101010101010100000063610101616300000000
+0063610101616300000000636101016163000000000000000000000000000001000000000000
+0100000001010101010101000000006361010161630000000063610101616300000000636101
+0161630000000063610101616300000000636101016163000000000063610101616300000000
+00000000000000000000006401640000000060616201621B0000000100000000000000000001
+000000000000000000010000010000000000000000010000000101010162651B630000000000
+0000000060616201621B00000000000000000000000001006162016563000000006065010165
+6000000001000000000000010000006361620165640000010000000000000100000100000000
+000100000000000100006361620161000100000001000000000000010000000063621B000000
+0000000000000000006465010165600000000100000000000001000000000000000100000000
+0000656000000000000000000000000000646201626400000000606162016261630000000063
+6101016163000000006462600000000000000000000000006061620162616000000000000060
+6162010162616300000100000000000000000100000101010101010100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000060626160630063606165000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+1B65620101651B63000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000606101010000000000000000000000
+0000000000000000000000000000000000006361010161630000000000646201626400000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000621B63010000000000000000000000000000000000
+000000000000000000000000621B63631B620000000061616300606500000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+00000000001B6100000000616400006065000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000006065016264000000000000000000010000000000000065
+6000000000606500006160000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000636264006062600000000000000000010000000000000062630000000063
+6200006264650101656000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000611B00000060650000000000000000010000000000000001000000000000010000016264
+6363646260000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000062630000
+0063620000000000000000010000000000000001000000000000010000016400000000646500
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000001010101010101000000
+0001010101010101010100000062630000000063620000626300000000630100000000000000
+0000000000000000000101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000062630000000000000000000000000001
+0000000000000065600000000060650000656300000000630100000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000010000000000000000000100000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000010000
+0000000000000100000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000010000000000000000000100000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0100000000000000000100000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000100000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000061640000000000000000000000000001000000000000
+001B610000000061640000646400000000646500000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000010000000000000000000100000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000010000000000000000
+0100000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000010000000000000000000100000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000010000000000
+0000000100000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000100000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000010000000000636264630060650000000000000000010000000000000000621B6363
+1B62000000006564636364626000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000101010101
+0101000000606501016560000000000000000001000000000000000063610101616300000000
+6361620165600000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010101000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000016263000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000101
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+6465000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001006564000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001006362630000000001000060
+6501016560000000000000000000606501626400000000010061620165630000000000606501
+0165600000010000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000100001B610000000001006062646363646260
+0000000000000063626400606260000000016164636364626300000060626463636462600001
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000656000000001006164000000006461000000000000
+00611B0000006065000000011B000000001B6100000061640000000064610001000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000636200000001006263000000006362000000000000006263000000
+6362000000016300000000636200000062630000000063620001000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000001B1B000001000100000000000001000000000000000101010101010100000001
+0000000000000100000001000000000000010001000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0065630001006263000000006362000000000000006263000000000000000001630000000063
+6200000062630000000063620001000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000006065000100
+61640000000064610000000000000061640000000000000000011B000000001B610000006164
+0000000064610001000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000010000000000001B640100606264636364
+6260000000000000006362646300606500000001616463636462630000006062646363646260
+0001000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000650100006465010165600000000000
+0000000060650101656000000001006162016563000000000064650101656000000100000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000101010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010101000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000000000004000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040000000400000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400040000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000006200000000006301630000
+0000006201000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000040004000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000006164000000006401640000000064650100
+0000010000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004000000040000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000606100000000611B610000000061640000000001000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400000400000400000400000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000006200000000626362000000636200010000010101010100000001001B
+6201626400000000000000000060650162640000000001006162016563000000006065010165
+6000000001000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000000040004000000000004000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000001B64000063650065630000646100010000000100000000000001611B630060626400
+0000000000006362640060626000000001616463636462630000606264636364626000000100
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000400000000000400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040004000000040000000400000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000006065
+00006461001B6400006560000100000001000000000000011B00000000606500000000000000
+611B0000006065000000011B000000001B610000616400000000646100000100000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000400
+0000040000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400000000000400040000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000062630061640060
+6100636200000100000001000000000000016300000000636200000000000000626300000063
+6200000001630000000063620000626300000000636200000100000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000400000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000400000000
+0004000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000001B1B006263006362001B1B0000
+0100000001000000000000010000000000000100000000000000010101010101010000000100
+0000000000010000010000000000000100000100000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000400000004000000040004000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000063656362000000626362630000010000000100
+0000000000010000000000000100000000000000626300000000000000000163000000006362
+0000626300000000636200000100000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000004000400000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040000000000040004000000040000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000651B61000000611B65000000010000000100000000000001
+000000000000010000000000000061640000000000000000011B000000001B61000061640000
+0000646100000100000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000400000004000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000400000000000400000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000064016400000064011B000000010000006264000000000001000000000000
+0100000000000000636264630060650000000161646363646263000060626463636462600000
+0100000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000040000000000040000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000630163000000630163000000010000006062010100000001000000000000010000000000
+0000006065010165600000000100616201656300000000646501016560000000010000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040000000000040000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010101000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000400000004000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001010100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040000
+0000000400000000000000000004000400000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000400000004000000
+0000000000000000040000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004000400000000000000000000
+0004000400000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000040000000000000000000000040000000400
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004000400000000000000000004000000000004000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400000004000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0000000000040000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000040000000000040000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400000004000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000606101
+0100000000000063610101616300000000636101016163000000006361010161630000000000
+6361010161630000000063610101616300000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000400000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000621B63010000000000
+00621B63631B6200000000621B63631B6200000000621B63631B620000000000621B63631B62
+00000000621B63631B6200000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000100000000001B6100000000
+616400001B6100000000616400001B610000000061640000001B6100000000616400001B6100
+0000006164000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000400
+0400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000656000000000606500006560
+0000000060650000656000000000606500000065600000000060650000656000000000606500
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000040000000400000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000626300000000636200006263000000006362
+0000626300000000636200000062630000000063620000626300000000636200000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004000000000004000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000010000000000000100000100000000000001000001000000
+0000000100000001000000000000010000010000000000000100000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000400000000000400000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000010000000000000100000100000000000001000001000000000000010000
+0001000000000000010000010000000000000100000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004000000040000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000626300000000636200006263000000006362000062630000000063620000006263000000
+0063620000626300000000636200000000000000000000000000000000010101010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000040004000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010101010100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000065600000
+0000606500006560000000006065000065600000000060650000006560000000006065000065
+6000000000606500000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000000000004
+0000000000000000000000000000000000000000000000000000000000000000000004040000
+0000040000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000100000000001B610000000061640000
+1B6100000000616400001B610000000061640000001B6100000000616400001B610000000061
+6400000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040000000400000000000000
+0000000000000000000000000000000000000000000000000000000004040400000400000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000621B63631B6200000000621B63631B
+6200000000621B63631B620000000000621B63631B6200000000621B63631B62000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000400040000000000000000000000000000
+0000000000000000000000000000000000000400000400000404040000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001010101010101000000636101016163000000006361010161630000000063
+6101016163000000000063610101616300000000636101016163000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000000000000000000000000000000000000000000
+0000000000000000000000000004040000040004040000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000400040000000000000000000000000000000000000000000004000000
+0000040000000000040004000400040000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000040000000400000000000000000000000000000000000000000000040000000400000000
+0000000400040000000400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000101010000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000621B6300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004000000000404000000
+0004000000000000000000000000000000000000000000000400040000000000000004000400
+0000000004000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000063610161600000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040000000400000000000000000000
+0000000000000000000000000000000000000004000000000000000400000004000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000631B626564000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000400040000000000000000000000000000000000
+0000000000000000000000000400040000000000040000000000040000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000006465621B63000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004000000000000000000000000000000000000000000000000
+0000000000040000000400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000001B0101610000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400040000000000000000000000000000000000000000000000000000000400
+0000000004000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000063
+1B626560001B6100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0000000400000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000636162616300000063
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000400000000000400
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000006065621B63000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004000000000004000004000000
+0000040000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000006564000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000040000000400000000040000000400000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400040000000000000400040000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000006461000000000061640000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000000000000000004000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000626000
+0000000060650000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010101
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000400040000000000000400040000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001010100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000004000000
+0400000000040000000400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000626300000000006362000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000400000000000400000400
+0000000004000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000611B00000000001B61000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+000000000000000000000063621B6300631B6263000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000006361620162616300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000400
+0000000004000000000000000000000000000000000004000000000004000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000000040000
+0000000000000000000000000000000000040000000400040000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000646562010101010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040004000000000000000000
+0000000000000000000000000400040004000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000064626063000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000400000000000400000000000000000000
+0000000000000004000400000004000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000062600000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000040004000000040000000000000000000000000004000000
+0400040000000400000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004000000040004000000000000000000000000000000040004000400040004
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0062630000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400000000000400000000000000000000000000000000000400040000000400000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000001B1B000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0004000000000000000004000000000004000004000000040004000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000611B6300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000400000004000000
+0000000000040000000400000400040004000000040000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000101010101010101010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040000000000040000000000000000
+0400040000040000000400000000000400000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000400000400
+0000000004000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040004000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000004000000040000000000000400000000000400
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000006065
+6201000065600000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000400000000000400000000000004000000040000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000646260630100006065
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040000000000040000040004000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000626000000100000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400000004000000000400000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000100006301000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004000400000000040004000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000656400000100006465000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000004000000
+0004000000040004000000000004000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+000000000060621B630163646263000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000400000000000400040000040000000000
+0400040000000400000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+6361620162616300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0101000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000400000000
+0004000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000000040000000400000000000000040000040004
+0400000400000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000101010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004000000040000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040004000000000004000000000000000400000404000004000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040004000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040400000000040000000000000000000004040404000400000400000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000400000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0404000004000000000000000000000004040004040000040000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000030003030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040004000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000400000404040000
+0000000400000004000404000404040404000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000303030303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000004000000040000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040000000004040000000000000400
+0000040400000404000404000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000030303
+0303030303030303030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000646200000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040000
+0000000400000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000400040000000000000004000404040004
+0004040004040004000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003030303030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001010101010101
+0101626000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000040000000400000000000000040000000400000404000004
+0400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030303030303030303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004000000000004000000000004040400040004040000040004040000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000030303030303030303030303030303030303000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000400000404000004040000000400000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003030303030303030303030303030303030303030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000001B620101010101010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040004000404040404000400040004000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030303030303030303030303030303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000001B61630100631B61000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000060610101000000000000636101016163
+0000000063610101616300000000636101016163000000000063610101616300000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000040000040400000004000000040000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0303030000000000030303030303030300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000006263000100000064610000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000621B6301000000000000621B63631B6200000000621B
+63631B6200000000621B63631B620000000000621B63631B6200000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040404
+0400000400000000000400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000003030303030303030000000000
+0000000003030303030303000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0100000000620000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000100000000001B6100000000616400001B6100000000616400
+001B610000000061640000001B61000000006164000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000040400000400000400
+0000040404000000040404000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000303030303030300000000000000000000000303
+0303030303030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000616400626000006362
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000065600000000060650000656000000000606500006560000000
+0060650000006560000000006065000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004040004000004000004000400040404
+0004040404000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000303030303030300000000000000000000000003030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+00000000000000000000000000000000000000000000006362001B6563636161000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000062630000000063620000626300000000636200006263000000006362000000
+6263000000006362000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000000040000000004040004000404040404040000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000030303030303030000000000000000000000000000030303030303030300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000006162626163000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0001000000000000010000010000000000000100000100000000000001000000010000000000
+0001000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000400000000000400000000040400040404040404000004000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000303
+0303030303000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000100000000
+0000010000010000000000000100000100000000000001000000010000000000000100000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000040404040404040404000400000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000303030303030300
+0000000000000000000000000000000303030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000006263000000006362000062
+6300000000636200006263000000006362000000626300000000636200000000000000000000
+0000000000010101010100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004000004040404040404040000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030303030303030000000000000000
+0000000000000000000003030303030303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001010101010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000006560000000006065000065600000000060
+6500006560000000006065000000656000000000606500000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400000404040404040004040400040000000000000000000000000000000000000000000000
+0000000000000000000000000000000003030303030303000000000000000000000000000000
+0000000000030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000001B6100000000616400001B6100000000616400001B6100
+00000061640000001B6100000000616400000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000004040000
+0404000400040404000000000000000000000000000000000000000000000000000000000000
+0000000000000000000003030303030303000000000000000000000000000000000000000003
+0303030303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000001010101010101010101010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000001000000000000621B63631B6200000000621B63631B6200000000621B63631B620000
+000000621B63631B620000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000404000000000404000400
+0400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000303030303030300000000000000000000000000000000000000000000030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010101010101
+0100000063610101616300000000636101016163000000006361010161630000000000636101
+0161630000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000400040004000400040000
+0004000000000000000000000000000000000000000000000000000000000000000003030303
+0303030300000000000000000000000000000000000000000000030303030303030300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000400040004000400040004000000
+0000000000000000000000000000000000000000000000000000000000000303030300000000
+0000000000000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001010100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040004040404040004040404000000000000000000
+0000000000000000000000000000000000000000000003030303030303000000000000000000
+0000000000000000000000000000000303030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010101000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000000040404040404040400000000000000000000000000000000
+0000000000000000000000000000000303030303030303000000000000000000000000000000
+0000000000000000000003030303030303000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004000404040404040000040000000000000000000000000000000000000000
+0000000000000000000303030303030300000000000000000000000000000000000000000000
+0000000003030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400040004040404040004000000000000000000000000000000000000000000000000000000
+0000030303030303030000000000000000000000000000000000000000000000000000000003
+0303030303030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000400040404
+0404040400000000000000000000000000000000000000000000000000000000000003030303
+0303030000000000000000000000000000000000000000000000000000000000030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000064656201010101010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040004040404040404040400
+0400000000000000000000000000000000000000000000000000000303030303030303000000
+0000000000000000000000000000000000000000000000000000030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000006462606300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000404000400000404040404000000040000
+0000000000000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000006260000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000040004000400040004000400000000000000
+0000000000000000000000000000000303030303030300000000000000000000000000000000
+0000000000000000000000000000000303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004000404040404000404040400000000000000000000000000
+0000000000000000000003030303000000000000000000000000000000000000000000000000
+0000000000000000000303030303030303000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000626300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004040404040404040000000000000000000000000000000000000000
+0000030303030303030000000000000000000000000000000000000000000000000000000000
+0000000003030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+00000000000000000000000000000000000000000000001B1B00000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000400040404040404000004000000000000000000000000000000000000000003030303
+0303030000000000000000000000000000000000000000000000000000000000000000000303
+0303030303030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000611B630000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000004000400
+0404040404000400000000000000000000000000000000000000000303030303030300000000
+0000000000000000000000000000000000000000000000000000000000000003030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010101010101010101000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010101000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000040004040404040404
+0000040000000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000003030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000101
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004000404040404040404040404000004
+0000000000000000000000000000030303030303030000000000000000000000000000000000
+0000000000000000000000000000000000000000030303030303030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040400040000040404040400040404040000000000
+0000000000000000030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000030303030303030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004040404040404040404000000000000000000000000
+0003030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000030303030303030300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000606562010000656000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000400000404040404040400000000000000000000000000000000030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000303030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000064626063010000606500000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040404040404040000040000000000000000000000030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000062600000010000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000404
+0004040404040404000400000000000000000000000003030300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000010000630100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000400040404040404
+0404040000000000000000000000030303030303030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0065640000010000646500000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004040404040404040404040004
+0000000000000003030303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000003030303030303000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000060621B6301
+6364626300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000004000000000404040004000404040000000000
+0003030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000003030303030303000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000063616201626163000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040004040400040404000000000000030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003030303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000400040404040400000400000000000003030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0003030303030303030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000006000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040004000404040000040400000000030303030303030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000003030303
+0303030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000006265600000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400040404040404040004000000000303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003030303030303030000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000064626564000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000404040004
+0404000400040403030303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+1B62626400000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040404000004040404000404
+0404030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000030303030303030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000001B016264
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000404040404040404040403030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000030303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000636201000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040400040404040404040403030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000303030303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000001B016264000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040004000404040404040304030303000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000646265640000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400040404040404030403040403030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0303000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000006462656000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004040404040404040304040404000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000030303030303030300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000062
+6160000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000404040404
+0004040404040404000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000063000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000040400040304040404
+0400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000303030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040004030404040404030004000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000003030303030303000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000001010001010101010101010100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001010100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000400040404040404000404000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003030303030303000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000101010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004040404040404040400040400000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000303
+0303030303030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003040404030404040404040400000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000303030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030403030404040404040004000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000003030303030303000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000101010101
+0101010162640000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000003030304
+0400040404000400000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000611B6300631B61636062
+6400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000003030303030404030404040404
+0000040000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000003030303030303030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000006164000000000064610064650000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000003030400040404040404000404040400
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000006263000000000063620063010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000003030303030304040400040404040404040400000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000030303030303030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000163000000000063010000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003030303030303040004000404040404040000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000003030303
+0303030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000006564000000000064650060650000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000303000000000400000404040404000004000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003030303030303030000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+000000000000000000000000000000000000000000000000000000000000000000000060621B
+6300631B62630065640000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0300000000040404040404000404000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000006361620162616300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000606101010000000000006361010161630000000063610101
+6163000000006361010161630000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000030303030303030000000404
+0404040404040400040000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000030303030303030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000621B6301000000000000621B63631B6200000000621B63631B6200000000
+621B63631B620000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030000000000000404040404040404
+0404040400000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000100000000001B6100000000616400001B6100000000616400001B610000000061
+6400000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000003030303030303000000000004040000040404040404000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000303030303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000656000000000606500006560000000006065000065600000000060650000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000303030303030300000000000000000004040404040400040004000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000062
+6300000000636200006263000000006362000062630000000063620000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000030303000000000000000000000404000404040404000404000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0303000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000001000000000000
+0100000100000000000001000001000000000000010000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0300000000000000040400040404040400040404040000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000303030303030300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000001000000000000010000010000
+0000000001000001000000000000010000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000003030303030303000000000000
+0000000004040400040404040404040000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000062630000000063620000626300000000636200
+0062630000000063620000000000000000000000000000000001010101010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030000000000000000000000000404
+0004000404040404000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000303030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001010101010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000062000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000065600000000060650000656000000000606500006560000000
+0060650000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000303030303030303000000000000000000000000040004040404
+0400000404000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000003030303030303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000061640000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000100000000001B6100000000616400001B6100000000616400001B61000000006164000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000303030303030300000000000000000000000004000404040404040404040404
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000611B63000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000621B63631B6200000000621B63631B6200000000621B63631B6200000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000030303000000000000000000000000000000040404040404040404040400000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000303
+0303030303030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001010101010101010100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000101010101010100000063610101
+6163000000006361010161630000000063610101616300000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000003030303030303
+0000000000000000000000000000000404040404040404040404000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000003030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000303030000000000000000
+0000000000000000000004000004040404040404040400000000000000000000000000000000
+0000000000000000000000000000000000000000000000000003030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000101010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000030303000000000000000000000000000000
+0000000000000404040404040404040400000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000030303030303030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010101000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000060616201626160000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000303030303030303000000000000000000000000000000000004
+0404040404040404040400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000030303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000006062646300636462600000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003030303000000000000000000000000000000000000000000040404040404
+0404040004040000000000000000000000000000000000000000000000000000000000000000
+0000000000000000030303030303030300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000006564000000000064650000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000003
+0303030303030000000000000000000000000000000000000000000404040404040400040404
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000030303030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000163000000000063010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000003030303030303
+0000000000000000000000000000000000000000040404040404040404040400000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000003
+0303000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000016300
+0000000063010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000303030303030300000000000000
+0000000000000000000000000000000404040404040404040004040400000000000000000000
+0000000000000000000000000000000000000000000000000000000000030303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000656400000000006465
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000030303000000000000000000000000000000
+0000000000000000000004040400040404040404040000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000646264630063646260000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000303030303030300000000000000000000000000000000000000
+0000000004040004040404040404040404000000000000000000000000000000000000000000
+0000000000000000000000000000000000030303030303030300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000006061620162616000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000030303030303030000000000000000000000000000000000000000000000000000
+0404040404040404040400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000030303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0300030300000000000000000000000000000000000000000000000000000004040400040404
+0404040004000000000000000000000000000000000000000000000000000000000000000000
+0000000000000303030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030003030000
+0000000000000000000000000000000000000000000000000000040004040404040404040404
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030303030303030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000003030303000000000000000000
+0000000000000000000000000000000000000000000404040404040404040404000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0303030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000062600001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000030303030303030000000000000000000000000000
+0000000000000000000000000000000000040404040404040400040000000000000000000000
+0000000000000000000000000000000000000000000000000000000303030303030303000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000101010000000000000000000000000000000000
+0000000000000000000000000000000000000000000064620101010101010101010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000030303030303030000000000000000000000000000000000000000
+0000000000000000000004040404040404040404040400000000000000000000000000000000
+0000000000000000000000000000000000000000000003030303030303000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003030303030303030300000000000000000000000000000000000000000000000000
+0000000000000004040404040404040404000000000000000000000000000000000000000000
+0000000000000000000000000000000003030303030303030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000003
+0003030300000000000000000000000000000000000000000000000000000000000000000000
+0404040404040404040404040400000000000000000000000000000000000000000000000000
+0000000000000000000003030303030303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000003030303030000
+0000000000000000000000000000000000000000000000000000000000000000040404000404
+0404040404040400000000000000000000000000000000000000000000000000000000000000
+0000000000030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000400040404040404040404
+0400000000000000000000000000000000000000000000000000000000000000000000000003
+0303030303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000003030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000004040404040404040404040000000000
+0000000000000000000000000000000000000000000000000000000000000003030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000030303030303030000000000000000000000000000000000000000
+0000000000000000000000000000000404040404040404040404000000000000000000000000
+0000000000000000000000000000000000000000000000000000030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000040404040404040404040004000000000000000000000000000000
+0000000000000000000000000000000000000000030303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000040404040404040404040400040404000000000000000000000000000000000000
+0000000000000000000000000000030303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000006065000000610165000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003030303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400040404040404040404040400000000000000000000000000000000000000000000000000
+0000000000000000030303030303030300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000656000006465631B1B0000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000404040404
+0404040404040404000000000000000000000000000000000000000000000000000000000000
+0000000303030303030303000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000016300
+0061640063620000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004000404040404040404
+0404040000000000000000000000000000000000000000000000000000000000000000030303
+0303030303000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000006263000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000303030303030300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040404040404040404040404000000
+0000000000000000000000000000000000000000000000000000000000030303030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000626300630100006362000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003030303030303000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000404040404040404040404040000000000000000
+0000000000000000000000000000000000000000000000000303030303030303000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+00000000000000000000000000000000001B1B00616100006461000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000030303
+0303000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040404040404040404040404040004000000000000000000000000
+0000000000000000000000000000000000000303030303030303030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000006101656300006560000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003030303030303000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040404040404040404040404000404000000000000000000000000000000000000
+0000000000000000000000000003030303030303000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000303030303030303000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0404040404040404040404040400000000000000000000000000000000000000000000000000
+0000000000000303030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000030303030303030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000404040404
+0404040404040004000000000000000000000000000000000000000000000000000000000000
+0303030303030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040000040404040404040404
+0404040000000000000000000000000000000000000000000000000000000000000303030303
+0303030303000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040404040404040404040404000000
+0000000000000000000000000000000000000000000000000000000003030303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000646200000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000030000000003030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000004040404040404040400040000000000000000
+0000000000000000000000000000000000000000000003030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010101010101010101626000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030003000003030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000404040404040404040404040000000000000000000000000000
+0000000000000000000000000000000000030303030303030303000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000030303030303030303000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404040004040404040404000400000000000000000000000000000000000000
+0000000000000000000003030303030303030303000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0060650000006101650000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001010100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000030303030303030303000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004000404040404040400040400000000000000000000000000000000000000000000000000
+0000000303030303030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010101000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000006560000064
+65631B1B00000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003030303030303000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000004040404
+0404040404040400040000000000000000000000000000000000000000000000000000000000
+0303030303030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000163000061640063620000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000003030303
+0303030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004000404040404040404
+0004000000000000000000000000000000000000000000000000000000000000030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000062630000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000030303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004040404040404040404040000
+0000000000000000000000000000000000000000000000000000030303030303030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000006263006301000063620000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000300
+0000000000000000000000000000000000000000000303030303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000404000404040404040404040400000000000000
+0000000000000000000000000000000000000000000303030303030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000001B1B006161000064610000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000300000000000000
+0000000000000000000000000000030003030303030303030303000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000400040404040404040404040400000000000000000000000000
+0000000000000000000000000000000003030303030303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000061016563000065600000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000300000000000000000300000000
+0000000000000000030303030303030003000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004040404040404040404040000040000000000000000000000000000000000
+0000000000000000000303030303030303030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000303030303030300000000000303000300000300000300
+0003030303030303000003000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0404040004040404040404040004000000000000000000000000000000000000000000000000
+0000000000030303030303030303030303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003000000000300000300000300030303000300000300000303030303030303
+0000000003000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040404
+0404040404000404000000000000000000000000000000000000000000000000000000000303
+0303030303030303030303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0003000000000300000300000303030303030300000300000303030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004040404040404040404
+0404000000000000000000000000000000000000000000000000000000000003030303030303
+0303030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000006065620100006560000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000300030000
+0303030303030303030303030303030303030303030303030300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040404040404040404040400000000
+0000000000000000000000000000000000000000000000000000030303030303030303030303
+0303000300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000646260630100006065000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000006061010100000000000063610101616300000000636101016163000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030303030303030300000003030303
+0303030303030300030303030303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040404040404040404040404000400000000000000
+0000000000000000000000000000000000000000000303030303030303030303030000030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000626000000100000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+621B6301000000000000621B63631B6200000000621B63631B62000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000030000000000000000000000000000030003000300030300000003030003030003030300
+0300030303030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000400040404040404040404040000000000000000000000000000
+0000000000000000000000000000000003030303030303030303030300030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000100006301000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000001B6100000000616400001B610000000061640000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000003000000
+0003000000000000000000030003030303030303030303030303030003000303030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004000404040404040404040004000400000000000000000000000000000000
+0000000000000000000000030303030303030303030303030303030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000065640000010000
+6465000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000656000
+0000006065000065600000000060650000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000300000000000003000000000300000000
+0300030303030303030303030300000003030303030303000000000303000300000303030000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000040404040404040404040400040000000000000000000000000000000000000000000000
+0000000000030303030303030303030303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000060621B63016364626300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000626300000000636200
+0062630000000063620000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000300000003030303030303000300000000030000030003
+0003000303030303030303000003000000000000000303000300000003000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040404
+0404040404040404040400000000000000000000000000000000000000000000000000000303
+0303030303030303030303030303030300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000636162016261630000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000010000000000000100000100000000
+0000010000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000300000003000003000303030303030300030000030003000300000003
+0300000003000003000000000303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004040404040404040404
+0404040000000000000000000000000000000000000000000000000000000000030303030303
+0303030303030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000010000000000000100000100000000000001000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0303030303030303000003000003000300030303030303030303030300000000030000000000
+0003000000000000000300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004040404040404040404040400040400
+0000000000000000000000000000000000000000000000000000000303030303030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000626300000000636200006263000000006362000000000000000000
+0000000000000001010101010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000030000
+0003000003000003000300000000030000030000000000000000030000000000000000000000
+0000000300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000404040404040404040404040004000400000000
+0000000000000000000000000000000000000000000303030303030303030303030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000101010101000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001010101010101010100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000656000000000606500006560000000006065000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000030303030303030303
+0303030303000300030000030000000000000000000000000000000000000000000000030000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000404040404040404040404040400040000000000000000000000
+0000000000000000000000000000000003030303030303030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+631B610000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000100000000001B
+6100000000616400001B61000000006164000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030000000300000000000300000000
+0300030000030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404040404040404040404040404000004000000000000000000000000000000
+0000000000000000000000000303030303030303030303030300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000000001B1B0000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000621B63631B62
+00000000621B63631B6200000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000300000000000300000000030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0404040404040404040404040404000400000000000000000000000000000000000000000000
+0000000000000303030303030303030303030303030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000063620000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001010101010101000000636101016163000000006361
+0101616300000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000300000000000300030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000400040404
+0404040404040404040000000000000000000000000000000000000000000000000000000000
+0003030303030303030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004040404040404040404
+0404040404000000000000000000000000000000000000000000000000000000030303030303
+0303030303030303030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000060620000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000101010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004040004040404040404040404040404
+0404000000000000000000000000000000000000000000000000000303030303030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001010100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000636062640000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003000000000000000000
+0000000000000000030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400000404040404040404040404040404040000000000
+0000000000000000000000000000000000000000000303030303030303030303030303000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010101
+0101016564000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000003000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000404040404040404040404040404000000000000000000000000
+0000000000000000000000000000000303030303030303030303030303030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000003000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404040404040404040404040404040000040000000000000000000000000000
+0000000000000000000003030303030303030303030303000003000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000003030303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004040404040404040404040404040004000000000000000000000000000000000000000000
+0000000000000303030303030303030303030303000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000040000040404
+0404040404040404040400000400000000000000000000000000000000000000000000000303
+0303030303030303030303030303000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010101010101010101010101000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004040404040404040404
+0404040400040400000000000000000000000000000000000000000000000000000303030303
+0303030303030303030303000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000611B6300631B6100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004040404040404040404040404040404
+0404000000000000000000000000000000000000000000000000000303030303030303030303
+0303000003000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000061
+6400000000001B61000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000004040404040404040404040404040000000004
+0000000000000000000000000000000000000303030303030303030303030303030303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000062630000000000
+6362000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004040404040404040404040404040400040404000000000000
+0000000000000000000000000000000300000003030303030303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001630000000000630100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404000404040404040404040404040404040400000000000000000000000000
+0000000000000000000300000003030303030303030303030303030300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000065640000000000646500000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0400040404040404040404040404040404040400000000000000000000000000000000000000
+0000000300000003030303030303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000063621B6300631B626300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001010100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000404040404
+0404040404040404040404040404000000000000000000000000000000000000000000000000
+0000000303030303030303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0101010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000636162016261630000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040404040404040404040404
+0404040404040404000400000000000000000000000000000000000000000000000003030303
+0303030303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000404040404040404040404040404
+0404040000000400000000000000000000000000000000000000000003030303030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000404040404040404040404040404040404040404
+0000000000000000000000000000000000000000000303030303030303030303030300000300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040004040404040404040404040404040404040400040000000000
+0000000000000000000000000000000000030303030303030303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000060656201000065600000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404040404040404040404040404040404040004000004000000000000000000
+0000000000000000000000030303030303030303030303030300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000006462606301000060650000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000040404040404040404040404040404040400000400000000000000000000000000000000
+0000000003030303030303030303030303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000006260000001000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040404
+0404040404040404040404040404040000000000000000000000000000000000000000000003
+0303030303030303030303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000001000063010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000040404040404040404
+0404040404040404040404000000000000000000000000000000000000000003030303030303
+0303030303030303030300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000656400
+0001000064650000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004040404040404040404040404040404
+0404040400000000000000000000000000000000000000000000030303030303030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+000000000000000000000000000000000000000000000000000000000060621B630163646263
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040004040404040404040404040404040404040004
+0000000000040000000000000000000000000003030303030303030303030303030303030000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000006361620162616300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000004040404040404040404040404040404000400040000000400
+0000000000000000000000000000030303030303030303030303030303030303030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400040404040404040404040404040404040400000400040400000000000000
+0000000000000000030303030303030303030303030303030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0000040404040404040404040404040404040404040004040004000000000000000000000000
+0000030303030303030303030303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000620000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000404040404
+0404040404040404040404040404040404040400000000000000000000000000000003030303
+0303030303030303030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000061
+6400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004040004040404040404
+0404040404040404040400040400000000000000000000000000000000000003030303030303
+0303030303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000611B63000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000004040404040404040404040404040404
+0404040404000004000000000000000000000000000000030303030303030303030303030303
+0303030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001010101010101010100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400000404040404040404040404040404040404040004
+0000000000000000000000000000000003030303030303030303030303030303030303000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040404040404040404040404040404040404040404040400000000
+0000000000000000000000000003030303030303030303030303030303000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000004040000040400040404040404040404040404040404040400000000000000000000
+0000000000000003030303030303030303030303030303000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040400
+0000000404040404040404040404040404040404000400000000000000000000000000000000
+0003030303030303030303030303030303030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000404
+0004040404040404040404040400040000000000000000000000000000000000000003030303
+0303030303030303030303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000040400000404040404
+0404040404040404000404000000000004000000000000000000000303030303030303030303
+0303030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000003000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040404040404040404040404
+0404040400040000000400000000000000000000000303030303030303030303030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000003000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000004000004040404040404040404040404040000
+0400040000000000000000000000000000000303030303030303030303030300000300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000101010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400040404040404040404040404000000000400000000
+0000000000000000000000000303030303030303030303030303000300000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000003000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010101000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000630000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000303030303030300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004040404040404040404040404040400040004000000000000000000
+0000000000030303030303030303030303030303030303030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000003000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0060000001000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404040404040404040404040404040400040404040000000004000000000303
+0303030303030303030303030303030303030300000000000000000000000000000000000000
+0000000000000000000000000000000000000003030303030303000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000101610163
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000300000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0404040404040404040404040404040400040404040000000400000000000000000303030303
+0303030303030300030303030000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000003000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000060610101626501630000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000404040404040404
+0404040404040404040004000400000400040000000000000000030303030303030303030303
+0303030303030303030000000000000000000000000000000000000000000000000000000000
+0000000000000000000003000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000163641B01016261000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000404040404040404040404040404
+0404000400040000000004000000000000000000000303030303030303030303030303030303
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0003030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000006164630100000001636461000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000004040404040404040404040404040404000400
+0404040400040004000000000000000000030303000303030303030003030303000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000006162010161646301000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004040404040404040404040404040404040004000404000000
+0400000000000000000000030303030303030303030303030303030303000000000000000000
+0000000000000000000000000000000000000000000000000000000000000300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000630165620101616463000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004040404040404040404040404040404040400040404040004000400000000
+0000000000000300000303030303030003030303030300030000000000030000000000000000
+0000000000000000000000000000000000000000000000000300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100006301616201000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004040404040404040404040404040404040004040000000400000000000000000000000000
+0303030303030303030303030303030303030000000000030000000000000000000000000000
+0000000000000000000000000000000303030303030300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000100
+0060000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000040004040404
+0404040404040404040404040404040404040004000400000000000000000000000000030303
+0303030303030303030303030000000300030000000000000000000000000000000000000000
+0000000000000000000000000300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000630000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000006061010100000000
+0000636101016163000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004000404040404040404
+0404040404040400040404000000040000000000000000000000000303030303030303030303
+0303030303030303030303030303030000000000000000000000000000000000000000000000
+0000000000000300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000621B6301000000000000621B6363
+1B62000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000400040404040404040404040404040404
+0404040404040004000400000000000000000000000000030303030303030303030303030303
+0000000300030000000000000000000000000000000000000000000000000000000000000000
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000001B61000000006164000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004040404040404040404040404040404040404040000
+0400000000000000000000000000000303030303030303030303030303030303030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000006560000000006065000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000404040404040404040404040404040404040404040004000400000000
+0000000000000000000000000303030303030303030303030303000000030003000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000006263000000006362000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000040404040404040404040404040404040400000404040400000000000000
+0000000303030303030303030303030303030303030000030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000100000000000001000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004040404040404040404040404040404040404040004040000000000000000000000000000
+0303030303030303030303030300030000030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000100000000000001000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000400040404
+0404040404040404040404040004040404000000000000000000000000000000030303030303
+0303030303030303030000030003030000000300000000000000000000000000000300000000
+0000000000000000030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000626300
+0000006362000000000000000000000000000000000101010101000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040004040404040404040404
+0404040004040400040400000000000000000000000000030303030303030303030303030303
+0303030303030003030000000300000000000000000000000000000300000000000000000000
+0000030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000101010101000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000656000000000606500
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004040404040400040004000004
+0004040404000000000000000000000000000000030303030303030303030303030303000003
+0003030000000300000000000000000000000000000300000000000000000000000003000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000100000000001B6100000000616400000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000404040404040404000000040400040404000404
+0000000000000000000000030303030303030303030303030303030303030303030303030303
+0303030300000000000000000303030303030300000000000003030303030303000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000001000000000000621B63631B620000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040404040404040404040404040404040404040004040400040004
+0000000000000000030303030303030303040303030303040303030303000000030000000000
+0000000000000000000300000000000300000000000003000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010101010101010000006361010161630000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000004040404040404040404040404040404000404040004000400000000000000
+0000030003030303030303030403030304000303030303000000030000000000000000000000
+0000000300000000000300000000000003000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0404040404040404040404040400040404040404000400040000000000000000000003000303
+0303030303030304030403000303030303000000030000000000000000000000000000030000
+0000000300000000000003000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010101000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000404040404
+0404040404040404040404040404040404000000040000000000000303030303030403030304
+0304040303040303030303030303000000000000000000030000000003030000030303030303
+0300000000000000000000000000000000000000000003000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001010100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000040004040404040404040404
+0404040404040404040400040004000000000000000003030303030304030303040403040400
+0303030303000300000000000000000000030000000003030000000000030000000000000000
+0000000000000000000000000000000003000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000404040404040404040404040404040404
+0404040004000400000000000000000003030303030303040304040403040400030303030300
+0300000000000000000000030000000003030000000000030000000000000000000000000000
+0000000000000000000003000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000040404040404040404040404000404040404040404040004
+0004000000000003030303030303030303030404030304030304030303030303030303030000
+0000030303030303030303030303030000030000000000000000000000000000000000000000
+0003030303030303000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000404040404040404040404040404040404040404040404040004000000
+0000000003030000030303040304030403040300030303030300030300000000000000000003
+0000000003030003000000030000000000000300000000000000000000000000000000000300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000040004040404040404040404040404040404040404040400000400000000000000000303
+0000030304030303040303030400030303030300030300000000000000000003000000000303
+0003000000030000000000000300000000000000000000000000000000000300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000400040404
+0404040404040404040404040404040404040400040004000000000000000303000003040303
+0304030403030304030303030300030300000000000000000003000000000303000300000003
+0000000000000300000000000000000000000000000000000300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000030303030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000040404040404
+0404040404040404040404000004000000000000000000000003030303030303030303030303
+0303030303030303030303030300000000000000000000000303030303030303030303030303
+0303030300000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004040404040404040404040404
+0404040404040400040000000000000000000000000003030303030303030303030003030303
+0300030300000000000000000000000000000000000300000003000000000000030000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000004000404040404040404040404040404040404040404
+0404000404000004000000000004000003040303030304040303030304040303030003030300
+0300000300000300000000030003000303000003030000000000030000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000040404040404040404040404040404040404040404040404040400
+0000040000000400000003030403030304040403030404030303030003030300030000030000
+0300000000030003000303000003030000000000030000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000400040404040404040404040404040404040404040404000000000000040004
+0000000003030304030403030404040403030303030000030300030000030000030000000003
+0003000303000000030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000101010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0004000004040404040404040404040404040400040400000000000000000400000303030303
+0303040303030304040303030303030303030303030303030303030303030303030303030303
+0303030303030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010101000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000040004040404
+0404040404040404040404040404040404000000000000040004000000000303030403040303
+0404040403030303030000030300030000030000030000000003000300030300000003000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000004000004040404040404040404
+0404040404040404040004040000000004000000040000000303040303030404040303040403
+0303030000030300030000030000030000000003000300030300000003000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000404000404040404040404040404040404040404
+0404040404040400000400000000000400040404040403040404040403040404030303030303
+0300030303030000030300030003030303030303030303030300030303000000000000000000
+0000000000000003000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000040004000404040404040404040404040404040404040404
+0000040004000000040000000404030404040404040304040403030303030303030003030303
+0000000300030000030303000303030303030300030303000000000000000000000000000000
+0003000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000400040004040404040404040404040404040404040404000400000004
+0004000000000304040404040404040404040303030303030303030003030303000000030003
+0000030303000303030303030300030303000000000000000000000000000000000300000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000004000400040400040404040404040404040404040000040000000000040000030303
+0303040403040403040404030303030303030303030303030303030303030303030303030303
+0303030303030303030303030303000000000000000000000303030303030300000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040004
+0004040404040404040404040404040404040404000400000004000400000000030404040404
+0404040404040303030303030303030003030303000000030003000003030300030303030303
+0300030303000000000000000000000000000000000300000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004000400040404040404
+0404040404040404040404040404000004000400000004000000040403040404040404030404
+0403030303030303030003030303000000030003000003030300030303030303030003030300
+0000000000000000000000000000000300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000400040004040404040404040404040404
+0404040404040404040000040000000000040004040304040304040404040304040403030303
+0303030003030303000000030003000003030300030303030303030003030300000000000000
+0000000000000000000300000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000400040404040404040404040404040404040404040404
+0404040000040404000003040404040404040304040404040304040403040303030303030303
+0303000003030003030303030303030303030303030303030300000303000000000000000000
+0000000000000000030000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000004000404040404040404040404040404040404040404040404000000
+0404000004040000040404040404040404030404040304030303030303030303030300000303
+0003030303030303030303030303030303030300000303000000000000000000000000000000
+0000030000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000040004040404040404040404040404040404040404040000040004000404040400
+0000000404040404040404040404030403030303030303030303030300000303000303030303
+0303030303030303030303030300000303000000000000000000000000000000000003000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0400040404040404040404040404040404040404000000000400000304040303030303030404
+0404040304040403040303030303030303030303030303030303030303030303030303030303
+0303030303030303030303030303000000000000000000000003030303030303000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000004000404040404
+0404040404040404040404040404040000040004000404040400000000040404040404040404
+0404030403030303030303030303030300000303000303030303030303030303030303030303
+0300000303000000000000000000000000000000000003000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000400040404040404040404040404
+0404040404040404040404000000040400000404000004040404040404040403040404030403
+0303030303030303030300000303000303030303030303030303030303030303030000030300
+0000000000000000000000000000000003000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000040004040404040404040404040404040404040404
+0404040404000004040400000304040404040404030404040404030404040304030303030303
+0303030300000303000303030303030303030303030303030303030000030300000000000000
+0000000000000000000003000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000004040004040404040404
+0404040404040404040404040404040404040404040404040404040403040404040403040404
+0403030303030303030303030303030303030303030303030303030303030303030303030303
+0300030303000000030003000303030000000300000000000000000000030000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000040400040404000404040404040404
+0404040404040404040404040404040404000404040404040404040404040404030303030303
+0303030303030303030303030303030303030303030303030303030303030303030003030300
+0000030003000303030000000300000000000000000000030000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000404040404040404040404040404040404040404
+0404040404040404040400000004040404040404040404040403030303030303030303030303
+0303030303030303030303030303030303030303030303030303030003030300000003000300
+0303030000000300000000000000000000030000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010101
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004040004040400040404040404040404040004040404040404
+0404040000000003040404040403040404040303030303030303030303030303030303030303
+0303030303030303030303030303030303030303030303030303030303030303030303030303
+0303030300000000030303030303030000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001010100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404040404040404040404040404040404040404040404040404040404040000
+0004040404040404040404040403030303030303030303030303030303030303030303030303
+0303030303030303030303030303030003030300000003000300030303000000030000000000
+0000000000030000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0400040404000404040404040404040404040404040404040404040404040400040404040404
+0404040404040404030303030303030303030303030303030303030303030303030303030303
+0303030303030303030003030300000003000300030303000000030000000000000000000003
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000404000404040404
+0404040404040404040404040404040404040404040404040404040404040304040404040304
+0404040303030303030303030303030303030303030303030303030303030303030303030303
+0303030003030300000003000300030303000000030000000000000000000003000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000606101010000000000000000000000
+0000000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000621B63010000000000000000000000000000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000040400
+0404000404040404040404040404040404040404040404040404040404040404040404040404
+0404040404040404040303040303030303040303030303030303030303030303030303030303
+0303030303030303030303030303030303000303030000030303030303000000000303030300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000100000000000000000000000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000010000000000000000000100
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000000000000000
+0000000000000000000100000000000000000100000000000000000000000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000010404000404040404
+0401040404040404040404040404040404040404040404040404040404040404040404040404
+0404030304030403030304030303030303030303030303030303030303030303030303030303
+0303030303030303030303000303030000030303030303000000000303030300000000000000
+0000000000000000000000000100000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000000000000000000000000000000000100000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000100000000000000000000000000000000000000000000000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000000000000000000000000000010000000000000000000100000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000000000000000000000000000
+0000000100000000000000000100000000000000000000000000000000000000000000000000
+0000000100000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000010004040404040404040404040404
+0404040404040404040404040404040404040404040404040404040404040404040403040303
+0304030403030303030303030303030303030303030303030303030303030303030303030303
+0303030303000303030000030303030303000000000303030300000000000000000000000000
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000000000000000000000000000000000100000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010101010101010101
+0101010101010101010101010101010101010101010101010101010101010100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000004040404040404040404040404040404040404040404040404
+0404040404040404040404040404040404040404040403040303030403040303030303030303
+0303030303030303030303030303030303030303030303030303030303030300030303000003
+0303030303000000000303030300000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000404000404040404040004040404040404040404040404040404040404040404
+0404040404040404040404040404040403030403040303030403030303030303030303030303
+0303030303030303030303030303030303030303030303030300030303000003030303030300
+0000000303030300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000004
+0400040400040404040404040404040404040404040404040404040404040404040404040404
+0404040404040404040404030304030303030304030303030303030303030303030303030303
+0303030303030303030303030303030303030300030303000003030303030300000000030303
+0300000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000101010101
+0101000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000606101010000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000606101010000000000006361010161630000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000606101
+0100000000000063610101616300000000636101016163000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000060610101000000000000636101016163000000006361010161
+6300000000636101016163000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000060610101000000000000
+6361010161630000000063610101616300000000636101016163000000000063610101616300
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000006061010100000000000063610101616300000000636101016163000000006361
+0101616300000000006361010161630000000063610101616300000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000062
+1B63010000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000621B6301000000000000621B63631B620000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000621B63010000000000
+00621B63631B6200000000621B63631B62000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000621B6301000000000000621B63631B6200000000621B63631B620000000062
+1B63631B62000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000621B6301000000000000621B63631B62
+00000000621B63631B6200000000621B63631B620000000000621B63631B6200000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+621B6301000000000000621B63631B6200000000621B63631B6200000000621B63631B620000
+000000621B63631B6200000000621B63631B6200000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000100000000001B6100000000616400000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000100000000001B6100000000
+616400001B610000000061640000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000100000000001B6100000000616400001B6100000000616400001B61000000006164
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000100000000001B6100000000616400001B6100
+000000616400001B610000000061640000001B61000000006164000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000001B6100000000616400001B6100000000616400001B610000000061640000001B610000
+0000616400001B61000000006164000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000656000000000606500000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000000000656000000000606500006560
+0000000060650000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000065600000000060650000656000000000606500006560000000006065000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000065600000000060650000656000000000606500
+0065600000000060650000006560000000006065000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000656000
+0000006065000065600000000060650000656000000000606500000065600000000060650000
+6560000000006065000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000001000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000626300000000636200000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000000000626300000000636200006263000000006362
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000006263
+0000000063620000626300000000636200006263000000006362000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001000000000062630000000063620000626300000000636200006263000000
+0063620000006263000000006362000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010000000000626300000000636200
+0062630000000063620000626300000000636200000062630000000063620000626300000000
+6362000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000001000000000001
+0000000000000100000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000010000000000010000000000000100000100000000000001000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000100000000000001
+0000010000000000000100000100000000000001000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000001000000000000010000010000000000000100000100000000000001000000
+0100000000000001000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000010000000000010000000000000100000100000000
+0000010000010000000000000100000001000000000000010000010000000000000100000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000001000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000001000000000000
+0100000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000010000000000010000000000000100000100000000000001000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000100000000000001000001000000
+0000000100000100000000000001000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000100000000
+0001000000000000010000010000000000000100000100000000000001000000010000000000
+0001000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000010000000000010000000000000100000100000000000001000001
+0000000000000100000001000000000000010000010000000000000100000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000001000000000062630000000063620000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+0000626300000000636200006263000000006362000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000006263000000006362000062630000000063620000
+6263000000006362000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000100000000006263000000
+0063620000626300000000636200006263000000006362000000626300000000636200000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000010000000000626300000000636200006263000000006362000062630000000063
+6200000062630000000063620000626300000000636200000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000100
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000001000000000065600000000060650000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000001000000000065600000
+0000606500006560000000006065000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000006560000000006065000065600000000060650000656000000000
+6065000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000100000000006560000000006065000065
+6000000000606500006560000000006065000000656000000000606500000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000001
+0000000000656000000000606500006560000000006065000065600000000060650000006560
+0000000060650000656000000000606500000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000100000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000100000000001B610000000061640000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000100000000001B610000000061640000
+1B61000000006164000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0100000000001B6100000000616400001B6100000000616400001B6100000000616400000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000100000000001B6100000000616400001B610000000061
+6400001B610000000061640000001B6100000000616400000000000000000000000000000000
+000000000000000000000000000000000000000000000000000000000000000100000000001B
+6100000000616400001B6100000000616400001B610000000061640000001B61000000006164
+00001B6100000000616400000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0001000000000000621B63631B62000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001000000000000621B63631B6200000000621B63631B
+6200000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+00621B63631B6200000000621B63631B6200000000621B63631B620000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000001000000000000621B63631B6200000000621B63631B6200000000621B
+63631B620000000000621B63631B620000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000001000000000000621B63631B62
+00000000621B63631B6200000000621B63631B620000000000621B63631B6200000000621B63
+631B620000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000101010101010100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000101010101010100
+0000636101016163000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000001010101010101000000636101016163000000006361010161630000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000010101010101010000006361010161
+6300000000636101016163000000006361010161630000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0101010101010100000063610101616300000000636101016163000000006361010161630000
+0000006361010161630000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000001010101010101000000636101016163000000006361
+0101616300000000636101016163000000000063610101616300000000636101016163000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000100000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000063016100000000000000000000000000000000000001000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000100000000000000000000006101630000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000100000000000000000000000000010000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000061620000000000000000000000000000000000000001000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000010000
+0000000000000000000062610000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000100000000000000000000000000010000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+6301600000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000010000000000000000
+0000000060016300000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000100000000636101621B00000001010101010000006065016264000000000100
+1B62016264000000006361620162640065600000000000636200000000000000646500000000
+01006162621B0000616201610000000001000000006361620162640000010061620100006065
+01016560000000001B6201016560000000606501626400000000006361620162640000606501
+01656000000001001B620162640000000063650162610001000000001B620101656000000065
+6400000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+010000000062640063611B0000000100000000006362640060626000000001611B6300606264
+000063621B630060610064650000000000611B00000000000000656400000000016164636365
+1B6164636365640000000100000063621B630060610000016164000000606264636364626000
+00611B630063606500006362640060626000000063621B630060610060626463636462600000
+01611B6300606264000063626463631B6101000000611B630063606500000064610000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000010000000000
+0000006362000000010000000000611B0000006065000000011B0000000060650000611B0000
+0000000000626300000063016300000000000000626300000000016400000060016400000060
+6500000001000000611B00000000000000011B00000000616400000000646100000100000000
+00000000611B0000006065000000611B00000000000061640000000064610000011B00000000
+60650000611B000000001B010000000100000000000000000063620000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000000000000000000000000000000000000000000000000000001000000001B620101010100
+000001000000000062630000006362000000016300000000636200006263000000000000001B
+610000001B610000000000000000010000000000016300000000016300000000010000000100
+0000626300000000000000016300000000626300000000636200006561630000000000006263
+0000006362000000626300000000000062630000000063620000016300000000636200006263
+0000000063010000006561630000000000000000010000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000010000006165600000000100000001000000
+0000010101010101010000000100000000000001000001000000000000000063626300006260
+0000000000000000010000000000010000000000010000000000010000000100000001000000
+0000000000010000000000010000000000000100006361016261600000000101010101010100
+0000010000000000000001000000000000010000010000000000000100000100000000000001
+0000006361016261600000000000010000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000010000006263000000630100000001000000000062630000
+0000000000000100000000000001000062630000000000000000611B00646500000000000000
+0000626300000000010000000000010000000000010000000100000062630000000000000001
+0000000000626300000000636200000000006364656100006263000000000000000062630000
+0000000062630000000063620000010000000000000100006263000000006301000000000000
+6364656100000063620000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000100000062630000001B0100000001000000000061640000000000000000
+01000000000000010000611B0000000000000000636200656400000000000000000061640000
+00000100000000000100000000000100000001000000611B0000000000000001000000000061
+64000000006461000000000000006301000061640000000000000000611B0000000000006164
+000000006461000001000000000000010000611B000000001B01000000000000000063010000
+0064610000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+000001000000616163631B610100000062640000000063626463006065000000010000000000
+0001000063621B6300606100000000651B620000000000000000000064650000000001000000
+0000010000000000010000000100000063621B63006061000001000000000060626463636462
+60000065646300631B6500006362646300606500000063621B63006061006062646363646260
+000001000000000000010000636264636364610100000065646300631B650000006564000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000001000000
+6361620161000100000060620101000000606501016560000000010000000000000100000063
+61620165640000000060011B0000000000000000000063016000000001000000000001000000
+0000010000000100000000636162016564000001000000000000646501016560000000606162
+01621B0000000060650101656000000000636162016564000064650101656000000001000000
+000000010000006365016261000100000060616201621B000000600163000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000001630000000000000000000000616200000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000626100000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+00000000000000000000000000000000000000000000000000000000000000000000631B6100
+0000000000000000000000630161000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000061016300000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000101610000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000000000000000
+0000000000000000
+
+end
+%%PageTrailer
+%%Trailer
+%%EOF
diff --git a/doc/libmicrohttpd_performance_data.png b/doc/libmicrohttpd_performance_data.png
Binary files differ.
diff --git a/doc/m1.txt b/doc/m1.txt
@@ -0,0 +1,194 @@
+Dear all,
+
+We're happy to announce reaching the first milestone for the
+STF-funded MHD 2.0 project, which is completing the MHD HTTP header
+and thus the design for the next generation API. We have now
+spent several months iterating between discussing, designing,
+optimising, editing, and testing details and are finally
+happy with the result.
+
+Key objectives for us were:
+
+- simplify application code that uses MHD
+- keep the API and the MHD code size small
+- ensure the API is extensible
+- enable use of different TLS backends, avoid backend-specific
+ settings to use backends in the same way.
+- make API work with HTTP 1.x, HTTP/2 and HTTP/3
+- preserve or improve portability across platforms
+- stay compatible to a wide range of C and C++ compilers
+
+The main changes these objectives inspired are to:
+
+- Split the MHD_AccessHandlerCallback functionality into
+ various separate callbacks to keep the API simple for
+ simple requests while allowing complex logic to be
+ incrementally introduced via the new "struct MHD_Action".
+ Main effects:
+ * improved type safety
+ * client code most likely to always need all arguments
+ passed to callbacks, while keeping rarely used
+ arguments available via the introspection API
+ * harder or impossible to make calls at the wrong time
+ or to forget to do key processing steps
+ * clients more likely to avoid repeated URL dispatching
+ * Easier to add commonly used features like a generic
+ URL dispatcher
+ * Improved modularity, easier to not compile in some
+ features (actions) to minimize code size
+- We changed how MHD is configured, providing a new
+ strongly-typed but still extensible mechanism
+ to set options, avoiding the use of 'varargs' for
+ options while also not introducing new symbols for
+ any kind of option. The new construction uses
+ either inline functions or macros depending on the
+ compiler to initialize a struct with a variant union;
+ as a result, application developers get the experience
+ of using well-typed functions, while no such functions
+ actually exist in the library, keeping the code size
+ minimal, especially if features are not even used :-).
+- Unified the way how settings are used for daemon,
+ connection and response objects.
+- Removed the separation of options and flags and
+ made it harder to pass inconsistent options
+- improved terminology across the API, in particular by
+ eliminating confusion between 'request' and 'connection',
+ but also by introducing new 'nouns' such as 'session',
+ 'stream' and 'action', but also 'String' which returns a
+ 'String' that is both 0-terminated but ALSO has a
+ known length (eliminating need for applications
+ to call strlen() on all strings returned by MHD).
+ Also changed the API to use more consistent
+ prefixes for related functions by using
+ "MHD_subject_verb_object" naming convention
+- significantly simplified for application processing of
+ client's upload. Removed the need for troublesome (for
+ application) incremental processing (especially problematic
+ for forms processing), while keeping automatic limits
+ for memory allocations, preventing by design a wide range
+ of remote attacks.
+- Added unified and detailed introspection API for library,
+ daemon, connection, stream and request objects.
+ The API is designed in the same way for all object, simplifying
+ use for the application. The new API is detailed and allow
+ application to extract any required information in a simple
+ way. Also separated "fixed" and "dynamic" properties of objects
+ for letting compiler optimise application code better.
+- Integrated HTTP status into the response object, as
+ this is way more logical and we are aware of various
+ implementations being forced to basically pass them
+ around as a tuple.
+- simplified API for common-case of one-shot responses by
+ eliminating need for destroy response in most cases
+- Improved portability by avoiding fixed types, like uint32_t,
+ as they may not exist on some platforms. Instead use
+ types like uint_fast32_t. Avoided use of enums with very
+ large bitmasks as 'int' could be just 16 bits on some platforms
+ resulting in enum values higher than 65535 being silently dropped.
+- Improved possibility of use of zero-copy style for parsing
+ uploaded data, including of the PostProcessor parser while
+ still allowing applications to do stream processing if data
+ does not fit into main memory. This both simplifies usage
+ in the common case where uploaded data is small, while also
+ nicely supporting use-cases with large data streams.
+- Made responses unmodifiable after first use. Modifiable responses
+ cannot be thread-safe. However, MHD-generated headers (Date,
+ Connection/Keep-Alive) are part of the *request* and do not count
+ as part of the immutable "response" here. Removed "footers" from
+ responses. With unmodifiable responses everything should be "headers".
+ However, footers are supported as part of a *request* instead.
+- Move response codes from MHD_HTTP_xxx namespace to MHD_HTTP_CODE_xxx
+ namespace. This avoids potential clashes with other MHD constant names.
+- Introduced various new "enums" especially for constants
+ introduced in HTTP/2 where use of these constants can
+ then avoid having to map between protocol numbers and
+ strings (but applications may still also use the strings)
+ This also includes better status codes returned from
+ API calls to diagnose issues (no more just "YES/NO")
+- Let application to use request methods as a enum, avoid repeated
+ string comparison by sharing result of the already performed
+ internal detection of the request method. Keep ability to
+ use non-standard HTTP requests methods if needed via use
+ of introspection API.
+- Introduced "MHD_APP_SOCKET_CNTX_TYPE" hack to allow
+ applications to improve type-safety by overriding
+ the type of "closure" arguments instead of using
+ "void *" pointers.
+- Significant re-design of the event loop APIs to simplify integrating
+ MHD with external event loops while preserving O(1) processing cost.
+- Added many annotations to help compiler determine invariants (if
+ supported by the compiler), such as arguments not being NULL, etc.
+- Removal of various legacy symbols only exported for API compatibility.
+
+
+While these are lots of changes, we want to give you a first brief preview of
+how this will impact client code using the library. Here is an example of how
+clients used to initialize the MHD daemon (from demo.c):
+
+OLD>>
+d = MHD_start_daemon (
+ MHD_USE_AUTO | MHD_USE_INTERNAL_POLLING_THREAD
+ | MHD_USE_ERROR_LOG,
+ (uint16_t) port,
+ NULL, NULL,
+ &generate_page,
+ NULL,
+ MHD_OPTION_CONNECTION_MEMORY_LIMIT,
+ (size_t) (256 * 1024),
+#ifdef PRODUCTION
+ MHD_OPTION_PER_IP_CONNECTION_LIMIT,
+ (unsigned int) (64),
+#endif
+ MHD_OPTION_CONNECTION_TIMEOUT,
+ (unsigned int) (120 /* seconds */),
+ MHD_OPTION_THREAD_POOL_SIZE,
+ (unsigned int) NUMBER_OF_THREADS,
+ MHD_OPTION_NOTIFY_COMPLETED,
+ &response_completed_callback,
+ NULL,
+ MHD_OPTION_END);
+if (NULL == d)
+ error();
+<<
+
+This was one big variadic mess, and getting any of the
+types wrong for any of the options could result in
+trouble, sometimes depending on the target platform.
+
+With MHD 2.0, the same code will look like this:
+
+NEW>>
+d = MHD_daemon_create (&generate_page,
+ NULL);
+if (MHD_SC_OK !=
+ MHD_daemon_options_set (
+ d,
+ MHD_D_OPTION_BIND_PORT (MHD_AF_DUAL, port),
+ MHD_D_OPTION_WM_WORKER_THREADS (NUMBER_OF_THREADS),
+ MHD_D_OPTION_CONN_MEMORY_LIMIT (256*1024),
+ MHD_D_OPTION_PER_IP_LIMIT (64),
+ MHD_D_OPTION_DEFAULT_TIMEOUT (120),
+ MHD_D_OPTION_NOTIFY_CONNECTION (&response_completed_callback,
+ NULL)))
+ error();
+if (MHD_SC_OK !=
+ MHD_daemon_start (d))
+ error();
+<<
+
+Note that you can can call MHD_daemon_options_set() multiple times if you need
+to handle errors for individual options. Thanks to extensive trickery on our
+part, the resulting type-safe code should *also* be almost as compact and fast
+as the previous version (mostly, this adds two additional library API calls,
+but in return you can get more precise status codes back).
+
+
+While we thought hard about the new API and poured our experience into the
+re-design, we still might have overlooked something and thus value community
+feedback.
+
+We thank Sovereign Tech Fund for funding this work.
+
+Happy hacking!
+
+Christian & Evgeny
diff --git a/doc/run-gendocs.sh b/doc/run-gendocs.sh
@@ -0,0 +1 @@
+./gendocs.sh --email libmicrohttpd@gnu.org libmicrohttpd "GNU libmicrohttpd manual"
diff --git a/libmicrohttpd.pc.in b/libmicrohttpd.pc.in
@@ -0,0 +1,14 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libmicrohttpd2
+Description: A library for creating an embedded HTTP server
+Version: @VERSION@
+Requires:
+Requires.private: @MHD_REQ_PRIVATE@
+Conflicts:
+Libs: -L${libdir} -lmicrohttpd2
+Libs.private: @MHD_LIBDEPS_PKGCFG@
+Cflags: -I${includedir}
diff --git a/m4/.gitignore b/m4/.gitignore
@@ -0,0 +1,6 @@
+/lt~obsolete.m4
+/ltversion.m4
+/ltsugar.m4
+/ltoptions.m4
+/libtool.m4
+/c_backported.m4
diff --git a/m4/Makefile.am b/m4/Makefile.am
@@ -0,0 +1,2 @@
+# This Makefile.am is in the public domain
+EXTRA_DIST = libcurl.m4
diff --git a/m4/ac_define_dir.m4 b/m4/ac_define_dir.m4
@@ -0,0 +1,34 @@
+dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+dnl
+dnl This macro sets VARNAME to the expansion of the DIR variable,
+dnl taking care of fixing up ${prefix} and such.
+dnl
+dnl VARNAME is then offered as both an output variable and a C
+dnl preprocessor symbol.
+dnl
+dnl Example:
+dnl
+dnl AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+dnl
+dnl @category Misc
+dnl @author Stepan Kasal <kasal@ucw.cz>
+dnl @author Andreas Schwab <schwab@suse.de>
+dnl @author Guido U. Draheim <guidod@gmx.de>
+dnl @author Alexandre Oliva
+dnl @version 2006-10-13
+dnl @license AllPermissive
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
diff --git a/m4/ax_append_compile_flags.m4 b/m4/ax_append_compile_flags.m4
@@ -0,0 +1,46 @@
+# ============================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html
+# ============================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# For every FLAG1, FLAG2 it is checked whether the compiler works with the
+# flag. If it does, the flag is added FLAGS-VARIABLE
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. During the check the flag is always added to the
+# current language's flags.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: This macro depends on the AX_APPEND_FLAG and
+# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with
+# AX_APPEND_LINK_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 7
+
+AC_DEFUN([AX_APPEND_COMPILE_FLAGS],
+[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG])
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
+for flag in $1; do
+ AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4])
+done
+])dnl AX_APPEND_COMPILE_FLAGS
diff --git a/m4/ax_append_flag.m4 b/m4/ax_append_flag.m4
@@ -0,0 +1,50 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE])
+#
+# DESCRIPTION
+#
+# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space
+# added in between.
+#
+# If FLAGS-VARIABLE is not specified, the current language's flags (e.g.
+# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains
+# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly
+# FLAG.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 8
+
+AC_DEFUN([AX_APPEND_FLAG],
+[dnl
+AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF
+AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])])
+AS_VAR_SET_IF(FLAGS,[
+ AS_CASE([" AS_VAR_GET(FLAGS) "],
+ [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])],
+ [
+ AS_VAR_APPEND(FLAGS,[" $1"])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+ ],
+ [
+ AS_VAR_SET(FLAGS,[$1])
+ AC_RUN_LOG([: FLAGS="$FLAGS"])
+ ])
+AS_VAR_POPDEF([FLAGS])dnl
+])dnl AX_APPEND_FLAG
diff --git a/m4/ax_append_link_flags.m4 b/m4/ax_append_link_flags.m4
@@ -0,0 +1,44 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# For every FLAG1, FLAG2 it is checked whether the linker works with the
+# flag. If it does, the flag is added FLAGS-VARIABLE
+#
+# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is
+# used. During the check the flag is always added to the linker's flags.
+#
+# If EXTRA-FLAGS is defined, it is added to the linker's default flags
+# when the check is done. The check is thus made with the flags: "LDFLAGS
+# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
+# issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG.
+# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS.
+#
+# LICENSE
+#
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 7
+
+AC_DEFUN([AX_APPEND_LINK_FLAGS],
+[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+AX_REQUIRE_DEFINED([AX_APPEND_FLAG])
+for flag in $1; do
+ AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4])
+done
+])dnl AX_APPEND_LINK_FLAGS
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,63 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the current language's compiler
+# or gives an error. (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the current language's default
+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
+# force the compiler to issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 11
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether the _AC_LANG compiler accepts $1], CACHEVAR, [
+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+ if test x"m4_case(_AC_LANG,
+ [C], [$GCC],
+ [C++], [$GXX],
+ [Fortran], [$GFC],
+ [Fortran 77], [$G77],
+ [Objective C], [$GOBJC],
+ [Objective C++], [$GOBJCXX],
+ [no])" = xyes ; then
+ add_gnu_werror="-Werror"
+ fi
+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1 $add_gnu_werror"
+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4
@@ -0,0 +1,53 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+# Check whether the given FLAG works with the linker or gives an error.
+# (Warnings, however, are ignored)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# If EXTRA-FLAGS is defined, it is added to the linker's default flags
+# when the check is done. The check is thus made with the flags: "LDFLAGS
+# EXTRA-FLAGS FLAG". This can for example be used to force the linker to
+# issue an error when a bad flag is given.
+#
+# INPUT gives an alternative input source to AC_LINK_IFELSE.
+#
+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 6
+
+AC_DEFUN([AX_CHECK_LINK_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl
+AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [
+ ax_check_save_flags=$LDFLAGS
+ LDFLAGS="$LDFLAGS $4 $1"
+ AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+ [AS_VAR_SET(CACHEVAR,[yes])],
+ [AS_VAR_SET(CACHEVAR,[no])])
+ LDFLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+ [m4_default([$2], :)],
+ [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_LINK_FLAGS
diff --git a/m4/ax_count_cpus.m4 b/m4/ax_count_cpus.m4
@@ -0,0 +1,101 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_count_cpus.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_COUNT_CPUS([ACTION-IF-DETECTED],[ACTION-IF-NOT-DETECTED])
+#
+# DESCRIPTION
+#
+# Attempt to count the number of logical processor cores (including
+# virtual and HT cores) currently available to use on the machine and
+# place detected value in CPU_COUNT variable.
+#
+# On successful detection, ACTION-IF-DETECTED is executed if present. If
+# the detection fails, then ACTION-IF-NOT-DETECTED is triggered. The
+# default ACTION-IF-NOT-DETECTED is to set CPU_COUNT to 1.
+#
+# LICENSE
+#
+# Copyright (c) 2014,2016 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+# Copyright (c) 2012 Brian Aker <brian@tangent.org>
+# Copyright (c) 2008 Michael Paul Bailey <jinxidoru@byu.net>
+# Copyright (c) 2008 Christophe Tournayre <turn3r@users.sourceforge.net>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 22
+
+ AC_DEFUN([AX_COUNT_CPUS],[dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_EGREP])dnl
+ AC_MSG_CHECKING([the number of available CPUs])
+ CPU_COUNT="0"
+
+ # Try generic methods
+
+ # 'getconf' is POSIX utility, but '_NPROCESSORS_ONLN' and
+ # 'NPROCESSORS_ONLN' are platform-specific
+ command -v getconf >/dev/null 2>&1 && \
+ CPU_COUNT=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null` || CPU_COUNT="0"
+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v nproc >/dev/null 2>&1]],[[: # empty]],[dnl
+ # 'nproc' is part of GNU Coreutils and is widely available
+ CPU_COUNT=`OMP_NUM_THREADS='' nproc 2>/dev/null` || CPU_COUNT=`nproc 2>/dev/null` || CPU_COUNT="0"
+ ])dnl
+
+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
+ # Try platform-specific preferred methods
+ AS_CASE([[$host_os]],dnl
+ [[*linux*]],[[CPU_COUNT=`lscpu -p 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+,' -c` || CPU_COUNT="0"]],dnl
+ [[*darwin*]],[[CPU_COUNT=`sysctl -n hw.logicalcpu 2>/dev/null` || CPU_COUNT="0"]],dnl
+ [[freebsd*]],[[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n kern.smp.cpus 2>/dev/null` || CPU_COUNT="0"]],dnl
+ [[netbsd*]], [[command -v sysctl >/dev/null 2>&1 && CPU_COUNT=`sysctl -n hw.ncpuonline 2>/dev/null` || CPU_COUNT="0"]],dnl
+ [[solaris*]],[[command -v psrinfo >/dev/null 2>&1 && CPU_COUNT=`psrinfo 2>/dev/null | $EGREP -e '^@<:@0-9@:>@.*on-line' -c 2>/dev/null` || CPU_COUNT="0"]],dnl
+ [[mingw*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
+ [[msys*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]],dnl
+ [[cygwin*]],[[CPU_COUNT=`ls -qpU1 /proc/registry/HKEY_LOCAL_MACHINE/HARDWARE/DESCRIPTION/System/CentralProcessor/ 2>/dev/null | $EGREP -e '^@<:@0-9@:>@+/' -c` || CPU_COUNT="0"]]dnl
+ )dnl
+ ])dnl
+
+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null || ! command -v sysctl >/dev/null 2>&1]],[[: # empty]],[dnl
+ # Try less preferred generic method
+ # 'hw.ncpu' exist on many platforms, but not on GNU/Linux
+ CPU_COUNT=`sysctl -n hw.ncpu 2>/dev/null` || CPU_COUNT="0"
+ ])dnl
+
+ AS_IF([[test "$CPU_COUNT" -gt "0" 2>/dev/null]],[[: # empty]],[dnl
+ # Try platform-specific fallback methods
+ # They can be less accurate and slower then preferred methods
+ AS_CASE([[$host_os]],dnl
+ [[*linux*]],[[CPU_COUNT=`$EGREP -e '^processor' -c /proc/cpuinfo 2>/dev/null` || CPU_COUNT="0"]],dnl
+ [[*darwin*]],[[CPU_COUNT=`system_profiler SPHardwareDataType 2>/dev/null | $EGREP -i -e 'number of cores:'|cut -d : -f 2 -s|tr -d ' '` || CPU_COUNT="0"]],dnl
+ [[freebsd*]],[[CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+: '|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
+ [[netbsd*]], [[CPU_COUNT=`command -v cpuctl >/dev/null 2>&1 && cpuctl list 2>/dev/null| $EGREP -e '^@<:@0-9@:>@+ .* online ' -c` || \
+ CPU_COUNT=`dmesg 2>/dev/null| $EGREP -e '^cpu@<:@0-9@:>@+ at'|sort -u|$EGREP -e '^' -c` || CPU_COUNT="0"]],dnl
+ [[solaris*]],[[command -v kstat >/dev/null 2>&1 && CPU_COUNT=`kstat -m cpu_info -s state -p 2>/dev/null | $EGREP -c -e 'on-line'` || \
+ CPU_COUNT=`kstat -m cpu_info 2>/dev/null | $EGREP -c -e 'module: cpu_info'` || CPU_COUNT="0"]],dnl
+ [[mingw*]],[AS_IF([[CPU_COUNT=`reg query 'HKLM\\Hardware\\Description\\System\\CentralProcessor' 2>/dev/null | $EGREP -e '\\\\@<:@0-9@:>@+$' -c`]],dnl
+ [[: # empty]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]])],dnl
+ [[msys*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]],dnl
+ [[cygwin*]],[[test "$NUMBER_OF_PROCESSORS" -gt "0" 2>/dev/null && CPU_COUNT="$NUMBER_OF_PROCESSORS"]]dnl
+ )dnl
+ ])dnl
+
+ AS_IF([[test "x$CPU_COUNT" != "x0" && test "$CPU_COUNT" -gt 0 2>/dev/null]],[dnl
+ AC_MSG_RESULT([[$CPU_COUNT]])
+ m4_ifvaln([$1],[$1],)dnl
+ ],[dnl
+ m4_ifval([$2],[dnl
+ AS_UNSET([[CPU_COUNT]])
+ AC_MSG_RESULT([[unable to detect]])
+ $2
+ ], [dnl
+ CPU_COUNT="1"
+ AC_MSG_RESULT([[unable to detect (assuming 1)]])
+ ])dnl
+ ])dnl
+ ])dnl
diff --git a/m4/ax_have_epoll.m4 b/m4/ax_have_epoll.m4
@@ -0,0 +1,104 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_have_epoll.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# DESCRIPTION
+#
+# This macro determines whether the system supports the epoll I/O event
+# interface. A neat usage example would be:
+#
+# AX_HAVE_EPOLL(
+# [AX_CONFIG_FEATURE_ENABLE(epoll)],
+# [AX_CONFIG_FEATURE_DISABLE(epoll)])
+# AX_CONFIG_FEATURE(
+# [epoll], [This platform supports epoll(7)],
+# [HAVE_EPOLL], [This platform supports epoll(7).])
+#
+# The epoll interface was added to the Linux kernel in version 2.5.45, and
+# the macro verifies that a kernel newer than this is installed. This
+# check is somewhat unreliable if <linux/version.h> doesn't match the
+# running kernel, but it is necessary regardless, because glibc comes with
+# stubs for the epoll_create(), epoll_wait(), etc. that allow programs to
+# compile and link even if the kernel is too old; the problem would then
+# be detected only at runtime.
+#
+# Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to
+# epoll_wait(). The availability of that function can be tested with the
+# second macro. Generally speaking, it is safe to assume that
+# AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the
+# other way round.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Peter Simons <simons@cryp.to>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 12
+
+AC_DEFUN([AX_HAVE_EPOLL], [dnl
+ ax_have_epoll_cppflags="${CPPFLAGS}"
+ AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"], [], [AC_INCLUDES_DEFAULT])
+ AC_MSG_CHECKING([for Linux epoll(7) interface])
+ AC_CACHE_VAL([ax_cv_have_epoll], [dnl
+ AC_LINK_IFELSE([dnl
+ AC_LANG_PROGRAM([dnl
+#include <sys/epoll.h>
+#ifdef HAVE_LINUX_VERSION_H
+# include <linux/version.h>
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45)
+# error linux kernel version is too old to have epoll
+# endif
+#endif
+], [dnl
+int fd;
+struct epoll_event ev;
+fd = epoll_create(128);
+epoll_wait(fd, &ev, 1, 0);])],
+ [ax_cv_have_epoll=yes],
+ [ax_cv_have_epoll=no])])
+ CPPFLAGS="${ax_have_epoll_cppflags}"
+ AS_IF([test "${ax_cv_have_epoll}" = "yes"],
+ [AC_MSG_RESULT([yes])
+$1],[AC_MSG_RESULT([no])
+$2])
+])dnl
+
+AC_DEFUN([AX_HAVE_EPOLL_PWAIT], [dnl
+ ax_have_epoll_cppflags="${CPPFLAGS}"
+ AC_CHECK_HEADER([linux/version.h],
+ [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"])
+ AC_MSG_CHECKING([for Linux epoll(7) interface with signals extension])
+ AC_CACHE_VAL([ax_cv_have_epoll_pwait], [dnl
+ AC_LINK_IFELSE([dnl
+ AC_LANG_PROGRAM([dnl
+#ifdef HAVE_LINUX_VERSION_H
+# include <linux/version.h>
+# if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+# error linux kernel version is too old to have epoll_pwait
+# endif
+#endif
+#include <sys/epoll.h>
+#include <signal.h>
+], [dnl
+int fd;
+struct epoll_event ev;
+fd = epoll_create(128);
+epoll_wait(fd, &ev, 1, 0);
+epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0));])],
+ [ax_cv_have_epoll_pwait=yes],
+ [ax_cv_have_epoll_pwait=no])])
+ CPPFLAGS="${ax_have_epoll_cppflags}"
+ AS_IF([test "${ax_cv_have_epoll_pwait}" = "yes"],
+ [AC_MSG_RESULT([yes])
+$1],[AC_MSG_RESULT([no])
+$2])
+])dnl
diff --git a/m4/ax_pthread.m4 b/m4/ax_pthread.m4
@@ -0,0 +1,522 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+# This macro figures out how to build C programs using POSIX threads. It
+# sets the PTHREAD_LIBS output variable to the threads library and linker
+# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+# flags that are needed. (The user can also force certain compiler
+# flags/libs to be tested by setting these environment variables.)
+#
+# Also sets PTHREAD_CC and PTHREAD_CXX to any special C compiler that is
+# needed for multi-threaded programs (defaults to the value of CC
+# respectively CXX otherwise). (This is necessary on e.g. AIX to use the
+# special cc_r/CC_r compiler alias.)
+#
+# NOTE: You are assumed to not only compile your program with these flags,
+# but also to link with them as well. For example, you might link with
+# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+# $PTHREAD_CXX $CXXFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+# If you are only building threaded programs, you may wish to use these
+# variables in your default LIBS, CFLAGS, and CC:
+#
+# LIBS="$PTHREAD_LIBS $LIBS"
+# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+# CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"
+# CC="$PTHREAD_CC"
+# CXX="$PTHREAD_CXX"
+#
+# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
+# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+# PTHREAD_CFLAGS.
+#
+# ACTION-IF-FOUND is a list of shell commands to run if a threads library
+# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+# is not found. If ACTION-IF-FOUND is not specified, the default action
+# will define HAVE_PTHREAD.
+#
+# Please let the authors know if this macro fails on any platform, or if
+# you have any other suggestions or comments. This macro was based on work
+# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+# Alejandro Forero Cuervo to the autoconf macro repository. We are also
+# grateful for the helpful feedback of numerous users.
+#
+# Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
+# Copyright (c) 2019 Marc Stevens <marc.stevens@cwi.nl>
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation, either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 31
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_PROG_SED])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on Tru64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
+ ax_pthread_save_CC="$CC"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
+ AS_IF([test "x$PTHREAD_CXX" != "x"], [CXX="$PTHREAD_CXX"])
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
+ AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
+ AC_MSG_RESULT([$ax_pthread_ok])
+ if test "x$ax_pthread_ok" = "xno"; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ CC="$ax_pthread_save_CC"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try. Items with a "," contain both
+# C compiler flags (before ",") and linker flags (after ","). Other items
+# starting with a "-" are C compiler flags, and remaining items are
+# library names, except for "none" which indicates that we try without
+# any flags at all, and "pthread-config" which is a program returning
+# the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
+# (Note: HP C rejects this with "bad form for `-t' option")
+# -pthreads: Solaris/gcc (Note: HP C also rejects)
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads and
+# -D_REENTRANT too), HP C (must be checked before -lpthread, which
+# is present but should not be used directly; and before -mthreads,
+# because the compiler interprets this as "-mt" + "-hreads")
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case $host_os in
+
+ freebsd*)
+
+ # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+ # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+
+ ax_pthread_flags="-kthread lthread $ax_pthread_flags"
+ ;;
+
+ hpux*)
+
+ # From the cc(1) man page: "[-mt] Sets various -D flags to enable
+ # multi-threading and also sets -lpthread."
+
+ ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
+ ;;
+
+ openedition*)
+
+ # IBM z/OS requires a feature-test macro to be defined in order to
+ # enable POSIX threads at all, so give the user a hint if this is
+ # not set. (We don't define these ourselves, as they can affect
+ # other portions of the system API in unpredictable ways.)
+
+ AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
+ [
+# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
+ AX_PTHREAD_ZOS_MISSING
+# endif
+ ],
+ [AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
+ ;;
+
+ solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (N.B.: The stubs are missing
+ # pthread_cleanup_push, or rather a function called by this macro,
+ # so we could check for that, but who knows whether they'll stub
+ # that too in a future libc.) So we'll check first for the
+ # standard Solaris way of linking pthreads (-mt -lpthread).
+
+ ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
+ ;;
+esac
+
+# Are we compiling with Clang?
+
+AC_CACHE_CHECK([whether $CC is Clang],
+ [ax_cv_PTHREAD_CLANG],
+ [ax_cv_PTHREAD_CLANG=no
+ # Note that Autoconf sets GCC=yes for Clang as well as GCC
+ if test "x$GCC" = "xyes"; then
+ AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
+ [/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
+# if defined(__clang__) && defined(__llvm__)
+ AX_PTHREAD_CC_IS_CLANG
+# endif
+ ],
+ [ax_cv_PTHREAD_CLANG=yes])
+ fi
+ ])
+ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
+
+
+# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
+
+# Note that for GCC and Clang -pthread generally implies -lpthread,
+# except when -nostdlib is passed.
+# This is problematic using libtool to build C++ shared libraries with pthread:
+# [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
+# [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
+# [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
+# To solve this, first try -pthread together with -lpthread for GCC
+
+AS_IF([test "x$GCC" = "xyes"],
+ [ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"])
+
+# Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
+
+AS_IF([test "x$ax_pthread_clang" = "xyes"],
+ [ax_pthread_flags="-pthread,-lpthread -pthread"])
+
+
+# The presence of a feature test macro requesting re-entrant function
+# definitions is, on some systems, a strong hint that pthreads support is
+# correctly enabled
+
+case $host_os in
+ darwin* | hpux* | linux* | osf* | solaris*)
+ ax_pthread_check_macro="_REENTRANT"
+ ;;
+
+ aix*)
+ ax_pthread_check_macro="_THREAD_SAFE"
+ ;;
+
+ *)
+ ax_pthread_check_macro="--"
+ ;;
+esac
+AS_IF([test "x$ax_pthread_check_macro" = "x--"],
+ [ax_pthread_check_cond=0],
+ [ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
+
+
+if test "x$ax_pthread_ok" = "xno"; then
+for ax_pthread_try_flag in $ax_pthread_flags; do
+
+ case $ax_pthread_try_flag in
+ none)
+ AC_MSG_CHECKING([whether pthreads work without any flags])
+ ;;
+
+ *,*)
+ PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
+ PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
+ AC_MSG_CHECKING([whether pthreads work with "$PTHREAD_CFLAGS" and "$PTHREAD_LIBS"])
+ ;;
+
+ -*)
+ AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
+ PTHREAD_CFLAGS="$ax_pthread_try_flag"
+ ;;
+
+ pthread-config)
+ AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
+ AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
+ PTHREAD_CFLAGS="`pthread-config --cflags`"
+ PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
+ PTHREAD_LIBS="-l$ax_pthread_try_flag"
+ ;;
+ esac
+
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+# if $ax_pthread_check_cond
+# error "$ax_pthread_check_macro must be defined"
+# endif
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
+ static void *start_routine(void *a) { return a; }],
+ [pthread_t th; pthread_attr_t attr;
+ pthread_create(&th, 0, start_routine, 0);
+ pthread_join(th, 0);
+ pthread_attr_init(&attr);
+ pthread_cleanup_push(routine, 0);
+ pthread_cleanup_pop(0) /* ; */])],
+ [ax_pthread_ok=yes],
+ [])
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ AC_MSG_RESULT([$ax_pthread_ok])
+ AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
+
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+done
+fi
+
+
+# Clang needs special handling, because older versions handle the -pthread
+# option in a rather... idiosyncratic way
+
+if test "x$ax_pthread_clang" = "xyes"; then
+
+ # Clang takes -pthread; it has never supported any other flag
+
+ # (Note 1: This will need to be revisited if a system that Clang
+ # supports has POSIX threads in a separate library. This tends not
+ # to be the way of modern systems, but it's conceivable.)
+
+ # (Note 2: On some systems, notably Darwin, -pthread is not needed
+ # to get POSIX threads support; the API is always present and
+ # active. We could reasonably leave PTHREAD_CFLAGS empty. But
+ # -pthread does define _REENTRANT, and while the Darwin headers
+ # ignore this macro, third-party headers might not.)
+
+ # However, older versions of Clang make a point of warning the user
+ # that, in an invocation where only linking and no compilation is
+ # taking place, the -pthread option has no effect ("argument unused
+ # during compilation"). They expect -pthread to be passed in only
+ # when source code is being compiled.
+ #
+ # Problem is, this is at odds with the way Automake and most other
+ # C build frameworks function, which is that the same flags used in
+ # compilation (CFLAGS) are also used in linking. Many systems
+ # supported by AX_PTHREAD require exactly this for POSIX threads
+ # support, and in fact it is often not straightforward to specify a
+ # flag that is used only in the compilation phase and not in
+ # linking. Such a scenario is extremely rare in practice.
+ #
+ # Even though use of the -pthread flag in linking would only print
+ # a warning, this can be a nuisance for well-run software projects
+ # that build with -Werror. So if the active version of Clang has
+ # this misfeature, we search for an option to squash it.
+
+ AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
+ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
+ [ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
+ # Create an alternate version of $ac_link that compiles and
+ # links in two steps (.c -> .o, .o -> exe) instead of one
+ # (.c -> exe), because the warning occurs only in the second
+ # step
+ ax_pthread_save_ac_link="$ac_link"
+ ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
+ ax_pthread_link_step=`AS_ECHO(["$ac_link"]) | sed "$ax_pthread_sed"`
+ ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
+ AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
+ CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
+ ac_link="$ax_pthread_save_ac_link"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+ [ac_link="$ax_pthread_2step_ac_link"
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
+ [break])
+ ])
+ done
+ ac_link="$ax_pthread_save_ac_link"
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
+ ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
+ ])
+
+ case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
+ no | unknown) ;;
+ *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
+ esac
+
+fi # $ax_pthread_clang = yes
+
+
+
+# Various other checks:
+if test "x$ax_pthread_ok" = "xyes"; then
+ ax_pthread_save_CFLAGS="$CFLAGS"
+ ax_pthread_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+
+ # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+ AC_CACHE_CHECK([for joinable pthread attribute],
+ [ax_cv_PTHREAD_JOINABLE_ATTR],
+ [ax_cv_PTHREAD_JOINABLE_ATTR=unknown
+ for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+ [int attr = $ax_pthread_attr; return attr /* ; */])],
+ [ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
+ [])
+ done
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
+ test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
+ test "x$ax_pthread_joinable_attr_defined" != "xyes"],
+ [AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
+ [$ax_cv_PTHREAD_JOINABLE_ATTR],
+ [Define to necessary symbol if this constant
+ uses a non-standard name on your system.])
+ ax_pthread_joinable_attr_defined=yes
+ ])
+
+ AC_CACHE_CHECK([whether more special flags are required for pthreads],
+ [ax_cv_PTHREAD_SPECIAL_FLAGS],
+ [ax_cv_PTHREAD_SPECIAL_FLAGS=no
+ case $host_os in
+ solaris*)
+ ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
+ ;;
+ esac
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
+ test "x$ax_pthread_special_flags_added" != "xyes"],
+ [PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
+ ax_pthread_special_flags_added=yes])
+
+ AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+ [ax_cv_PTHREAD_PRIO_INHERIT],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
+ [[int i = PTHREAD_PRIO_INHERIT;
+ return i;]])],
+ [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+ [ax_cv_PTHREAD_PRIO_INHERIT=no])
+ ])
+ AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
+ test "x$ax_pthread_prio_inherit_defined" != "xyes"],
+ [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
+ ax_pthread_prio_inherit_defined=yes
+ ])
+
+ CFLAGS="$ax_pthread_save_CFLAGS"
+ LIBS="$ax_pthread_save_LIBS"
+
+ # More AIX lossage: compile with *_r variant
+ if test "x$GCC" != "xyes"; then
+ case $host_os in
+ aix*)
+ AS_CASE(["x/$CC"],
+ [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
+ [#handle absolute path differently from PATH based program lookup
+ AS_CASE(["x$CC"],
+ [x/*],
+ [
+ AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])
+ AS_IF([test "x${CXX}" != "x"], [AS_IF([AS_EXECUTABLE_P([${CXX}_r])],[PTHREAD_CXX="${CXX}_r"])])
+ ],
+ [
+ AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])
+ AS_IF([test "x${CXX}" != "x"], [AC_CHECK_PROGS([PTHREAD_CXX],[${CXX}_r],[$CXX])])
+ ]
+ )
+ ])
+ ;;
+ esac
+ fi
+fi
+
+test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
+test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
+
+AC_SUBST([PTHREAD_LIBS])
+AC_SUBST([PTHREAD_CFLAGS])
+AC_SUBST([PTHREAD_CC])
+AC_SUBST([PTHREAD_CXX])
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test "x$ax_pthread_ok" = "xyes"; then
+ ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
+ :
+else
+ ax_pthread_ok=no
+ $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
diff --git a/m4/ax_require_defined.m4 b/m4/ax_require_defined.m4
@@ -0,0 +1,37 @@
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_REQUIRE_DEFINED(MACRO)
+#
+# DESCRIPTION
+#
+# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have
+# been defined and thus are available for use. This avoids random issues
+# where a macro isn't expanded. Instead the configure script emits a
+# non-fatal:
+#
+# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found
+#
+# It's like AC_REQUIRE except it doesn't expand the required macro.
+#
+# Here's an example:
+#
+# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG])
+#
+# LICENSE
+#
+# Copyright (c) 2014 Mike Frysinger <vapier@gentoo.org>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([AX_REQUIRE_DEFINED], [dnl
+ m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])])
+])dnl AX_REQUIRE_DEFINED
diff --git a/m4/codeset.m4 b/m4/codeset.m4
@@ -0,0 +1,24 @@
+# codeset.m4 serial 5 (gettext-0.18.2)
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <langinfo.h>]],
+ [[char* cs = nl_langinfo(CODESET); return !cs;]])],
+ [am_cv_langinfo_codeset=yes],
+ [am_cv_langinfo_codeset=no])
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4
@@ -0,0 +1,114 @@
+dnl 'extern inline' a la ISO C99.
+
+dnl Copyright 2012-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXTERN_INLINE],
+[
+ AH_VERBATIM([extern_inline],
+[/* Please see the Gnulib manual for how to use these macros.
+
+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
+ <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
+
+ Suppress extern inline with Sun C in standards-conformance mode, as it
+ mishandles inline functions that call each other. E.g., for 'inline void f
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ from calling static functions (ISO C 99 section 6.7.4.(3).
+ This bug is known to occur on:
+
+ OS X 10.8 and earlier; see:
+ https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
+
+ DragonFly; see
+ http://muscles.dragonflybsd.org/bulk/clang-master-potential/20141111_102002/logs/ah-tty-0.3.12.log
+
+ FreeBSD; see:
+ https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
+
+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+ for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
+ Assume DragonFly and FreeBSD will be similar.
+
+ GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. It defines a macro
+ __GNUC_STDC_INLINE__ to indicate this situation or a macro
+ __GNUC_GNU_INLINE__ to indicate the opposite situation.
+ GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline
+ semantics but warns, unless -fgnu89-inline is used:
+ warning: C99 inline functions are not supported; using GNU89
+ warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute
+ It defines a macro __GNUC_GNU_INLINE__ to indicate this situation.
+ */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !defined __PGI \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif])
+])
diff --git a/m4/fcntl-o.m4 b/m4/fcntl-o.m4
@@ -0,0 +1,140 @@
+# fcntl-o.m4 serial 7
+dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_PREREQ([2.60])
+
+# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
+# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
+AC_DEFUN([gl_FCNTL_O_FLAGS],
+[
+ dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CHECK_FUNCS_ONCE([symlink])
+ AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/stat.h>
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #else /* on Windows with MSVC */
+ # include <io.h>
+ # include <stdlib.h>
+ # defined sleep(n) _sleep ((n) * 1000)
+ #endif
+ #include <fcntl.h>
+ ]GL_MDA_DEFINES[
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+ ]],
+ [[
+ int result = !constants;
+ #if HAVE_SYMLINK
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ unlink (sym);
+ }
+ #endif
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ if (fd < 0)
+ result |= 8;
+ else
+ {
+ struct stat st0;
+ if (fstat (fd, &st0) != 0)
+ result |= 16;
+ else
+ {
+ char c;
+ sleep (1);
+ if (read (fd, &c, 1) != 1)
+ result |= 24;
+ else
+ {
+ if (close (fd) != 0)
+ result |= 32;
+ else
+ {
+ struct stat st1;
+ if (stat (file, &st1) != 0)
+ result |= 40;
+ else
+ if (st0.st_atime != st1.st_atime)
+ result |= 64;
+ }
+ }
+ }
+ }
+ }
+ return result;]])],
+ [gl_cv_header_working_fcntl_h=yes],
+ [case $? in #(
+ 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac],
+ [case "$host_os" in
+ # Guess 'no' on native Windows.
+ mingw*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
+ esac
+ ])
+ ])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+ [Define to 1 if O_NOATIME works.])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+ [Define to 1 if O_NOFOLLOW works.])
+])
diff --git a/m4/glibc2.m4 b/m4/glibc2.m4
@@ -0,0 +1,31 @@
+# glibc2.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+ [
+ AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
+ [ac_cv_gnu_library_2],
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2) && !defined __UCLIBC__
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [ac_cv_gnu_library_2=yes],
+ [ac_cv_gnu_library_2=no])
+ ]
+ )
+ AC_SUBST([GLIBC2])
+ GLIBC2="$ac_cv_gnu_library_2"
+ ]
+)
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
@@ -0,0 +1,34 @@
+# glibc21.m4 serial 5
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer, or uClibc.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+ [
+ AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc],
+ [ac_cv_gnu_library_2_1],
+ [AC_EGREP_CPP([Lucky],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+#ifdef __UCLIBC__
+ Lucky user
+#endif
+ ],
+ [ac_cv_gnu_library_2_1=yes],
+ [ac_cv_gnu_library_2_1=no])
+ ]
+ )
+ AC_SUBST([GLIBC21])
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/m4/intdiv0.m4 b/m4/intdiv0.m4
@@ -0,0 +1,90 @@
+# intdiv0.m4 serial 7 (gettext-0.20.2)
+dnl Copyright (C) 2002, 2007-2008, 2010-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+ case "$host_os" in
+ macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+ # On Mac OS X 10.2 or newer, just assume the same as when cross-
+ # compiling. If we were to perform the real test, 1 Crash Report
+ # dialog window would pop up.
+ case "$host_cpu" in
+ i[34567]86 | x86_64)
+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdlib.h> /* for exit() */
+#include <signal.h>
+#if !(defined _WIN32 && !defined __CYGWIN__)
+#include <unistd.h> /* for _exit() */
+#endif
+
+static void
+sigfpe_handler (int sig)
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ _exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (2);
+}
+]])],
+ [gt_cv_int_divbyzero_sigfpe=yes],
+ [gt_cv_int_divbyzero_sigfpe=no],
+ [
+ # Guess based on the CPU.
+changequote(,)dnl
+ case "$host_cpu" in
+ alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ fi
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
+ [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/m4/intl-thread-locale.m4 b/m4/intl-thread-locale.m4
@@ -0,0 +1,219 @@
+# intl-thread-locale.m4 serial 9
+dnl Copyright (C) 2015-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Check how to retrieve the name of a per-thread locale (POSIX locale_t).
+dnl Sets gt_nameless_locales.
+AC_DEFUN([gt_INTL_THREAD_LOCALE_NAME],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ dnl Persuade Solaris <locale.h> to define 'locale_t'.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ dnl Test whether uselocale() exists and works at all.
+ gt_FUNC_USELOCALE
+
+ dnl On OpenBSD >= 6.2, the locale_t type and the uselocale(), newlocale(),
+ dnl duplocale(), freelocale() functions exist but are effectively useless,
+ dnl because the locale_t value depends only on the LC_CTYPE category of the
+ dnl locale and furthermore contains only one bit of information (it
+ dnl distinguishes the "C" locale from the *.UTF-8 locales). See
+ dnl <https://cvsweb.openbsd.org/src/lib/libc/locale/newlocale.c?rev=1.1&content-type=text/x-cvsweb-markup>.
+ dnl In the setlocale() implementation they have thought about the programs
+ dnl that use the API ("Even though only LC_CTYPE has any effect in the
+ dnl OpenBSD base system, store complete information about the global locale,
+ dnl such that third-party software can access it"), but for uselocale()
+ dnl they did not think about the programs.
+ dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work.
+ dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support.
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_CHECK_HEADERS_ONCE([xlocale.h])
+ AC_CACHE_CHECK([for fake locale system (OpenBSD)],
+ [gt_cv_locale_fake],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+int main ()
+{
+ locale_t loc1, loc2;
+ if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1;
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1;
+ loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0);
+ loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
+ return !(loc1 == loc2);
+}]])],
+ [gt_cv_locale_fake=yes],
+ [gt_cv_locale_fake=no],
+ [dnl Guess the locale system is fake only on OpenBSD.
+ case "$host_os" in
+ openbsd*) gt_cv_locale_fake="guessing yes" ;;
+ *) gt_cv_locale_fake="guessing no" ;;
+ esac
+ ])
+ ])
+ ;;
+ *) gt_cv_locale_fake=no ;;
+ esac
+ case "$gt_cv_locale_fake" in
+ *yes)
+ gt_fake_locales=yes
+ AC_DEFINE([HAVE_FAKE_LOCALES], [1],
+ [Define if the locale_t type contains insufficient information, as on OpenBSD.])
+ ;;
+ *)
+ gt_fake_locales=no
+ ;;
+ esac
+
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_CACHE_CHECK([for Solaris 11.4 locale system],
+ [gt_cv_locale_solaris114],
+ [case "$host_os" in
+ solaris*)
+ dnl Test whether <locale.h> defines locale_t as a typedef of
+ dnl 'struct _LC_locale_t **' (whereas Illumos defines it as a
+ dnl typedef of 'struct _locale *').
+ dnl Another possible test would be to include <sys/localedef.h>
+ dnl and test whether it defines the _LC_core_data_locale_t type.
+ dnl This type was added in Solaris 11.4.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <locale.h>
+ struct _LC_locale_t *x;
+ locale_t y;
+ ]],
+ [[*y = x;]])],
+ [gt_cv_locale_solaris114=yes],
+ [gt_cv_locale_solaris114=no])
+ ;;
+ *) gt_cv_locale_solaris114=no ;;
+ esac
+ ])
+ ;;
+ *) gt_cv_locale_solaris114=no ;;
+ esac
+ if test $gt_cv_locale_solaris114 = yes; then
+ AC_DEFINE([HAVE_SOLARIS114_LOCALES], [1],
+ [Define if the locale_t type is as on Solaris 11.4.])
+ fi
+
+ dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will
+ dnl improve the implementation of gl_locale_name_thread(), by removing
+ dnl the use of undocumented structures.
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ AC_CHECK_FUNCS([getlocalename_l])
+ ;;
+ esac
+
+ dnl This code is for platforms where the locale_t type does not provide access
+ dnl to the name of each locale category. This code has the drawback that it
+ dnl requires the gnulib overrides of 'newlocale', 'duplocale', 'freelocale',
+ dnl which is a problem for GNU libunistring. Therefore try hard to avoid
+ dnl enabling this code!
+ gt_nameless_locales=no
+ case "$host_os" in
+ dnl It's needed on AIX 7.2.
+ aix*)
+ gt_nameless_locales=yes
+ AC_DEFINE([HAVE_NAMELESS_LOCALES], [1],
+ [Define if the locale_t type does not contain the name of each locale category.])
+ ;;
+ esac
+
+ dnl We cannot support uselocale() on platforms where the locale_t type is
+ dnl fake. So, set
+ dnl gt_good_uselocale = gt_working_uselocale && !gt_fake_locales.
+ if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
+ gt_good_uselocale=yes
+ AC_DEFINE([HAVE_GOOD_USELOCALE], [1],
+ [Define if the uselocale exists, may be safely called, and returns sufficient information.])
+ else
+ gt_good_uselocale=no
+ fi
+
+ dnl Set gt_localename_enhances_locale_funcs to indicate whether localename.c
+ dnl overrides newlocale(), duplocale(), freelocale() to keep track of locale
+ dnl names.
+ if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
+ gt_localename_enhances_locale_funcs=yes
+ LOCALENAME_ENHANCE_LOCALE_FUNCS=1
+ AC_DEFINE([LOCALENAME_ENHANCE_LOCALE_FUNCS], [1],
+ [Define if localename.c overrides newlocale(), duplocale(), freelocale().])
+ else
+ gt_localename_enhances_locale_funcs=no
+ fi
+])
+
+dnl Tests whether uselocale() exists and is usable.
+dnl Sets gt_working_uselocale and defines HAVE_WORKING_USELOCALE.
+AC_DEFUN([gt_FUNC_USELOCALE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade glibc and Solaris <locale.h> to define 'locale_t'.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_FUNCS_ONCE([uselocale])
+
+ dnl On AIX 7.2, the uselocale() function is not documented and leads to
+ dnl crashes in subsequent setlocale() invocations.
+ dnl In 2019, some versions of z/OS lack the locale_t type and have a broken
+ dnl uselocale function.
+ if test $ac_cv_func_uselocale = yes; then
+ AC_CHECK_HEADERS_ONCE([xlocale.h])
+ AC_CACHE_CHECK([whether uselocale works],
+ [gt_cv_func_uselocale_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+locale_t loc1;
+int main ()
+{
+ uselocale (NULL);
+ setlocale (LC_ALL, "en_US.UTF-8");
+ return 0;
+}]])],
+ [gt_cv_func_uselocale_works=yes],
+ [gt_cv_func_uselocale_works=no],
+ [# Guess no on AIX and z/OS, yes otherwise.
+ case "$host_os" in
+ aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;;
+ *) gt_cv_func_uselocale_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ else
+ gt_cv_func_uselocale_works=no
+ fi
+ case "$gt_cv_func_uselocale_works" in
+ *yes)
+ gt_working_uselocale=yes
+ AC_DEFINE([HAVE_WORKING_USELOCALE], [1],
+ [Define if the uselocale function exists and may safely be called.])
+ ;;
+ *)
+ gt_working_uselocale=no
+ ;;
+ esac
+])
diff --git a/m4/intl.m4 b/m4/intl.m4
@@ -0,0 +1,287 @@
+# intl.m4 serial 44 (gettext-0.21)
+dnl Copyright (C) 1995-2014, 2016-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for LIBTOOL, USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([gt_GLIBC2])dnl
+ AC_REQUIRE([gl_VISIBILITY])dnl
+ AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gt_TYPE_INTMAX_T])
+ AC_REQUIRE([gt_PRINTF_POSIX])
+ AC_REQUIRE([gl_GLIBC21])dnl
+ AC_REQUIRE([gl_XSIZE])dnl
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
+ AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME])
+ AC_REQUIRE([gt_INTL_MACOSX])dnl
+ AC_REQUIRE([gl_EXTERN_INLINE])dnl
+ AC_REQUIRE([gt_GL_ATTRIBUTE])dnl
+ AC_REQUIRE([AC_C_FLEXIBLE_ARRAY_MEMBER])dnl
+
+ dnl In projects that use gnulib, use gl_PROG_AR_RANLIB.
+ dnl The '][' hides this use from 'aclocal'.
+ m4_ifdef([g][l_PROG_AR_RANLIB],
+ [AC_REQUIRE([g][l_PROG_AR_RANLIB])],
+ [AC_REQUIRE([AC_PROG_RANLIB])
+ dnl Use Automake-documented default values for AR and ARFLAGS, but prefer
+ dnl ${host}-ar over ar (useful for cross-compiling).
+ AC_CHECK_TOOL([AR], [ar], [ar])
+ if test -z "$ARFLAGS"; then
+ ARFLAGS='cr'
+ fi
+ AC_SUBST([AR])
+ AC_SUBST([ARFLAGS])
+ ])
+
+ dnl Support for automake's --enable-silent-rules.
+ case "$enable_silent_rules" in
+ yes) INTL_DEFAULT_VERBOSITY=0;;
+ no) INTL_DEFAULT_VERBOSITY=1;;
+ *) INTL_DEFAULT_VERBOSITY=1;;
+ esac
+ AC_SUBST([INTL_DEFAULT_VERBOSITY])
+
+ AC_CHECK_TYPE([ptrdiff_t], ,
+ [AC_DEFINE([ptrdiff_t], [long],
+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+ ])
+ AC_CHECK_HEADERS([features.h stddef.h stdlib.h string.h])
+ AC_CHECK_FUNCS([asprintf wprintf newlocale putenv setenv \
+ snprintf strnlen uselocale wcslen wcsnlen mbrtowc wcrtomb])
+
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ AC_CHECK_DECLS([_snprintf, _snwprintf], , , [#include <stdio.h>])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ AC_CHECK_DECLS([getc_unlocked], , , [#include <stdio.h>])
+
+ case $gt_cv_func_printf_posix in
+ *yes) HAVE_POSIX_PRINTF=1 ;;
+ *) HAVE_POSIX_PRINTF=0 ;;
+ esac
+ AC_SUBST([HAVE_POSIX_PRINTF])
+ if test "$ac_cv_func_asprintf" = yes; then
+ HAVE_ASPRINTF=1
+ else
+ HAVE_ASPRINTF=0
+ fi
+ AC_SUBST([HAVE_ASPRINTF])
+ if test "$ac_cv_func_snprintf" = yes; then
+ HAVE_SNPRINTF=1
+ else
+ HAVE_SNPRINTF=0
+ fi
+ AC_SUBST([HAVE_SNPRINTF])
+ if test "$ac_cv_func_newlocale" = yes; then
+ HAVE_NEWLOCALE=1
+ else
+ HAVE_NEWLOCALE=0
+ fi
+ AC_SUBST([HAVE_NEWLOCALE])
+ if test "$ac_cv_func_wprintf" = yes; then
+ HAVE_WPRINTF=1
+ else
+ HAVE_WPRINTF=0
+ fi
+ AC_SUBST([HAVE_WPRINTF])
+
+ AM_LANGINFO_CODESET
+ gt_LC_MESSAGES
+
+ if test $gt_nameless_locales = yes; then
+ HAVE_NAMELESS_LOCALES=1
+ else
+ HAVE_NAMELESS_LOCALES=0
+ fi
+ AC_SUBST([HAVE_NAMELESS_LOCALES])
+
+ dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+ dnl 1. when we install a shared library, we must arrange to export
+ dnl auxiliary pointer variables for every exported variable,
+ dnl 2. when we install a shared library and a static library simultaneously,
+ dnl the include file specifies __declspec(dllimport) and therefore we
+ dnl must arrange to define the auxiliary pointer variables for the
+ dnl exported variables _also_ in the static library.
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+ mingw* | cygwin*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+ is_woe32dll=no
+ fi
+ WOE32DLL=$is_woe32dll
+ AC_SUBST([WOE32DLL])
+
+ dnl On mingw and Cygwin, we can activate special Makefile rules which add
+ dnl version information to the shared libraries and executables.
+ case "$host_os" in
+ mingw* | cygwin*) is_woe32=yes ;;
+ *) is_woe32=no ;;
+ esac
+ WOE32=$is_woe32
+ AC_SUBST([WOE32])
+ if test $WOE32 = yes; then
+ dnl Check for a program that compiles Windows resource files.
+ AC_CHECK_TOOL([WINDRES], [windres])
+ fi
+
+ dnl Rename some macros and functions used for locking.
+ AH_BOTTOM([
+#define __libc_lock_t gl_lock_t
+#define __libc_lock_define gl_lock_define
+#define __libc_lock_define_initialized gl_lock_define_initialized
+#define __libc_lock_init gl_lock_init
+#define __libc_lock_lock gl_lock_lock
+#define __libc_lock_unlock gl_lock_unlock
+#define __libc_lock_recursive_t gl_recursive_lock_t
+#define __libc_lock_define_recursive gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive gl_recursive_lock_init
+#define __libc_lock_lock_recursive gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
+#define glthread_in_use libintl_thread_in_use
+#define glthread_lock_init_func libintl_lock_init_func
+#define glthread_lock_lock_func libintl_lock_lock_func
+#define glthread_lock_unlock_func libintl_lock_unlock_func
+#define glthread_lock_destroy_func libintl_lock_destroy_func
+#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded
+#define glthread_rwlock_init_func libintl_rwlock_init_func
+#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded
+#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func
+#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded
+#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func
+#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded
+#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func
+#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded
+#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func
+#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded
+#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func
+#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded
+#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func
+#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded
+#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func
+#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded
+#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func
+#define glthread_once_func libintl_once_func
+#define glthread_once_singlethreaded libintl_once_singlethreaded
+#define glthread_once_multithreaded libintl_once_multithreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl dcigettext.c
+dnl eval-plural.h
+dnl explodename.c
+dnl finddomain.c
+dnl gettextP.h
+dnl gmo.h
+dnl hash-string.h hash-string.c
+dnl l10nflist.c
+dnl libgnuintl.h.in (except the *printf stuff)
+dnl loadinfo.h
+dnl loadmsgcat.c
+dnl localealias.c
+dnl log.c
+dnl plural-exp.h plural-exp.c
+dnl plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gl_LOCK])dnl
+
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }]],
+ [[]])],
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
+ [Define to 1 if the compiler understands __builtin_expect.])])
+
+ AC_CHECK_HEADERS([inttypes.h limits.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+ stpcpy strcasecmp strdup strtoul tsearch __fsetlocking])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ AC_CHECK_DECLS([feof_unlocked, fgets_unlocked], , , [#include <stdio.h>])
+
+ AM_ICONV
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-3.0 for %precedence.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ gl_PROG_BISON([INTLBISON], [3.0])
+])
+
+dnl Copies _GL_UNUSED and _GL_ATTRIBUTE_PURE definitions from
+dnl gnulib-common.m4 as a fallback, if the project isn't using Gnulib.
+AC_DEFUN([gt_GL_ATTRIBUTE], [
+ m4_ifndef([gl_[]COMMON],
+ AH_VERBATIM([gt_gl_attribute],
+[/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#ifndef _GL_UNUSED
+# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+# else
+# define _GL_UNUSED
+# endif
+#endif
+
+/* The __pure__ attribute was added in gcc 2.96. */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define _GL_ATTRIBUTE_PURE /* empty */
+# endif
+#endif
+]))])
diff --git a/m4/intldir.m4 b/m4/intldir.m4
@@ -0,0 +1,19 @@
+# intldir.m4 serial 2 (gettext-0.18)
+dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+AC_PREREQ([2.52])
+
+dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
+AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
diff --git a/m4/intmax.m4 b/m4/intmax.m4
@@ -0,0 +1,36 @@
+# intmax.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2002-2005, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+ ]],
+ [[intmax_t x = -1;
+ return !x;]])],
+ [gt_cv_c_intmax_t=yes],
+ [gt_cv_c_intmax_t=no])])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4
@@ -0,0 +1,42 @@
+# inttypes-pri.m4 serial 7 (gettext-0.18.2)
+dnl Copyright (C) 1997-2002, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.53])
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_CHECK_HEADERS([inttypes.h])
+ if test $ac_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ [gt_cv_inttypes_pri_broken],
+ [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+ ]],
+ [[]])],
+ [gt_cv_inttypes_pri_broken=no],
+ [gt_cv_inttypes_pri_broken=yes])
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4
@@ -0,0 +1,29 @@
+# inttypes_h.m4 serial 10
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <sys/types.h>
+#include <inttypes.h>
+ ]],
+ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+ [gl_cv_header_inttypes_h=yes],
+ [gl_cv_header_inttypes_h=no])])
+ if test $gl_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/m4/lcmessage.m4 b/m4/lcmessage.m4
@@ -0,0 +1,35 @@
+# lcmessage.m4 serial 8
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-2021 Free
+dnl Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>]],
+ [[return LC_MESSAGES]])],
+ [gt_cv_val_LC_MESSAGES=yes],
+ [gt_cv_val_LC_MESSAGES=no])])
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE([HAVE_LC_MESSAGES], [1],
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
@@ -0,0 +1,275 @@
+#***************************************************************************
+# _ _ ____ _
+# Project ___| | | | _ \| |
+# / __| | | | |_) | |
+# | (__| |_| | _ <| |___
+# \___|\___/|_| \_\_____|
+#
+# Copyright (C) David Shaw <dshaw@jabberwocky.com>
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at https://curl.se/docs/copyright.html.
+#
+# You may opt to use, copy, modify, merge, publish, distribute and/or sell
+# copies of the Software, and permit persons to whom the Software is
+# furnished to do so, under the terms of the COPYING file.
+#
+# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+# KIND, either express or implied.
+#
+# SPDX-License-Identifier: curl
+#
+###########################################################################
+# LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
+# [ACTION-IF-YES], [ACTION-IF-NO])
+# ----------------------------------------------------------
+# David Shaw <dshaw@jabberwocky.com> May-09-2006
+#
+# Checks for libcurl. DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-libcurl or --without-libcurl.
+# If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
+# minimum version of libcurl to accept. Pass the version as a regular
+# version number like 7.10.1. If not supplied, any version is
+# accepted. ACTION-IF-YES is a list of shell commands to run if
+# libcurl was successfully found and passed the various tests.
+# ACTION-IF-NO is a list of shell commands that are run otherwise.
+# Note that using --without-libcurl does run ACTION-IF-NO.
+#
+# This macro #defines HAVE_LIBCURL if a working libcurl setup is
+# found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
+# values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
+# the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
+# where yyy are the various protocols supported by libcurl. Both xxx
+# and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
+# the macro for the complete list of possible defines. Shell
+# variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also
+# defined to 'yes' for those features and protocols that were found.
+# Note that xxx and yyy keep the same capitalization as in the
+# curl-config list (e.g. it's "HTTP" and not "http").
+#
+# Users may override the detected values by doing something like:
+# LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# For the sake of sanity, this macro assumes that any libcurl that is
+# found is after version 7.7.2, the first version that included the
+# curl-config script. Note that it is very important for people
+# packaging binary versions of libcurl to include this script!
+# Without curl-config, we can only guess what protocols are available,
+# or use curl_version_info to figure it out at runtime.
+
+AC_DEFUN([LIBCURL_CHECK_CONFIG],
+[
+ AH_TEMPLATE([LIBCURL_FEATURE_SSL],[Defined if libcurl supports SSL])
+ AH_TEMPLATE([LIBCURL_FEATURE_KRB4],[Defined if libcurl supports KRB4])
+ AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6])
+ AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz])
+ AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS])
+ AH_TEMPLATE([LIBCURL_FEATURE_IDN],[Defined if libcurl supports IDN])
+ AH_TEMPLATE([LIBCURL_FEATURE_SSPI],[Defined if libcurl supports SSPI])
+ AH_TEMPLATE([LIBCURL_FEATURE_NTLM],[Defined if libcurl supports NTLM])
+
+ AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_RTSP],[Defined if libcurl supports RTSP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_POP3],[Defined if libcurl supports POP3])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_IMAP],[Defined if libcurl supports IMAP])
+ AH_TEMPLATE([LIBCURL_PROTOCOL_SMTP],[Defined if libcurl supports SMTP])
+
+ AC_ARG_WITH(libcurl,
+ AS_HELP_STRING([--with-libcurl=PREFIX],[look for the curl library in PREFIX/lib and headers in PREFIX/include]),
+ [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
+
+ if test "$_libcurl_with" != "no" ; then
+
+ AC_PROG_AWK
+
+ _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
+
+ _libcurl_try_link=yes
+
+ if test -d "$_libcurl_with" ; then
+ LIBCURL_CPPFLAGS="-I$withval/include"
+ _libcurl_ldflags="-L$withval/lib"
+ AC_PATH_PROG([_libcurl_config],[curl-config],[],
+ ["$withval/bin"])
+ else
+ AC_PATH_PROG([_libcurl_config],[curl-config],[],[$PATH])
+ fi
+
+ if test x$_libcurl_config != "x" ; then
+ AC_CACHE_CHECK([for the version of libcurl],
+ [libcurl_cv_lib_curl_version],
+ [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
+
+ _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
+ _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
+
+ if test $_libcurl_wanted -gt 0 ; then
+ AC_CACHE_CHECK([for libcurl >= version $2],
+ [libcurl_cv_lib_version_ok],
+ [
+ if test $_libcurl_version -ge $_libcurl_wanted ; then
+ libcurl_cv_lib_version_ok=yes
+ else
+ libcurl_cv_lib_version_ok=no
+ fi
+ ])
+ fi
+
+ if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
+ if test x"$LIBCURL_CPPFLAGS" = "x" ; then
+ LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
+ fi
+ if test x"$LIBCURL" = "x" ; then
+ LIBCURL=`$_libcurl_config --libs`
+
+ # This is so silly, but Apple actually has a bug in their
+ # curl-config script. Fixed in Tiger, but there are still
+ # lots of Panther installs around.
+ case "${host}" in
+ powerpc-apple-darwin7*)
+ LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
+ ;;
+ esac
+ fi
+
+ # All curl-config scripts support --feature
+ _libcurl_features=`$_libcurl_config --feature`
+
+ # Is it modern enough to have --protocols? (7.12.4)
+ if test $_libcurl_version -ge 461828 ; then
+ _libcurl_protocols=`$_libcurl_config --protocols`
+ fi
+ else
+ _libcurl_try_link=no
+ fi
+
+ unset _libcurl_wanted
+ fi
+
+ if test $_libcurl_try_link = yes ; then
+
+ # we didn't find curl-config, so let's see if the user-supplied
+ # link line (or failing that, "-lcurl") is enough.
+ LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
+
+ AC_CACHE_CHECK([whether libcurl is usable],
+ [libcurl_cv_lib_curl_usable],
+ [
+ _libcurl_save_cppflags=$CPPFLAGS
+ CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
+ _libcurl_save_libs=$LIBS
+ LIBS="$LIBCURL $LIBS"
+
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <curl/curl.h>]],[[
+/* Try and use a few common options to force a failure if we are
+ missing symbols or can't link. */
+int x;
+curl_easy_setopt(NULL,CURLOPT_URL,NULL);
+x=CURL_ERROR_SIZE;
+x=CURLOPT_WRITEFUNCTION;
+x=CURLOPT_WRITEDATA;
+x=CURLOPT_ERRORBUFFER;
+x=CURLOPT_STDERR;
+x=CURLOPT_VERBOSE;
+if (x) {;}
+]])],libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
+
+ CPPFLAGS=$_libcurl_save_cppflags
+ LIBS=$_libcurl_save_libs
+ unset _libcurl_save_cppflags
+ unset _libcurl_save_libs
+ ])
+
+ if test $libcurl_cv_lib_curl_usable = yes ; then
+
+ # Does curl_free() exist in this version of libcurl?
+ # If not, fake it with free()
+
+ _libcurl_save_cppflags=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
+ _libcurl_save_libs=$LIBS
+ LIBS="$LIBS $LIBCURL"
+
+ AC_CHECK_DECL([curl_free],[],
+ [AC_DEFINE([curl_free],[free],
+ [Define curl_free() as free() if our version of curl lacks curl_free.])],
+ [[#include <curl/curl.h>]])
+
+ CPPFLAGS=$_libcurl_save_cppflags
+ LIBS=$_libcurl_save_libs
+ unset _libcurl_save_cppflags
+ unset _libcurl_save_libs
+
+ AC_DEFINE(HAVE_LIBCURL,1,
+ [Define to 1 if you have a functional curl library.])
+ AC_SUBST(LIBCURL_CPPFLAGS)
+ AC_SUBST(LIBCURL)
+
+ for _libcurl_feature in $_libcurl_features ; do
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
+ eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
+ done
+
+ if test "x$_libcurl_protocols" = "x" ; then
+
+ # We don't have --protocols, so just assume that all
+ # protocols are available
+ _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT TFTP"
+
+ if test x$libcurl_feature_SSL = xyes ; then
+ _libcurl_protocols="$_libcurl_protocols HTTPS"
+
+ # FTPS wasn't standards-compliant until version
+ # 7.11.0 (0x070b00 == 461568)
+ if test $_libcurl_version -ge 461568; then
+ _libcurl_protocols="$_libcurl_protocols FTPS"
+ fi
+ fi
+
+ # RTSP, IMAP, POP3 and SMTP were added in
+ # 7.20.0 (0x071400 == 463872)
+ if test $_libcurl_version -ge 463872; then
+ _libcurl_protocols="$_libcurl_protocols RTSP IMAP POP3 SMTP"
+ fi
+ fi
+
+ for _libcurl_protocol in $_libcurl_protocols ; do
+ AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
+ eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
+ done
+ else
+ unset LIBCURL
+ unset LIBCURL_CPPFLAGS
+ fi
+ fi
+
+ unset _libcurl_try_link
+ unset _libcurl_version_parse
+ unset _libcurl_config
+ unset _libcurl_feature
+ unset _libcurl_features
+ unset _libcurl_protocol
+ unset _libcurl_protocols
+ unset _libcurl_version
+ unset _libcurl_ldflags
+ fi
+
+ if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
+ # This is the IF-NO path
+ ifelse([$4],,:,[$4])
+ else
+ # This is the IF-YES path
+ ifelse([$3],,:,[$3])
+ fi
+
+ unset _libcurl_with
+])dnl
diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4
@@ -0,0 +1,167 @@
+# libgcrypt.m4 - Autoconf macros to detect libgcrypt
+# Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018, 2020 g10 Code GmbH
+#
+# This file is free software; as a special exception the author gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# This file is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# Last-changed: 2020-09-27
+
+
+dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
+dnl MINIMUM-VERSION is a string with the version number optionally prefixed
+dnl with the API version to also check the API compatibility. Example:
+dnl a MINIMUM-VERSION of 1:1.2.5 won't pass the test unless the installed
+dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
+dnl this features allows to prevent build against newer versions of libgcrypt
+dnl with a changed API.
+dnl
+dnl If a prefix option is not used, the config script is first
+dnl searched in $SYSROOT/bin and then along $PATH. If the used
+dnl config script does not match the host specification the script
+dnl is added to the gpg_config_script_warn variable.
+dnl
+AC_DEFUN([AM_PATH_LIBGCRYPT],
+[ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_ARG_WITH(libgcrypt-prefix,
+ AS_HELP_STRING([--with-libgcrypt-prefix=PFX],
+ [prefix where LIBGCRYPT is installed (optional)]),
+ libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
+ if test x"${LIBGCRYPT_CONFIG}" = x ; then
+ if test x"${libgcrypt_config_prefix}" != x ; then
+ LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config"
+ fi
+ fi
+
+ use_gpgrt_config=""
+ if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then
+ if $GPGRT_CONFIG libgcrypt --exists; then
+ LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt"
+ AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config])
+ use_gpgrt_config=yes
+ fi
+ fi
+ if test -z "$use_gpgrt_config"; then
+ if test x"${LIBGCRYPT_CONFIG}" = x ; then
+ case "${SYSROOT}" in
+ /*)
+ if test -x "${SYSROOT}/bin/libgcrypt-config" ; then
+ LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config"
+ fi
+ ;;
+ '')
+ ;;
+ *)
+ AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.])
+ ;;
+ esac
+ fi
+ AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
+ fi
+
+ tmp=ifelse([$1], ,1:1.2.0,$1)
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+ req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
+ min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
+ else
+ req_libgcrypt_api=0
+ min_libgcrypt_version="$tmp"
+ fi
+
+ AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
+ ok=no
+ if test "$LIBGCRYPT_CONFIG" != "no" ; then
+ req_major=`echo $min_libgcrypt_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ req_minor=`echo $min_libgcrypt_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+ req_micro=`echo $min_libgcrypt_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+ if test -z "$use_gpgrt_config"; then
+ libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
+ else
+ libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion`
+ fi
+ major=`echo $libgcrypt_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+ minor=`echo $libgcrypt_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+ micro=`echo $libgcrypt_config_version | \
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+ if test "$major" -gt "$req_major"; then
+ ok=yes
+ else
+ if test "$major" -eq "$req_major"; then
+ if test "$minor" -gt "$req_minor"; then
+ ok=yes
+ else
+ if test "$minor" -eq "$req_minor"; then
+ if test "$micro" -ge "$req_micro"; then
+ ok=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test $ok = yes; then
+ AC_MSG_RESULT([yes ($libgcrypt_config_version)])
+ else
+ AC_MSG_RESULT(no)
+ fi
+ if test $ok = yes; then
+ # If we have a recent libgcrypt, we should also check that the
+ # API is compatible
+ if test "$req_libgcrypt_api" -gt 0 ; then
+ if test -z "$use_gpgrt_config"; then
+ tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
+ else
+ tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0`
+ fi
+ if test "$tmp" -gt 0 ; then
+ AC_MSG_CHECKING([LIBGCRYPT API version])
+ if test "$req_libgcrypt_api" -eq "$tmp" ; then
+ AC_MSG_RESULT([okay])
+ else
+ ok=no
+ AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
+ fi
+ fi
+ fi
+ fi
+ if test $ok = yes; then
+ LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
+ LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
+ ifelse([$2], , :, [$2])
+ if test -z "$use_gpgrt_config"; then
+ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
+ else
+ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none`
+ fi
+ if test x"$libgcrypt_config_host" != xnone ; then
+ if test x"$libgcrypt_config_host" != x"$host" ; then
+ AC_MSG_WARN([[
+***
+*** The config script "$LIBGCRYPT_CONFIG" was
+*** built for $libgcrypt_config_host and thus may not match the
+*** used host $host.
+*** You may want to use the configure option --with-libgcrypt-prefix
+*** to specify a matching config script or use \$SYSROOT.
+***]])
+ gpg_config_script_warn="$gpg_config_script_warn libgcrypt"
+ fi
+ fi
+ else
+ LIBGCRYPT_CFLAGS=""
+ LIBGCRYPT_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(LIBGCRYPT_CFLAGS)
+ AC_SUBST(LIBGCRYPT_LIBS)
+])
diff --git a/m4/lock.m4 b/m4/lock.m4
@@ -0,0 +1,47 @@
+# lock.m4 serial 14
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_LOCK],
+[
+ AC_REQUIRE([gl_THREADLIB])
+ if test "$gl_threads_api" = posix; then
+ # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
+ # pthread_rwlock_* functions.
+ has_rwlock=false
+ AC_CHECK_TYPE([pthread_rwlock_t],
+ [has_rwlock=true
+ AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+ [Define if the POSIX multithreading library has read/write locks.])],
+ [],
+ [#include <pthread.h>])
+ if $has_rwlock; then
+ gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
+ fi
+ # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM(
+ [[#include <pthread.h>]],
+ [[
+#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
+error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif
+ ]])],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+ [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+ fi
+ gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/glthread/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [:])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
@@ -0,0 +1,113 @@
+# longlong.m4 serial 19
+dnl Copyright (C) 1999-2007, 2009-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ([2.62])
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This can be faster than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [ac_cv_type_long_long_int=yes
+ if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+ ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+ if test $ac_cv_type_long_long_int = yes; then
+ dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+ dnl If cross compiling, assume the bug is not important, since
+ dnl nobody cross compiles for this platform as far as we know.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif]],
+ [[long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;]])],
+ [],
+ [ac_cv_type_long_long_int=no],
+ [:])
+ fi
+ fi])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type 'long long int'.])
+ fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This can be faster than what's in Autoconf 2.62 through 2.68.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [ac_cv_type_unsigned_long_long_int=yes
+ if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+ AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [],
+ [ac_cv_type_unsigned_long_long_int=no])
+ fi])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type 'unsigned long long int'.])
+ fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+ AC_LANG_PROGRAM(
+ [[/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));]])
+])
diff --git a/m4/mhd_append_flag_to_var.m4 b/m4/mhd_append_flag_to_var.m4
@@ -0,0 +1,48 @@
+# SYNOPSIS
+#
+# MHD_APPEND_FLAG_TO_VAR([VARIABLE-TO-EXTEND], [FLAG-TO-APPEND])
+#
+# DESCRIPTION
+#
+# This macro sets VARIABLE-TO-EXTEND to the value of VARIABLE-TO-EXTEND with
+# appended FLAG-TO-APPEND. If current value of VARIABLE-TO-EXTEND and
+# FLAG-TO-APPEND are both non-empty strings then space is added between them.
+#
+# Example usage:
+#
+# MHD_APPEND_FLAG_TO_VAR([my_CFLAGS], [-Wall])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_APPEND_FLAG_TO_VAR],[dnl
+m4_ifblank([$1],[m4_fatal([$0: First macro argument must not be empty])])dnl
+m4_bmatch([$1], [\$], [m4_fatal([$0: First macro argument must not contain '$'])])dnl
+m4_bmatch([$1], [,], [m4_fatal([$0: First macro argument must not contain ','])])dnl
+m4_bmatch(_mhd_norm_expd([$1]), [\s],dnl
+[m4_fatal([$0: First macro argument must not contain whitespaces])])dnl
+m4_pushdef([varExtd],_mhd_norm_expd([$1]))dnl
+m4_bmatch([$2],[\$],dnl
+[dnl The second parameter is a variable value
+AS_IF([test -z "_mhd_norm_expd([$2])"],dnl
+[varExtd="${varExtd}"],dnl
+[test -z "${varExtd}"],dnl
+[varExtd="_mhd_norm_expd([$2])"],dnl
+[varExtd="${varExtd} _mhd_norm_expd([$2])"])
+],dnl
+[dnl The second parameter is not a variable value
+m4_ifnblank(_mhd_norm_expd([$2]),dnl
+[AS_IF([test -z "${varExtd}"],[varExtd="_mhd_norm_expd([$2])"],[varExtd="${varExtd} _mhd_norm_expd([$2])"])
+],dnl
+[m4_n([varExtd="${varExtd}"])])])dnl m4_ifnblank m4_bmatch
+m4_popdef([varExtd])dnl
+])dnl AC_DEFUN
diff --git a/m4/mhd_check_add_cc_cflag.m4 b/m4/mhd_check_add_cc_cflag.m4
@@ -0,0 +1,63 @@
+# SYNOPSIS
+#
+# MHD_CHECK_ADD_CC_CFLAG([FLAG-TO-TEST], [VARIABLE-TO-EXTEND],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flag is supported.
+# The check is performing by appending FLAG-TO-TEST to the value of
+# VARIABLE-TO-EXTEND (CFLAGS if not specified), then prepending result to
+# CFLAGS (unless VARIABLE-TO-EXTEND is CFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND. Otherwise, if compile and link without test flag cannot
+# be done without any warning, the flag is considered to be unsuppoted.
+#
+# Example usage:
+#
+# MHD_CHECK_ADD_CC_CFLAG([-Wshadow], [additional_CFLAGS])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_CHECK_ADD_CC_CFLAG],[dnl
+_MHD_CHECK_ADD_CC_XFLAG([$1],[$2],[$3],[$4],[[CFLAGS]])dnl
+])
+
+
+# SYNOPSIS
+#
+# _MHD_CHECK_ADD_CC_XFLAG([FLAG-TO-TEST], [VARIABLE-TO-EXTEND],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED],
+# [CFLAGS|LDFLAGS])
+#
+AC_DEFUN([_MHD_CHECK_ADD_CC_XFLAG],[dnl
+ AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifnblank, m4_default
+ AC_LANG_ASSERT([C])dnl
+ m4_ifblank([$1], [m4_fatal([First macro argument must not be empty])])dnl
+ m4_bmatch(_mhd_norm_expd([$1]), [\s],dnl
+ [m4_fatal([First macro argument must not contain whitespaces])])dnl
+ m4_bmatch(_mhd_norm_expd([$2]), [\s],dnl
+ [m4_fatal([Second macro argument must not contain whitespaces])])dnl
+ m4_bmatch([$1], [\$], [m4_fatal([$0: First macro argument must not contain '$'])])dnl
+ m4_bmatch([$2], [\$], [m4_fatal([$0: Second macro argument must not contain '$'])])dnl
+ m4_bmatch(_mhd_norm_expd([$5]), [^\(CFLAGS\|LDFLAGS\)$],[],dnl
+ [m4_fatal([$0: Fifth macro argument must be either 'CFLAGS' or 'LDFLAGS; ']_mhd_norm_expd([$5])[' is not supported])])dnl
+ m4_ifnblank([$2],
+ [_MHD_CHECK_CC_XFLAG([$1], [$2],
+ [MHD_APPEND_FLAG_TO_VAR(_mhd_norm_expd([$2]),_mhd_norm_expd([$1]))
+ $3],[$4],[$5])],
+ [_MHD_CHECK_CC_XFLAG([$1],_mhd_norm_expd([$5]),
+ [MHD_APPEND_FLAG_TO_VAR(_mhd_norm_expd([$5]),_mhd_norm_expd([$1]))
+ $3],[$4],[$5])]
+ )
+])
diff --git a/m4/mhd_check_add_cc_cflags.m4 b/m4/mhd_check_add_cc_cflags.m4
@@ -0,0 +1,39 @@
+# SYNOPSIS
+#
+# MHD_CHECK_ADD_CC_CFLAGS([FLAGS-TO-TEST], [VARIABLE-TO-EXTEND])
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flags are supported.
+# The FLAGS-TO-TEST parameter is whitespace-separated flagto to test.
+# The flags are tested one-by-one, all supported flags are added to the
+# VARIABLE-TO-EXTEND.
+# Every flag check is performing by appending one flag to the value of
+# VARIABLE-TO-EXTEND (CFLAGS if not specified), then prepending result to
+# CFLAGS (unless VARIABLE-TO-EXTEND is CFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND. Otherwise, if compile and link without test flag cannot
+# be done without any warning, the flag is considered to be unsuppoted.
+#
+# Example usage:
+#
+# MHD_CHECK_ADD_CC_CFLAGS([-Wshadow -Walloc-zero -Winit-self],
+# [additional_CFLAGS])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_CHECK_ADD_CC_CFLAGS],[dnl
+m4_foreach_w([test_flag],[$1],
+[MHD_CHECK_ADD_CC_CFLAG([test_flag],[$2])
+])dnl
+])
diff --git a/m4/mhd_check_add_cc_ldflag.m4 b/m4/mhd_check_add_cc_ldflag.m4
@@ -0,0 +1,34 @@
+# SYNOPSIS
+#
+# MHD_CHECK_ADD_CC_LDFLAG([FLAG-TO-TEST], [VARIABLE-TO-EXTEND],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flag is supported.
+# The check is performing by appending FLAG-TO-TEST to the value of
+# VARIABLE-TO-EXTEND (LDFLAGS if not specified), then prepending result to
+# LDFLAGS (unless VARIABLE-TO-EXTEND is LDFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND. Otherwise, if compile and link without test flag cannot
+# be done without any warning, the flag is considered to be unsuppoted.
+#
+# Example usage:
+#
+# MHD_CHECK_ADD_CC_LDFLAG([-pie], [additional_LDFLAGS])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_CHECK_ADD_CC_LDFLAG],[dnl
+_MHD_CHECK_ADD_CC_XFLAG([$1],[$2],[$3],[$4],[[LDFLAGS]])dnl
+])
diff --git a/m4/mhd_check_add_cc_ldflags.m4 b/m4/mhd_check_add_cc_ldflags.m4
@@ -0,0 +1,39 @@
+# SYNOPSIS
+#
+# MHD_CHECK_ADD_CC_LDFLAGS([FLAGS-TO-TEST], [VARIABLE-TO-EXTEND])
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flags are supported.
+# The FLAGS-TO-TEST parameter is whitespace-separated flagto to test.
+# The flags are tested one-by-one, all supported flags are added to the
+# VARIABLE-TO-EXTEND.
+# Every flag check is performing by appending one flag to the value of
+# VARIABLE-TO-EXTEND (LDFLAGS if not specified), then prepending result to
+# LDFLAGS (unless VARIABLE-TO-EXTEND is LDFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND. Otherwise, if compile and link without test flag cannot
+# be done without any warning, the flag is considered to be unsuppoted.
+#
+# Example usage:
+#
+# MHD_CHECK_ADD_CC_LDFLAGS([-W,--strip-all -Wl,--fatal-warnings],
+# [additional_LDFLAGS])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_CHECK_ADD_CC_LDFLAGS],[dnl
+m4_foreach_w([test_flag],[$1],
+[MHD_CHECK_ADD_CC_LDFLAG([test_flag],[$2])
+])dnl
+])
diff --git a/m4/mhd_check_cc_cflag.m4 b/m4/mhd_check_cc_cflag.m4
@@ -0,0 +1,256 @@
+# SYNOPSIS
+#
+# MHD_CHECK_CC_CFLAG([FLAG-TO-TEST], [VARIABLE-TO-PREPEND-CFLAGS],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flag is supported.
+# The check is performing by prepending FLAG-TO-TEST to CFLAGS, then
+# prepending value of VARIABLE-TO-PREPEND-CFLAGS (if any) to CFLAGS, and
+# then performing compile and link test. If test succeed without warnings,
+# then the flag is considered to be supported. Otherwise, if compile and link
+# without test flag can be done without any warning, the flag is considered
+# to be unsuppoted.
+#
+# Example usage:
+#
+# MHD_CHECK_CC_CFLAG([-Wshadow], [additional_CFLAGS],
+# [additional_CFLAGS="${additional_CFLAGS} -Wshadow"])
+#
+# Defined cache variable used in check so if any test will not work
+# correctly on some platform, user may simply fix it by giving cache
+# variable in configure parameters, for example:
+#
+# ./configure mhd_cv_cc_fl_supp__Wshadow=no
+#
+# This simplify building from source on exotic platforms as patching
+# of configure.ac is not required to change results of tests.
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_CHECK_CC_CFLAG],[dnl
+_MHD_CHECK_CC_XFLAG([$1],[$2],[$3],[$4],[[CFLAGS]])dnl
+])
+
+# SYNOPSIS
+#
+# _MHD_CHECK_CC_XFLAG([FLAG-TO-TEST], [VARIABLE-TO-PREPEND-CFLAGS],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED],
+# [CFLAGS|LDFLAGS])
+#
+AC_DEFUN([_MHD_CHECK_CC_XFLAG],[dnl
+ AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifnblank
+ AC_LANG_ASSERT([C])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ m4_ifblank([$1], [m4_fatal([$0: First macro argument must not be empty])])dnl
+ m4_bmatch(m4_normalize([$1]), [\s],dnl
+ [m4_fatal([$0: First macro argument must not contain whitespaces])])dnl
+ m4_bmatch(_mhd_norm_expd([$2]), [\s],dnl
+ [m4_fatal([$0: Second macro argument must not contain whitespaces])])dnl
+ m4_bmatch([$1], [\$], [m4_fatal([$0: First macro argument must not contain '$'])])dnl
+ m4_bmatch([$2], [\$], [m4_fatal([$0: Second macro argument must not contain '$'])])dnl
+ AC_REQUIRE([MHD_FIND_CC_XFLAG_WARNPARAMS])dnl sets 'mhd_xFLAGS_params_warn' variable
+ m4_bmatch(_mhd_norm_expd([$5]), [^\(CFLAGS\|LDFLAGS\)$],[],dnl
+ [m4_fatal([$0: Fifth macro argument must be either 'CFLAGS' or 'LDFLAGS; ']_mhd_norm_expd([$5])[' is not supported])])dnl
+ _MHD_CHECK_CC_XFLAG_BODY([$1],[$2],[$3],[$4],[mhd_xFLAGS_params_warn],[$5])dnl
+])
+
+
+# SYNOPSIS
+#
+# _MHD_CHECK_CC_XFLAG_BODY([FLAG-TO-TEST], [VARIABLE-TO-PREPEND-CFLAGS],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED],
+# [VARIABLE-TO-ENABLE-WARNS], [CFLAGS|LDFLAGS])
+#
+AC_DEFUN([_MHD_CHECK_CC_XFLAG_BODY],[dnl
+ AC_LANG_ASSERT([C])dnl
+ m4_ifblank([$1], [m4_fatal([$0: First macro argument must not be empty])])dnl
+ m4_bmatch(_mhd_norm_expd([$1]), [\s],dnl
+ [m4_fatal([$0: First macro argument must not contain whitespaces])])dnl
+ m4_bmatch(_mhd_norm_expd([$2]), [\s],dnl
+ [m4_fatal([$0: Second macro argument must not contain whitespaces])])dnl
+ m4_bmatch([$1], [\$], [m4_fatal([$0: First macro argument must not contain '$'])])dnl
+ m4_bmatch([$2], [\$], [m4_fatal([$0: Second macro argument must not contain '$'])])dnl
+ m4_ifblank([$5], [m4_fatal([$0: Fifth macro argument must not be empty])])dnl
+ m4_bmatch([$5], [\$], [m4_fatal([$0: Fifth macro argument must not contain '$'])])dnl
+ m4_bmatch(_mhd_norm_expd([$6]), [^\(CFLAGS\|LDFLAGS\)$],[],dnl
+ [m4_fatal([$0: Sixth macro argument must be either 'CFLAGS' or 'LDFLAGS; ']_mhd_norm_expd([$6])[' is not supported])])dnl
+ m4_pushdef([XFLAGS],_mhd_norm_expd([$6]))dnl
+ dnl Keep uppercase letters to avoid clashes for parameters like -fPIE and -fpie
+ AS_VAR_PUSHDEF([cv_Var],[mhd_cv_cc_]m4_tolower(m4_substr(_mhd_norm_expd([$6]),0,1))[fl_supp_]m4_bpatsubst(_mhd_norm_expd([$1]),[[^a-zA-Z0-9]],[_]))dnl
+
+ AC_CACHE_CHECK([whether $[]CC supports _mhd_norm_expd([$1]) flag], cv_Var,
+ [dnl
+ AS_VAR_PUSHDEF([save_xFLAGS_Var], [mhd_check_cc_flag_save_]XFLAGS)dnl
+ AS_VAR_SET([save_xFLAGS_Var],["${XFLAGS}"])
+ m4_ifnblank([$2],[dnl
+ m4_if(_mhd_norm_expd([$2]),[XFLAGS],
+ [XFLAGS="${save_xFLAGS_Var} _mhd_norm_expd([$1]) $[]{_mhd_norm_expd([$5])}"],
+ [XFLAGS="$[]{_mhd_norm_expd([$2])} _mhd_norm_expd([$1]) ${save_xFLAGS_Var} $[]{_mhd_norm_expd([$5])}"])
+ ],[dnl
+ XFLAGS="_mhd_norm_expd([$1]) $[]XFLAGS $[]{_mhd_norm_expd([$5])}"
+ ])dnl
+ mhd_check_cc_flag_save_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ [#] Reuse the same source for all the checks here
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+int main(void)
+{
+ return 0;
+}
+ ]])])
+ AC_LINK_IFELSE([],
+ [AS_VAR_SET([cv_Var],["yes"])],
+ [ [#] Compile and link failed with test flag added
+ m4_ifnblank([$2],[dnl
+ m4_if(_mhd_norm_expd([$2]),[XFLAGS],
+ [XFLAGS="${save_xFLAGS_Var} $[]{_mhd_norm_expd([$5])}"],
+ [XFLAGS="$[]{_mhd_norm_expd([$2])} ${save_xFLAGS_Var} $[]{_mhd_norm_expd([$5])}"])
+ ],[dnl
+ XFLAGS="${save_xFLAGS_Var} $[]{_mhd_norm_expd([$5])}"
+ ])dnl
+ AC_LINK_IFELSE([],
+ [AS_VAR_SET([cv_Var],["no"])],
+ [ [#] Compile and link failed with test flag removed as well
+ m4_ifnblank([$2],[dnl
+ m4_if(_mhd_norm_expd([$2]),[XFLAGS],
+ [XFLAGS="${save_xFLAGS_Var} _mhd_norm_expd([$1])"],
+ [XFLAGS="$[]{_mhd_norm_expd([$2])} _mhd_norm_expd([$1]) ${save_xFLAGS_Var}"])
+ ],[dnl
+ XFLAGS="_mhd_norm_expd([$1]) ${save_xFLAGS_Var}"
+ ])dnl
+ ac_c_werror_flag="$mhd_check_cc_flag_save_c_werror_flag"
+ AC_LINK_IFELSE([],
+ [AS_VAR_SET([cv_Var],["yes"])],
+ [AS_VAR_SET([cv_Var],["no"])],
+ )
+ ]
+ )
+ ]
+ )
+ ac_c_werror_flag="$mhd_check_cc_flag_save_c_werror_flag"
+ AS_VAR_SET([XFLAGS],["${save_xFLAGS_Var}"])
+ AS_UNSET(save_xFLAGS_Var)
+ AS_VAR_POPDEF([save_xFLAGS_Var])dnl
+ ]
+ )
+ m4_ifnblank([$3$4],[dnl
+ AS_VAR_IF([cv_Var], ["yes"], [$3], m4_default_nblank([$4]))
+ ])dnl
+ AS_VAR_POPDEF([cv_Var])dnl
+ m4_popdef([XFLAGS])dnl
+])
+
+
+#
+# SYNOPSIS
+#
+# MHD_FIND_CC_XFLAG_WARNPARAMS()
+#
+AC_DEFUN([MHD_FIND_CC_XFLAG_WARNPARAMS],[dnl
+ AC_LANG_ASSERT([C])dnl
+ AC_REQUIRE([MHD_FIND_CC_CFLAG_WWARN])dnl
+ mhd_xFLAGS_params_warn=''
+ _MHD_CHECK_CC_XFLAG_BODY([-Wunused-command-line-argument],[],
+ [
+ MHD_APPEND_FLAG_TO_VAR([mhd_xFLAGS_params_warn],[-Wunused-command-line-argument])
+ ],[],[mhd_cv_cc_flag_Wwarn],[[CFLAGS]]
+ )
+ _MHD_CHECK_CC_XFLAG_BODY([-Wignored-optimization-argument],[],
+ [
+ MHD_APPEND_FLAG_TO_VAR([mhd_xFLAGS_params_warn],[-Wignored-optimization-argument])
+ ],[],[mhd_cv_cc_flag_Wwarn],[[CFLAGS]]
+ )
+ _MHD_CHECK_CC_XFLAG_BODY([-Winvalid-command-line-argument],[],
+ [
+ MHD_APPEND_FLAG_TO_VAR([mhd_xFLAGS_params_warn],[-Winvalid-command-line-argument])
+ ],[],[mhd_cv_cc_flag_Wwarn],[[CFLAGS]]
+ )
+ _MHD_CHECK_CC_XFLAG_BODY([-Wunknown-argument],[],
+ [
+ MHD_APPEND_FLAG_TO_VAR([mhd_xFLAGS_params_warn],[-Wunknown-argument])
+ ],[],[mhd_cv_cc_flag_Wwarn],[[CFLAGS]]
+ )
+ MHD_PREPEND_FLAG_TO_VAR([mhd_xFLAGS_params_warn],[$mhd_cv_cc_flag_Wwarn])
+])
+
+
+#
+# SYNOPSIS
+#
+# MHD_FIND_CC_CFLAG_WWARN()
+#
+AC_DEFUN([MHD_FIND_CC_CFLAG_WWARN],[dnl
+ AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifnblank
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_LANG_ASSERT([C])dnl
+ AC_MSG_CHECKING([for $[]CC flag to warn on unknown -W parameters])
+ AC_CACHE_VAL([mhd_cv_cc_flag_Wwarn],
+ [
+ mhd_check_cc_flagwarn_save_c_werror_flag="$ac_c_werror_flag"
+ ac_c_werror_flag=yes
+ mhd_find_cc_Wwarn_save_CFLAGS="$CFLAGS"
+ AS_UNSET([mhd_cv_cc_flag_Wwarn])
+ for mhd_cv_cc_flag_Wwarn in '' '-Wunknown-warning-option' '-Werror=unknown-warning-option' ; do
+ AS_VAR_IF([mhd_cv_cc_flag_Wwarn], ["unknown"], [break])
+ [#] Reuse the same source for all the checks here
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+int main(void)
+{
+ return 0;
+}
+ ]])])
+ CFLAGS="-Wmhd-noexist-flag $mhd_find_cc_Wwarn_save_CFLAGS $mhd_cv_cc_flag_Wwarn"
+ AC_LINK_IFELSE([],
+ [],
+ [ [#] Compile and link failed if test flag and non-existing flag added
+ CFLAGS="$mhd_find_cc_Wwarn_save_CFLAGS $mhd_cv_cc_flag_Wwarn"
+ AC_LINK_IFELSE([],
+ [ [#] Compile and link succeed if only test flag added
+ break
+ ]
+ )
+ ]
+ )
+ done
+ CFLAGS="$mhd_find_cc_Wwarn_save_CFLAGS"
+ AS_VAR_IF([mhd_cv_cc_flag_Wwarn], ["unknown"],
+ [
+ _AS_ECHO_LOG([No suitable flags detected. Check whether default flags are correct.])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+int main(void)
+{
+ return 0;
+}
+ ]])],
+ [:],
+ [ [#] Compile and link fails (or warns) with default flags
+ AC_MSG_WARN([Compiler warns (of fails) with default flags!])
+ AC_MSG_WARN([Check whether compiler and compiler flags are correct.])
+ ]
+ )
+ ]
+ )
+ CFLAGS="$mhd_find_cc_Wwarn_save_CFLAGS"
+ AS_UNSET([mhd_find_cc_Wwarn_save_CFLAGS])
+ ac_c_werror_flag="$mhd_check_cc_flagwarn_save_c_werror_flag"
+ AS_UNSET([mhd_check_cc_flagwarn_save_c_werror_flag])
+ ]
+ )
+ AS_IF([test -z "$mhd_cv_cc_flag_Wwarn"],
+ [AC_MSG_RESULT([none needed])],
+ [AC_MSG_RESULT([$mhd_cv_cc_flag_Wwarn])])
+ AS_VAR_IF([mhd_cv_cc_flag_Wwarn], ["unknown"],
+ [AC_MSG_WARN([Unable to find compiler flags to warn on unsupported -W options. Final compiler options may be suboptimal.])])
+
+])
diff --git a/m4/mhd_check_cc_ldflag.m4 b/m4/mhd_check_cc_ldflag.m4
@@ -0,0 +1,43 @@
+# SYNOPSIS
+#
+# MHD_CHECK_CC_LDFLAG([FLAG-TO-TEST], [VARIABLE-TO-PREPEND-LDFLAGS],
+# [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flag is supported.
+# The check is performing by prepending FLAG-TO-TEST to LDFLAGS, then
+# prepending value of VARIABLE-TO-PREPEND-LDFLAGS (if any) to LDFLAGS, and
+# then performing compile and link test. If test succeed without warnings,
+# then the flag is considered to be supported. Otherwise, if compile and link
+# without test flag can be done without any warning, the flag is considered
+# to be unsuppoted.
+#
+# Example usage:
+#
+# MHD_CHECK_CC_LDFLAG([-pie], [additional_LDFLAGS],
+# [additional_LDFLAGS="${additional_LDFLAGS} -pie"])
+#
+# Defined cache variable used in check so if any test will not work
+# correctly on some platform, user may simply fix it by giving cache
+# variable in configure parameters, for example:
+#
+# ./configure mhd_cv_cc_fl_supp__wshadow=no
+#
+# This simplify building from source on exotic platforms as patching
+# of configure.ac is not required to change results of tests.
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_CHECK_CC_LDFLAG],[dnl
+_MHD_CHECK_CC_XFLAG([$1],[$2],[$3],[$4],[[LDFLAGS]])dnl
+])
diff --git a/m4/mhd_check_func.m4 b/m4/mhd_check_func.m4
@@ -0,0 +1,104 @@
+# SYNOPSIS
+#
+# MHD_CHECK_FUNC([FUNCTION_NAME],
+# [INCLUDES=AC_INCLUDES_DEFAULT], [CHECK_CODE],
+# [ACTION-IF-AVAILABLE], [ACTION-IF-NOT-AVAILABLE],
+# [ADDITIONAL_LIBS])
+#
+# DESCRIPTION
+#
+# This macro checks for presence of specific function by including
+# specified headers and compiling and linking CHECK_CODE.
+# This checks both declaration and presence in library.
+# If function is available then macro HAVE_function_name (the name
+# of the function convetedd to all uppercase characters) is defined
+# automatically.
+# Unlike AC_CHECK_FUNCS macro, this macro do not produce false
+# negative result if function is declared with specific calling
+# conventions like __stdcall' or attribute like
+# __attribute__((__dllimport__)) and linker failing to build test
+# program due to the different calling conventions.
+# By using definition from provided headers, this macro ensures that
+# correct calling convention is used for detection.
+#
+# Example usage:
+#
+# MHD_CHECK_FUNC([memmem],
+# [[#include <string.h>]],
+# [const void *ptr = memmem("aa", 2, "a", 1); (void)ptr;],
+# [var_use_memmem='yes'], [var_use_memmem='no'])
+#
+# The cache variable used in check so if any test will not work
+# correctly on some platform, user may simply fix it by giving cache
+# variable in configure parameters, for example:
+#
+# ./configure mhd_cv_func_memmem_have=no
+#
+# This simplifies building from source on exotic platforms as patching
+# of configure.ac is not required to change results of tests.
+#
+# LICENSE
+#
+# Copyright (c) 2019-2023 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 5
+
+AC_DEFUN([MHD_CHECK_FUNC],[dnl
+AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifblank, m4_ifnblank
+m4_newline([[# Expansion of $0 macro starts here]])
+AC_LANG_ASSERT([C])dnl
+m4_ifblank(m4_translit([$1],[()],[ ]), [m4_fatal([First macro argument must not be empty])])dnl
+m4_ifblank([$3], [m4_fatal([Third macro argument must not be empty])])dnl
+m4_bmatch(m4_normalize([$1]), [\s],dnl
+ [m4_fatal([First macro argument must not contain whitespaces])])dnl
+m4_if(m4_index([$3], m4_normalize(m4_translit([$1],[()],[ ]))), [-1], dnl
+ [m4_fatal([CHECK_CODE parameter (third macro argument) does not contain ']m4_normalize([$1])[' token])])dnl
+AS_VAR_PUSHDEF([decl_cv_Var],[ac_cv_have_decl_]m4_bpatsubst(_mhd_norm_expd(m4_translit([$1],[()],[ ])),[[^a-zA-Z0-9]],[_]))dnl
+AS_VAR_PUSHDEF([cv_Var],[mhd_cv_func_]m4_bpatsubst(_mhd_norm_expd(m4_translit([$1],[()],[ ])),[[^a-zA-Z0-9]],[_]))dnl
+AS_VAR_SET_IF([cv_Var],[],[AC_CHECK_DECL(_mhd_norm_expd([$1]),[],[],[$2])])
+AC_CACHE_CHECK([for function $1], [cv_Var],dnl
+ [dnl
+ AS_VAR_IF([decl_cv_Var],["yes"],dnl
+ [dnl
+ m4_ifnblank([$6],[dnl
+ mhd_check_func_SAVE_LIBS="$LIBS"
+ LIBS="_mhd_norm_expd([$6]) $LIBS"
+ ])dnl
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE([
+m4_default_nblank([$2],[AC_INCLUDES_DEFAULT])
+
+[int main(void)
+{
+
+ ]$3[
+
+ return 0;
+}
+ ]])
+ ],
+ [AS_VAR_SET([cv_Var],["yes"])],
+ [AS_VAR_SET([cv_Var],["no"])]dnl
+ )
+ m4_ifnblank([$6],[dnl
+ LIBS="${mhd_check_func_SAVE_LIBS}"
+ AS_UNSET([mhd_check_func_SAVE_LIBS])
+ ])dnl
+ ],[AS_VAR_SET([cv_Var],["no"])]dnl
+ )dnl
+ ]dnl
+)
+AS_VAR_IF([cv_Var], ["yes"],
+ [AC_DEFINE([[HAVE_]]m4_bpatsubst(m4_toupper(_mhd_norm_expd(m4_translit([$1],[()],[ ]))),[[^A-Z0-9]],[_]),
+ [1], [Define to 1 if you have the ']_mhd_norm_expd(m4_translit([$1],[()],[ ]))[' function.])
+ m4_n([$4])dnl
+ ],[$5])
+AS_VAR_POPDEF([cv_Var])dnl
+AS_VAR_POPDEF([decl_cv_Var])dnl
+m4_newline([[# Expansion of $0 macro ends here]])
+])dnl AC_DEFUN MHD_CHECK_FUNC
diff --git a/m4/mhd_check_func_gettimeofday.m4 b/m4/mhd_check_func_gettimeofday.m4
@@ -0,0 +1,53 @@
+# SYNOPSIS
+#
+# MHD_CHECK_FUNC_GETTIMEOFDAY([ACTION-IF-AVAILABLE],
+# [ACTION-IF-NOT-AVAILABLE])
+#
+# DESCRIPTION
+#
+# This macro checks for presence of gettimeofday() function.
+# If function is available macro HAVE_GETTIMEOFDAY is defined
+# automatically.
+#
+# Example usage:
+#
+# MHD_CHECK_FUNC_GETTIMEOFDAY([var_use_gettimeofday='yes'])
+#
+# The cache variable used in check so if any test will not work
+# correctly on some platform, user may simply fix it by giving cache
+# variable in configure parameters, for example:
+#
+# ./configure mhd_cv_func_memmem_have=no
+#
+# This simplifies building from source on exotic platforms as patching
+# of configure.ac is not required to change results of tests.
+#
+# LICENSE
+#
+# Copyright (c) 2019-2023 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_CHECK_FUNC_GETTIMEOFDAY],[dnl
+AC_CHECK_HEADERS([sys/time.h time.h])dnl
+MHD_CHECK_FUNC([[gettimeofday]],
+ [[
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif /* HAVE_SYS_TIME_H */
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif /* HAVE_TIME_H */
+ ]],
+ [[
+ struct timeval tv;
+ if (0 != gettimeofday (&tv, (void*) 0))
+ return 1;
+ ]],[$1],[$2]
+)
+])dnl AC_DEFUN MHD_CHECK_FUNC_GETTIMEOFDAY
diff --git a/m4/mhd_check_link_run.m4 b/m4/mhd_check_link_run.m4
@@ -0,0 +1,67 @@
+# SYNOPSIS
+#
+# MHD_CHECK_LINK_RUN(MESSAGE, CACHE_ID, COMMAND_IF_CROSS_COMPILING, INPUT,
+# [ACTION_IF_SUCCEED], [ACTION_IF_FAILED])
+#
+# DESCRIPTION
+#
+# Improved version of AC_RUN_IFELSE macro.
+# Unlike AC_RUN_IFELSE, this macro tries to link the code if cross-compiling.
+# Action COMMAND_IF_CROSS_COMPILING is executed only if link is succeed,
+# otherwise CACHE_ID variable set to "no".
+# COMMAND_IF_CROSS_COMPILING action must set CACHE_ID variable to "yes", "no",
+# "assuming yes" or "assuming no".
+# ACTION_IF_SUCCEED is executed if result is "yes" or "assuming yes".
+# ACTION_IF_FAILED is executed if result is "no" or "assuming no".
+#
+# Example usage:
+#
+# MHD_CHECK_LINK_RUN([for valid snprintf()], [mhd_cv_snprintf_valid],
+# [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+# [if (4 != snprintf(NULL, 0, "test"))
+# return 2;])],
+# [mhd_cv_snprintf_valid='assuming no'])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_CHECK_LINK_RUN],[dnl
+m4_ifblank([$1],[m4_fatal([$0: The first macro argument ("MESSAGE") must not be empty])])dnl
+m4_ifblank([$2],[m4_fatal([$0: The second macro argument ("CACHE_ID") must not be empty])])dnl
+m4_ifblank([$3],[m4_fatal([$0: The third macro argument ("COMMAND_IF_CROSS_COMPILING") ]dnl
+[must not be empty])])dnl
+m4_ifblank([$4],[m4_fatal([$0: The fourth macro argument ("INPUT") must not be empty])])dnl
+m4_bmatch(_mhd_norm_expd([$2]),[\s],dnl
+[m4_fatal([$0: The second macro argument ("CACHE_ID") must not contain whitespaces])])dnl
+m4_bmatch(_mhd_norm_expd([$3]),[\<]m4_re_escape(_mhd_norm_expd([$2]))[\>],[],dnl
+[m4_fatal([$0: The third macro argument ("COMMAND_IF_CROSS_COMPILING") must assign ]dnl
+[a value to the cache variable ']_mhd_norm_expd([$2])['])])dnl
+m4_pushdef([cacheVar],_mhd_norm_expd([$2]))dnl
+AC_CACHE_CHECK([$1],[$2],
+[
+AC_LANG_CONFTEST([$4])
+AS_VAR_IF([cross_compiling],["yes"],
+[AC_LINK_IFELSE([],[
+$3
+],[cacheVar='no'])dnl AC_LINK_IFELSE
+],dnl
+[AC_RUN_IFELSE([],[cacheVar='yes'],[cacheVar='no'],[[# Dummy placeholder]])
+])
+rm -f conftest.$ac_ext
+])
+m4_ifnblank([$5],[
+AS_IF([test "x$cacheVar" = "xyes" || test "x$cacheVar" = "xassuming yes"],[$5])dnl AS_IF
+])dnl m4_ifnblank
+m4_ifnblank([$6],[
+AS_IF([test "x$cacheVar" = "xno" || test "x$cacheVar" = "xassuming no"],[$6])dnl AS_IF
+])dnl m4_ifnblank
+])dnl AC_DEFUN
diff --git a/m4/mhd_find_add_cc_cflag.m4 b/m4/mhd_find_add_cc_cflag.m4
@@ -0,0 +1,85 @@
+# SYNOPSIS
+#
+# MHD_FIND_ADD_CC_CFLAG([VARIABLE-TO-EXTEND],
+# [FLAG1-TO-TEST], [FLAG2-TO-TEST], ...)
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flags are supported.
+# The flags are checked one-by-one. The checking is stopped when the first
+# supported flag found.
+# The checks are performing by appending FLAGx-TO-TEST to the value of
+# VARIABLE-TO-EXTEND (CFLAGS if not specified), then prepending result to
+# CFLAGS (unless VARIABLE-TO-EXTEND is CFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND and next flags are not checked. If compile-link cycle
+# cannot be performed without warning with all tested flags, no flag is
+# added to the VARIABLE-TO-EXTEND.
+#
+# Example usage:
+#
+# MHD_CHECK_CC_CFLAG([additional_CFLAGS],
+# [-ggdb3], [-g3], [-ggdb], [-g])
+#
+# Note: Unlike others MHD_CHECK_*CC_CFLAG* macro, this macro uses another
+# order of parameters.
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_FIND_ADD_CC_CFLAG],[dnl
+_MHD_FIND_ADD_CC_XFLAG([[CFLAGS]],[],[],$@)])
+
+
+# SYNOPSIS
+#
+# _MHD_FIND_ADD_CC_XFLAG([CFLAGS|LDFLAGS],
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+# [VARIABLE-TO-EXTEND],
+# [FLAG1-TO-TEST], [FLAG2-TO-TEST], ...)
+#
+AC_DEFUN([_MHD_FIND_ADD_CC_XFLAG],[dnl
+ AC_PREREQ([2.64])dnl for m4_ifnblank
+ AC_LANG_ASSERT([C])dnl
+ m4_if(m4_eval([$# >= 5]), [0], [m4_fatal([$0: Macro must have at least five parameters])])dnl
+ m4_ifblank([$5],[m4_fatal([$0: Fifth macro argument must not be empty])])dnl
+ m4_ifnblank([$2$3],[m4_newline([m4_n([AS_UNSET([mhd_cc_found_flag])])])])dnl
+ m4_bmatch(_mhd_norm_expd([$1]), [^\(CFLAGS\|LDFLAGS\)$],[],dnl
+ [m4_fatal([$0: First macro argument must be either 'CFLAGS' or 'LDFLAGS; ']_mhd_norm_expd([$1])[' is not supported])])dnl
+ m4_ifnblank([$4],[_MHD_FIND_ADD_CC_XFLAG_BODY(m4_ifnblank([$2$3],[mhd_cc_found_flag]),[$1],[$4],m4_shiftn([4],$@))],dnl
+ [_MHD_FIND_ADD_CC_XFLAG_BODY(m4_ifnblank([$2$3],[mhd_cc_found_flag]),[$1],[$1],m4_shiftn([4],$@))])dnl
+ m4_ifnblank([$2$3],[
+ AS_IF([test -n "${mhd_cc_found_flag}"],[$2],[$3])
+ AS_UNSET([mhd_cc_found_flag])
+ ])dnl
+ ])dnl
+])
+
+
+# SYNOPSIS
+#
+# _MHD_FIND_ADD_CC_XFLAG_BODY([VAR-TO-SET],
+# [CFLAGS|LDFLAGS],
+# [VARIABLE-TO-EXTEND],
+# [FLAG1-TO-TEST], [FLAG2-TO-TEST], ...)
+#
+m4_define([_MHD_FIND_ADD_CC_XFLAG_BODY],[dnl
+m4_version_prereq([2.64])dnl for m4_ifnblank
+m4_if([$#],[0],[m4_fatal([$0: no parameters])])dnl
+m4_bmatch(_mhd_norm_expd([$2]),[^\(CFLAGS\|LDFLAGS\)$],[],dnl
+[m4_fatal([$0: Second macro argument must be either 'CFLAGS' or 'LDFLAGS; ']_mhd_norm_expd([$2])[' is not supported])])dnl
+m4_if([$#],[1],[m4_fatal([$0: not enough parameters])])dnl
+m4_if([$#],[2],[m4_fatal([$0: not enough parameters])])dnl
+m4_if([$#],[3],[m4_fatal([$0: not enough parameters])])dnl
+m4_if([$#],[4],[m4_ifnblank([$4],[_MHD_CHECK_ADD_CC_XFLAG([$4],[$3],m4_ifnblank([$1],[$1="_mhd_norm_expd([$4])"]),[],[$2])])],
+[m4_ifnblank([$4],[_MHD_CHECK_ADD_CC_XFLAG([$4],[$3],m4_ifnblank([$1],[$1="_mhd_norm_expd([$4])"]),[$0([$1],[$2],[$3],m4_shiftn([4],$@))],[$2])],
+[$0([$1],[$2],[$3],m4_shiftn([4],$@))])])dnl
+])
diff --git a/m4/mhd_find_add_cc_cflag_ifelse.m4 b/m4/mhd_find_add_cc_cflag_ifelse.m4
@@ -0,0 +1,45 @@
+# SYNOPSIS
+#
+# MHD_FIND_ADD_CC_CFLAG_IFELSE([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+# [VARIABLE-TO-EXTEND],
+# [FLAG1-TO-TEST], [FLAG2-TO-TEST], ...)
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flags are supported.
+# The flags are checked one-by-one. The checking is stopped when the first
+# supported flag found.
+# The checks are performing by appending FLAGx-TO-TEST to the value of
+# VARIABLE-TO-EXTEND (CFLAGS if not specified), then prepending result to
+# CFLAGS (unless VARIABLE-TO-EXTEND is CFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND and next flags are not checked. If compile-link cycle
+# cannot be performed without warning with all tested flags, no flag is
+# added to the VARIABLE-TO-EXTEND.
+# If any suitable flag is found, ACTION-IF-FOUND is executed otherwise
+# ACTION-IF-NOT-FOUND is executed. Found flag (if any) is available as
+# value of shell variable $mhd_cc_found_flag during action execution.
+#
+# Example usage:
+#
+# MHD_FIND_ADD_CC_CFLAG_IFELSE([AC_MSG_NOTICE([Enabled debug information])],
+# [],
+# [additional_CFLAGS],
+# [-ggdb3], [-g3], [-ggdb], [-g])
+#
+# Note: Unlike others MHD_CHECK_*CC_CFLAG* macro, this macro uses another
+# order of parameters.
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_FIND_ADD_CC_CFLAG_IFELSE],[dnl
+_MHD_FIND_ADD_CC_XFLAG([[CFLAGS]],$@)])
diff --git a/m4/mhd_find_add_cc_ldflag.m4 b/m4/mhd_find_add_cc_ldflag.m4
@@ -0,0 +1,39 @@
+# SYNOPSIS
+#
+# MHD_FIND_ADD_CC_LDFLAG([VARIABLE-TO-EXTEND],
+# [FLAG1-TO-TEST], [FLAG2-TO-TEST], ...)
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flags are supported.
+# The flags are checked one-by-one. The checking is stopped when the first
+# supported flag found.
+# The checks are performing by appending FLAGx-TO-TEST to the value of
+# VARIABLE-TO-EXTEND (LDFLAGS if not specified), then prepending result to
+# LDFLAGS (unless VARIABLE-TO-EXTEND is LDFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND and next flags are not checked. If compile-link cycle
+# cannot be performed without warning with all tested flags, no flag is
+# added to the VARIABLE-TO-EXTEND.
+#
+# Example usage:
+#
+# MHD_CHECK_CC_LDFLAG([additional_LDFLAGS],
+# [-Wl,--strip-all], [-Wl,--strip-debug])
+#
+# Note: Unlike others MHD_CHECK_*CC_LDFLAG* macro, this macro uses another
+# order of parameters.
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_FIND_ADD_CC_LDFLAG],[dnl
+_MHD_FIND_ADD_CC_XFLAG([[LDFLAGS]],[],[],$@)])
diff --git a/m4/mhd_find_add_cc_ldflag_ifelse.m4 b/m4/mhd_find_add_cc_ldflag_ifelse.m4
@@ -0,0 +1,44 @@
+# SYNOPSIS
+#
+# MHD_FIND_ADD_CC_LDFLAG_IFELSE([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+# [VARIABLE-TO-EXTEND],
+# [FLAG1-TO-TEST], [FLAG2-TO-TEST], ...)
+#
+# DESCRIPTION
+#
+# This macro checks whether the specific compiler flags are supported.
+# The flags are checked one-by-one. The checking is stopped when the first
+# supported flag found.
+# The checks are performing by appending FLAGx-TO-TEST to the value of
+# VARIABLE-TO-EXTEND (LDFLAGS if not specified), then prepending result to
+# LDFLAGS (unless VARIABLE-TO-EXTEND is LDFLAGS), and then performing compile
+# and link test. If test succeed without warnings, then the flag is added to
+# VARIABLE-TO-EXTEND and next flags are not checked. If compile-link cycle
+# cannot be performed without warning with all tested flags, no flag is
+# added to the VARIABLE-TO-EXTEND.
+# If any suitable flag is found, ACTION-IF-FOUND is executed otherwise
+# ACTION-IF-NOT-FOUND is executed. Found flag (if any) is available as
+# value of shell variable $mhd_cc_found_flag during action execution.
+#
+# Example usage:
+#
+# MHD_CHECK_CC_LDFLAG([],[AC_MSG_WARN([Stripping is not supported]),
+# [additional_LDFLAGS],
+# [-Wl,--strip-all], [-Wl,--strip-debug])
+#
+# Note: Unlike others MHD_CHECK_*CC_LDFLAG* macro, this macro uses another
+# order of parameters.
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_FIND_ADD_CC_LDFLAG_IFELSE],[dnl
+_MHD_FIND_ADD_CC_XFLAG([[LDFLAGS]],$@)])
diff --git a/m4/mhd_find_lib.m4 b/m4/mhd_find_lib.m4
@@ -0,0 +1,142 @@
+# SYNOPSIS
+#
+# MHD_FIND_LIB([FUNCTION_NAME],
+# [INCLUDES=AC_INCLUDES_DEFAULT], [CHECK_CODE],
+# [LIBS_TO_CHECK],
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+# [VAR_TO_PREPEND_LIB=LIBS], [ADDITIONAL_LIBS])
+#
+# DESCRIPTION
+#
+# This macro checks for presence of specific function by including
+# specified headers and compiling and linking CHECK_CODE.
+# This checks both the declaration and the presence in library.
+# If declaration is not found in headers then libraries are not
+# checked.
+# LIBS_TO_CHECK is whitespace-separated list of libraries to check.
+# The macro first tries to link without any library, and if it fails
+# the libraries are checked one by one.
+# The required library (if any) prepended to VAR_TO_PREPEND_LIB (or
+# to the LIBS variable if VAR_TO_APPEND_LIB is not specified).
+# By using definition from provided headers, this macro ensures that
+# correct calling convention is used for detection.
+#
+# Example usage:
+#
+# MHD_FIND_LIB([clock_gettime],
+# [[#include <time.h>]],
+# [[struct timespec tp;
+# if (0 > clock_gettime(CLOCK_REALTIME, &tp)) return 3;]],
+# [rt],
+# [var_use_gettime='yes'],[var_use_gettime='no'])
+#
+# Defined cache variable used in the check so if any test will not
+# work correctly on some platform, a user may simply fix it by giving
+# cache variable in configure parameters, for example:
+#
+# ./configure mhd_cv_find_clock_gettime=no
+#
+# This simplifies building from source on exotic platforms as patching
+# of configure.ac is not required to change results of tests.
+#
+# LICENSE
+#
+# Copyright (c) 2023 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([MHD_FIND_LIB],[dnl
+AC_PREREQ([2.64])dnl for AS_VAR_IF, m4_ifblank, m4_ifnblank
+m4_newline([[# Expansion of $0 macro starts here]])
+AC_LANG_ASSERT([C])dnl
+m4_ifblank(m4_translit([$1],[()],[ ]), [m4_fatal([First macro argument FUNCTION_NAME must not be empty])])dnl
+m4_ifblank([$3], [m4_fatal([Third macro argument CHECK_CODE must not be empty])])dnl
+m4_bmatch(m4_normalize([$1]), [\s],dnl
+ [m4_fatal([First macro argument FUNCTION_NAME must not contain whitespaces])])dnl
+m4_if(m4_index([$3], m4_normalize(m4_translit([$1],[()],[ ]))), [-1], dnl
+ [m4_fatal([CHECK_CODE parameter (third macro argument) does not contain ']m4_normalize([$1])[' token])])dnl
+m4_bmatch([$7], [\$], [m4_fatal([$0: Seventh macro argument VAR_TO_PREPEND_LIB must not contain '$'])])dnl
+_MHD_FIND_LIB_BODY([$1],[$2],[$3],[$4],[$5],[$6],m4_default_nblank(_mhd_norm_expd([$7]),[LIBS]),[$8])dnl
+])dnl AC_DEFUN MHD_FIND_LIB
+
+# SYNOPSIS
+#
+# _MHD_FIND_LIB_BODY([1_FUNCTION_NAME],
+# [2_INCLUDES=AC_INCLUDES_DEFAULT], [3_CHECK_CODE],
+# [4_LIBS_TO_CHECK],
+# [5_ACTION-IF-FOUND], [6_ACTION-IF-NOT-FOUND],
+# [7_VAR_TO_PREPEND_LIB=LIBS], [8_ADDITIONAL_LIBS])
+
+AC_DEFUN([_MHD_FIND_LIB_BODY],[dnl
+AS_VAR_PUSHDEF([decl_cv_Var],[ac_cv_have_decl_]m4_bpatsubst(_mhd_norm_expd(m4_translit([$1],[()],[ ])),[[^a-zA-Z0-9]],[_]))dnl
+AS_VAR_PUSHDEF([cv_Var], [mhd_cv_find_lib_]m4_bpatsubst(_mhd_norm_expd(m4_translit([$1],[()],[ ])),[[^a-zA-Z0-9]],[_]))dnl
+AS_VAR_SET_IF([cv_Var],[],[AC_CHECK_DECL(_mhd_norm_expd([$1]),[],[],[$2])])
+AC_CACHE_CHECK([for library containing function $1], [cv_Var],
+ [
+ AS_VAR_IF([decl_cv_Var],["yes"],dnl
+ [dnl
+ mhd_find_lib_SAVE_LIBS="$LIBS"
+ m4_if([$7],LIBS,[dnl
+ mhd_find_lib_CHECK_LIBS="_mhd_norm_expd([$8]) $LIBS"
+ ],[dnl
+ mhd_find_lib_CHECK_LIBS="[$]$7 _mhd_norm_expd([$8]) $LIBS"
+ ]
+ )
+ # Reuse the same source file
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE([
+m4_default_nblank([$2],[AC_INCLUDES_DEFAULT])
+
+[int main(void)
+{
+
+ ]$3[
+
+ return 0;
+}
+ ]])
+ ]
+ )
+ for mhd_find_lib_LIB in '' $4
+ do
+ AS_IF([test -z "${mhd_find_lib_LIB}"],
+ [LIBS="${mhd_find_lib_CHECK_LIBS}"],
+ [LIBS="-l${mhd_find_lib_LIB} ${mhd_find_lib_CHECK_LIBS}"]
+ )
+ AC_LINK_IFELSE([],
+ [
+ AS_IF([test -z "${mhd_find_lib_LIB}"],
+ [AS_VAR_SET([cv_Var],["none required"])],
+ [AS_VAR_SET([cv_Var],["-l${mhd_find_lib_LIB}"])]
+ )
+ ]
+ )
+ AS_VAR_SET_IF([cv_Var],[break])
+ done
+ AS_UNSET([mhd_find_lib_LIB])
+ rm -f conftest.$ac_ext
+ LIBS="${mhd_find_lib_SAVE_LIBS}"
+ AS_UNSET([mhd_find_lib_SAVE_LIBS])
+ ]
+ )
+ AS_VAR_SET_IF([cv_Var],[:],[AS_VAR_SET([cv_Var],["no"])])
+ ]
+)
+AS_IF([test "x${cv_Var}" != "xno"],
+[dnl
+ AS_VAR_IF([cv_Var],["none required"],[:],
+ [
+ AS_IF([test -z "[$]$7"],[$7="${cv_Var}"],[$7="${cv_Var} [$]$7"])
+ ]
+ )
+ m4_n([$5])dnl
+],[$6])dnl AS_VAR_SET_IF cv_Var
+AS_VAR_POPDEF([cv_Var])dnl
+AS_VAR_POPDEF([decl_cv_Var])dnl
+m4_newline([[# Expansion of $0 macro ends here]])
+])dnl AC_DEFUN MHD_CHECK_FUNC
diff --git a/m4/mhd_norm_expd.m4 b/m4/mhd_norm_expd.m4
@@ -0,0 +1,21 @@
+# SYNOPSIS
+#
+# _mhd_norm_expd([macro])
+#
+# DESCRIPTION
+#
+# Normalize string after expansion of the macros.
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 1
+
+AC_DEFUN([_mhd_norm_expd],[m4_normalize(m4_expand([$1]))])
diff --git a/m4/mhd_prepend_flag_to_var.m4 b/m4/mhd_prepend_flag_to_var.m4
@@ -0,0 +1,48 @@
+# SYNOPSIS
+#
+# MHD_PREPEND_FLAG_TO_VAR([VARIABLE-TO-EXTEND], [FLAG-TO-PREPEND])
+#
+# DESCRIPTION
+#
+# This macro sets VARIABLE-TO-EXTEND to the value of VARIABLE-TO-EXTEND with
+# appended FLAG-TO-APPEND. If current value of VARIABLE-TO-EXTEND and
+# FLAG-TO-APPEND are both non-empty strings then space is added between them.
+#
+# Example usage:
+#
+# MHD_PREPEND_FLAG_TO_VAR([my_CFLAGS], [-Wall])
+#
+#
+# LICENSE
+#
+# Copyright (c) 2022 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_PREPEND_FLAG_TO_VAR],[dnl
+m4_ifblank([$1],[m4_fatal([$0: First macro argument must not be empty])])dnl
+m4_bmatch([$1], [\$], [m4_fatal([$0: First macro argument must not contain '$'])])dnl
+m4_bmatch([$1], [,], [m4_fatal([$0: First macro argument must not contain ','])])dnl
+m4_bmatch(_mhd_norm_expd([$1]), [\s],dnl
+[m4_fatal([$0: First macro argument must not contain whitespaces])])dnl
+m4_pushdef([varExtd],_mhd_norm_expd([$1]))dnl
+m4_bmatch([$2],[\$],dnl
+[dnl The second parameter is a variable value
+AS_IF([test -z "_mhd_norm_expd([$2])"],dnl
+[varExtd="${varExtd}"],dnl
+[test -z "${varExtd}"],dnl
+[varExtd="_mhd_norm_expd([$2])"],dnl
+[varExtd="_mhd_norm_expd([$2]) ${varExtd}"])
+],dnl
+[dnl The second parameter is not a variable value
+m4_ifnblank(_mhd_norm_expd([$2]),dnl
+[AS_IF([test -z "${varExtd}"],[varExtd="_mhd_norm_expd([$2])"],[varExtd="_mhd_norm_expd([$2]) ${varExtd}"])
+],dnl
+[m4_n([varExtd="${varExtd}"])])])dnl m4_ifnblank m4_bmatch
+m4_popdef([varExtd])dnl
+])dnl AC_DEFUN
diff --git a/m4/mhd_shutdown_socket_trigger.m4 b/m4/mhd_shutdown_socket_trigger.m4
@@ -0,0 +1,378 @@
+# SYNOPSIS
+#
+# MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER([ACTION-IF-TRIGGER], [ACTION-IF-NOT],
+# [ACTION-IF-UNKNOWN])
+#
+# DESCRIPTION
+#
+# Check whether shutdown of listen socket triggers waiting select().
+# If cross-compiling, result may be unknown (third action).
+# Result is cached in $mhd_cv_host_shtdwn_trgr_select variable.
+#
+# LICENSE
+#
+# Copyright (c) 2017-2023 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 6
+
+AC_DEFUN([MHD_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl
+ AC_PREREQ([2.64])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AX_PTHREAD])dnl
+ AC_REQUIRE([MHD_CHECK_FUNC_GETTIMEOFDAY])dnl
+ MHD_CHECK_FUNC([[usleep]], [[#include <unistd.h>]], [[usleep(100000);]])
+ MHD_CHECK_FUNC([[nanosleep]], [[#include <time.h>]], [[struct timespec ts2, ts1 = {0, 0}; nanosleep(&ts1, &ts2);]])
+ AC_CHECK_HEADERS([string.h sys/types.h sys/socket.h netinet/in.h time.h sys/select.h netinet/tcp.h],[],[], [AC_INCLUDES_DEFAULT])
+ AC_CACHE_CHECK([[whether shutdown of listen socket triggers select()]],
+ [[mhd_cv_host_shtdwn_trgr_select]], [dnl
+ _MHD_OS_KNOWN_SOCKET_SHUTDOWN_TRIGGER([[mhd_cv_host_shtdwn_trgr_select]])
+ AS_VAR_IF([mhd_cv_host_shtdwn_trgr_select], [["maybe"]],
+ [_MHD_RUN_CHECK_SOCKET_SHUTDOWN_TRIGGER([[mhd_cv_host_shtdwn_trgr_select]])])
+ ]
+ )
+ AS_IF([[test "x$mhd_cv_host_shtdwn_trgr_select" = "xyes"]], [$1],
+ [[test "x$mhd_cv_host_shtdwn_trgr_select" = "xno"]], [$2], [$3])
+ ]
+)
+
+#
+# _MHD_OS_KNOWN_SOCKET_SHUTDOWN_TRIGGER(VAR)
+#
+# Sets VAR to 'yes', 'no' or 'maybe'.
+
+AC_DEFUN([_MHD_OS_KNOWN_SOCKET_SHUTDOWN_TRIGGER],[dnl
+[#] On Linux shutdown of listen socket always trigger select().
+[#] On Windows select() always ignore shutdown of listen socket.
+[#] On other paltforms result may vary depending on platform version.
+ AS_CASE([[$host_os]],
+ [[linux | linux-* | *-linux | *-linux-*]], [$1='yes'],
+ [[mingw*]], [$1='no'],
+ [[cygwin* | msys*]], [$1='no'],
+ [[winnt* | interix*]], [$1='no'],
+ [[mks]], [$1='no'],
+ [[uwin]], [$1='no'],
+ [$1='maybe']
+ )
+ ]
+)
+
+#
+# _MHD_RUN_CHECK_SOCKET_SHUTDOWN_TRIGGER(VAR)
+#
+# Sets VAR to 'yes', 'no' or 'guessing no'.
+
+AC_DEFUN([_MHD_RUN_CHECK_SOCKET_SHUTDOWN_TRIGGER],[dnl
+ AC_LANG_PUSH([C])
+ MHD_CST_SAVE_CC="$CC"
+ MHD_CST_SAVE_CFLAGS="$CFLAGS"
+ MHD_CST_SAVE_LIBS="$LIBS"
+ CC="$PTHREAD_CC"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifdef HAVE_TIME_H
+# include <time.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if !defined(_WIN32) || defined(__CYGWIN__)
+# ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+# endif
+# ifdef HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+# endif
+# ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+# endif
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# endif
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# endif
+# ifdef HAVE_NETINET_TCP_H
+# include <netinet/tcp.h>
+# endif
+ typedef int MHD_socket;
+# define MHD_INVALID_SOCKET (-1)
+# define MHD_POSIX_SOCKETS 1
+#else
+# include <winsock2.h>
+# include <ws2tcpip.h>
+# include <windows.h>
+ typedef SOCKET MHD_socket;
+# define MHD_INVALID_SOCKET (INVALID_SOCKET)
+# define MHD_WINSOCK_SOCKETS 1
+#endif
+
+#include <pthread.h>
+
+#ifndef SHUT_RD
+# define SHUT_RD 0
+#endif
+#ifndef SHUT_WR
+# define SHUT_WR 1
+#endif
+#ifndef SHUT_RDWR
+# define SHUT_RDWR 2
+#endif
+
+#ifndef NULL
+# define NULL ((void*)0)
+#endif
+
+#ifdef HAVE_GETTIMEOFDAY
+# if defined(_WIN32) && !defined(__CYGWIN__)
+# undef HAVE_GETTIMEOFDAY
+# endif
+#endif
+
+
+#ifdef HAVE_NANOSLEEP
+static const struct timespec sm_tmout = {0, 1000};
+# define short_sleep() nanosleep(&sm_tmout, NULL)
+#elif defined(HAVE_USLEEP)
+# define short_sleep() usleep(1)
+#else
+# define short_sleep() (void)0
+#endif
+
+static volatile int going_select = 0;
+static volatile int select_ends = 0;
+static volatile int gerror = 0;
+static int timeout_mils;
+
+#ifndef HAVE_GETTIMEOFDAY
+static volatile long long select_elapsed_time = 0;
+
+static long long time_chk(void)
+{
+ long long ret = time(NULL);
+ if (-1 == ret)
+ gerror = 4;
+ return ret;
+}
+#endif
+
+
+static void* select_thrd_func(void* param)
+{
+#ifndef HAVE_GETTIMEOFDAY
+ long long start, stop;
+#endif
+ fd_set rs;
+ struct timeval tmot = {0, 0};
+ MHD_socket fd = *((MHD_socket*)param);
+
+ FD_ZERO(&rs);
+ FD_SET(fd, &rs);
+ tmot.tv_usec = timeout_mils * 1000;
+#ifndef HAVE_GETTIMEOFDAY
+ start = time_chk();
+#endif
+ going_select = 1;
+ if (0 > select ((int)(fd) + 1, &rs, NULL, NULL, &tmot))
+ gerror = 5;
+#ifndef HAVE_GETTIMEOFDAY
+ stop = time_chk();
+ select_elapsed_time = stop - start;
+#endif
+ select_ends = 1;
+ return NULL;
+}
+
+
+static MHD_socket create_socket(void)
+{ return socket (AF_INET, SOCK_STREAM, 0); }
+
+static void close_socket(MHD_socket fd)
+{
+#ifdef MHD_POSIX_SOCKETS
+ close(fd);
+#else
+ closesocket(fd);
+#endif
+}
+
+static MHD_socket
+create_socket_listen(int port)
+{
+ MHD_socket fd;
+ struct sockaddr_in sock_addr;
+ fd = create_socket();
+ if (MHD_INVALID_SOCKET == fd)
+ return fd;
+
+ memset (&sock_addr, 0, sizeof (struct sockaddr_in));
+ sock_addr.sin_family = AF_INET;
+ sock_addr.sin_port = htons(port);
+ sock_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+
+ if (bind (fd, (const struct sockaddr*) &sock_addr, sizeof(sock_addr)) < 0 ||
+ listen(fd, SOMAXCONN) < 0)
+ {
+ close_socket(fd);
+ return MHD_INVALID_SOCKET;
+ }
+ return fd;
+}
+
+#ifdef HAVE_GETTIMEOFDAY
+#define diff_time(tv1, tv2) ((long long)(tv1.tv_sec-tv2.tv_sec)*10000 + (long long)(tv1.tv_usec-tv2.tv_usec)/100)
+#else
+#define diff_time(tv1, tv2) ((long long)(tv1-tv2))
+#endif
+
+static long long test_run_select(int timeout_millsec, int use_shutdown, long long delay_before_shutdown)
+{
+ pthread_t select_thrd;
+ MHD_socket fd;
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval start, stop;
+#else
+ long long start;
+#endif
+
+ fd = create_socket_listen(0);
+ if (MHD_INVALID_SOCKET == fd)
+ return -7;
+ going_select = 0;
+ select_ends = 0;
+ gerror = 0;
+ timeout_mils = timeout_millsec;
+ if (0 != pthread_create (&select_thrd, NULL, select_thrd_func, (void*)&fd))
+ return -8;
+ while (!going_select) {short_sleep();}
+#ifdef HAVE_GETTIMEOFDAY
+ gettimeofday (&start, NULL);
+#else
+ start = time_chk();
+#endif
+ if (use_shutdown)
+ {
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval current;
+ do {short_sleep(); gettimeofday(¤t, NULL); } while (delay_before_shutdown > diff_time(current, start));
+#else
+ while (delay_before_shutdown > time_chk() - start) {short_sleep();}
+#endif
+ shutdown(fd, SHUT_RDWR);
+ }
+#ifdef HAVE_GETTIMEOFDAY
+ while (!select_ends) {short_sleep();}
+ gettimeofday (&stop, NULL);
+#endif
+ if (0 != pthread_join(select_thrd, NULL))
+ return -9;
+ close_socket(fd);
+ if (gerror)
+ return -10;
+#ifdef HAVE_GETTIMEOFDAY
+ return (long long)diff_time(stop, start);
+#else
+ return select_elapsed_time;
+#endif
+}
+
+static int test_it(void)
+{
+ long long duration2;
+#ifdef HAVE_GETTIMEOFDAY
+ long long duration0, duration1;
+ duration0 = test_run_select(0, 0, 0);
+ if (0 > duration0)
+ return -duration0;
+
+ duration1 = test_run_select(50, 0, 0);
+ if (0 > duration1)
+ return -duration1 + 20;
+
+ duration2 = test_run_select(500, 1, (duration0 + duration1) / 2);
+ if (0 > duration2)
+ return -duration2 + 40;
+
+ if (duration1 * 2 > duration2)
+ { /* Check second time to be sure. */
+ duration2 = test_run_select(500, 1, (duration0 + duration1) / 2);
+ if (0 > duration2)
+ return -duration2 + 60;
+ if (duration1 * 2 > duration2)
+ return 0;
+ }
+#else
+ duration2 = test_run_select(5000, 1, 2);
+ if (0 > duration2)
+ return -duration2 + 80;
+
+ if (4 > duration2)
+ { /* Check second time to be sure. */
+ duration2 = test_run_select(5000, 1, 2);
+ if (0 > duration2)
+ return -duration2 + 100;
+ if (4 > duration2)
+ return 0;
+ }
+#endif
+ return 1;
+}
+
+
+static int init(void)
+{
+#ifdef MHD_WINSOCK_SOCKETS
+ WSADATA wsa_data;
+
+ if (0 != WSAStartup(MAKEWORD(2, 2), &wsa_data) || MAKEWORD(2, 2) != wsa_data.wVersion)
+ {
+ WSACleanup();
+ return 0;
+ }
+#endif /* MHD_WINSOCK_SOCKETS */
+ return 1;
+}
+
+static void cleanup(void)
+{
+#ifdef MHD_WINSOCK_SOCKETS
+ WSACleanup();
+#endif /* MHD_WINSOCK_SOCKETS */
+}
+
+int main(void)
+{
+ int res;
+ if (!init())
+ return 19;
+
+ res = test_it();
+
+ cleanup();
+ if (gerror)
+ return gerror;
+
+ return res;
+}
+]])], [$1='yes'], [$1='no'], [$1='guessing no'])
+ CC="$MHD_CST_SAVE_CC"
+ CFLAGS="$MHD_CST_SAVE_CFLAGS"
+ LIBS="$MHD_CST_SAVE_LIBS"
+ AS_UNSET([[MHD_CST_SAVE_CC]])
+ AS_UNSET([[MHD_CST_SAVE_CFLAGS]])
+ AS_UNSET([[MHD_CST_SAVE_LIBS]])
+ AC_LANG_POP([C])
+ ]
+)
diff --git a/m4/mhd_sys_extentions.m4 b/m4/mhd_sys_extentions.m4
@@ -0,0 +1,1324 @@
+# SYNOPSIS
+#
+# MHD_SYS_EXT([VAR-ADD-CPPFLAGS])
+#
+# DESCRIPTION
+#
+# This macro checks system headers and add defines that enable maximum
+# number of exposed system interfaces. Macro verifies that added defines
+# will not break basic headers, some defines are also checked against
+# real recognition by headers.
+# If VAR-ADD-CPPFLAGS is specified, defines will be added to this variable
+# in form suitable for CPPFLAGS. Otherwise defines will be added to
+# configuration header (usually 'config.h').
+#
+# Example usage:
+#
+# MHD_SYS_EXT
+#
+# or
+#
+# MHD_SYS_EXT([CPPFLAGS])
+#
+# Macro is not enforced to be called before AC_COMPILE_IFELSE, but it
+# advisable to call macro before any compile and header tests since
+# additional defines can change results of those tests.
+#
+# Defined in command line macros are always honored and cache variables
+# used in all checks so if any test will not work correctly on some
+# platform, user may simply fix it by giving correct defines in CPPFLAGS
+# or by giving cache variable in configure parameters, for example:
+#
+# ./configure CPPFLAGS='-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED'
+#
+# or
+#
+# ./configure mhd_cv_define__xopen_source_sevenh_works=no
+#
+# This simplify building from source on exotic platforms as patching
+# of configure.ac is not required to change results of tests.
+#
+# LICENSE
+#
+# Copyright (c) 2016, 2017 Karlson2k (Evgeny Grin) <k2k@narod.ru>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 2
+
+AC_DEFUN([MHD_SYS_EXT],[dnl
+ AC_PREREQ([2.64])dnl for AS_VAR_IF, AS_VAR_SET_IF, m4_ifnblank
+ AC_LANG_PUSH([C])dnl Use C language for simplicity
+ mhd_mse_sys_ext_defines=""
+ mhd_mse_sys_ext_flags=""
+
+ dnl Check platform-specific extensions.
+ dnl Use compiler-based test for determinig target.
+
+ dnl Always add _GNU_SOURCE if headers allow.
+ MHD_CHECK_DEF_AND_ACCEPT([[_GNU_SOURCE]], [],
+ [[${mhd_mse_sys_ext_defines}]], [mhd_cv_macro_add__gnu_source="no"],
+ [mhd_cv_macro_add__gnu_source="yes"],
+ [mhd_cv_macro_add__gnu_source="no"]
+ )
+ AS_VAR_IF([mhd_cv_macro_add__gnu_source], ["yes"],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[_GNU_SOURCE]])
+ ]
+ )
+
+ dnl __BSD_VISIBLE is actually a small hack for FreeBSD.
+ dnl Funny that it's used in some Android versions too.
+ AC_CACHE_CHECK([[whether to try __BSD_VISIBLE macro]],
+ [[mhd_cv_macro_try___bsd_visible]], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+/* Warning: test with inverted logic! */
+#ifdef __FreeBSD__
+#error Target FreeBSD
+choke me now;
+#endif /* __FreeBSD__ */
+
+#ifdef __ANDROID__
+#include <android/api-level.h>
+#ifndef __ANDROID_API_O__
+#error Target is Android NDK before R14
+choke me now;
+#endif /* ! __ANDROID_API_O__ */
+#endif /* __ANDROID__ */
+ ]],[])],
+ [[mhd_cv_macro_try___bsd_visible="no"]],
+ [[mhd_cv_macro_try___bsd_visible="yes"]]
+ )
+ ])
+ AS_VAR_IF([[mhd_cv_macro_try___bsd_visible]], [["yes"]],
+ [dnl
+ AC_CACHE_CHECK([[whether __BSD_VISIBLE is already defined]],
+ [[mhd_cv_macro___bsd_visible_defined]], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+${mhd_mse_sys_ext_defines}
+/* Warning: test with inverted logic! */
+#ifdef __BSD_VISIBLE
+#error __BSD_VISIBLE is defined
+choke me now;
+#endif
+ ]],[])
+ ],
+ [[mhd_cv_macro___bsd_visible_defined="no"]],
+ [[mhd_cv_macro___bsd_visible_defined="yes"]]
+ )
+ ])
+ AS_VAR_IF([[mhd_cv_macro___bsd_visible_defined]], [["yes"]], [[:]],
+ [dnl
+ MHD_CHECK_ACCEPT_DEFINE(
+ [[__BSD_VISIBLE]], [], [[${mhd_mse_sys_ext_defines}]],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[__BSD_VISIBLE]])
+ ]
+ )dnl
+ ])
+ ])
+
+
+ dnl _DARWIN_C_SOURCE enables additional functionality on Darwin.
+ MHD_CHECK_DEFINED_MSG([[__APPLE__]], [[${mhd_mse_sys_ext_defines}]],
+ [[whether to try _DARWIN_C_SOURCE macro]],
+ [dnl
+ MHD_CHECK_DEF_AND_ACCEPT(
+ [[_DARWIN_C_SOURCE]], [], [[${mhd_mse_sys_ext_defines}]], [],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[_DARWIN_C_SOURCE]])
+ ]
+ )dnl
+ ])
+
+ dnl __EXTENSIONS__ unlocks almost all interfaces on Solaris.
+ MHD_CHECK_DEFINED_MSG([[__sun]], [[${mhd_mse_sys_ext_defines}]],
+ [[whether to try __EXTENSIONS__ macro]],
+ [dnl
+ MHD_CHECK_DEF_AND_ACCEPT(
+ [[__EXTENSIONS__]], [], [[${mhd_mse_sys_ext_defines}]], [],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[__EXTENSIONS__]])
+ ]
+ )dnl
+ ])
+
+ dnl _NETBSD_SOURCE switch on almost all headers definitions on NetBSD.
+ MHD_CHECK_DEFINED_MSG([[__NetBSD__]], [[${mhd_mse_sys_ext_defines}]],
+ [[whether to try _NETBSD_SOURCE macro]],
+ [dnl
+ MHD_CHECK_DEF_AND_ACCEPT(
+ [[_NETBSD_SOURCE]], [], [[${mhd_mse_sys_ext_defines}]], [],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[_NETBSD_SOURCE]])
+ ]
+ )dnl
+ ])
+
+ dnl _BSD_SOURCE currently used only on OpenBSD to unhide functions.
+ MHD_CHECK_DEFINED_MSG([[__OpenBSD__]], [[${mhd_mse_sys_ext_defines}]],
+ [[whether to try _BSD_SOURCE macro]],
+ [dnl
+ MHD_CHECK_DEF_AND_ACCEPT(
+ [[_BSD_SOURCE]], [], [[${mhd_mse_sys_ext_defines}]], [],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[_BSD_SOURCE]])
+ ]
+ )dnl
+ ])
+
+ dnl _TANDEM_SOURCE unhides most functions on NonStop OS
+ dnl (which comes from Tandem Computers decades ago).
+ MHD_CHECK_DEFINED_MSG([[__TANDEM]], [[${mhd_mse_sys_ext_defines}]],
+ [[whether to try _TANDEM_SOURCE macro]],
+ [dnl
+ MHD_CHECK_DEF_AND_ACCEPT(
+ [[_TANDEM_SOURCE]], [], [[${mhd_mse_sys_ext_defines}]], [],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[_TANDEM_SOURCE]])
+ ]
+ )dnl
+ ])
+
+ dnl _ALL_SOURCE makes visible POSIX and non-POSIX symbols
+ dnl on z/OS, AIX and Interix.
+ AC_CACHE_CHECK([[whether to try _ALL_SOURCE macro]],
+ [[mhd_cv_macro_try__all_source]], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#if !defined(__TOS_MVS__) && !defined (__INTERIX)
+#error Target is not z/OS, AIX or Interix
+choke me now;
+#endif
+ ]],[])],
+ [[mhd_cv_macro_try__all_source="yes"]],
+ [[mhd_cv_macro_try__all_source="no"]]
+ )
+ ])
+ AS_VAR_IF([[mhd_cv_macro_try__all_source]], [["yes"]],
+ [dnl
+ MHD_CHECK_DEF_AND_ACCEPT(
+ [[_ALL_SOURCE]], [], [[${mhd_mse_sys_ext_defines}]], [],
+ [
+ _MHD_SYS_EXT_VAR_ADD_FLAG([[mhd_mse_sys_ext_defines]], [[mhd_mse_sys_ext_flags]], [[_ALL_SOURCE]])
+ ]
+ )dnl
+ ])
+
+ mhd_mse_xopen_features=""
+ mhd_mse_xopen_defines=""
+ mhd_mse_xopen_flags=""
+
+ AC_CACHE_CHECK([[whether _XOPEN_SOURCE is already defined]],
+ [[mhd_cv_macro__xopen_source_defined]], [
+ _MHD_CHECK_DEFINED([[_XOPEN_SOURCE]], [[${mhd_mse_sys_ext_defines}]],
+ [[mhd_cv_macro__xopen_source_defined="yes"]],
+ [[mhd_cv_macro__xopen_source_defined="no"]]
+ )
+ ]
+ )
+ AS_VAR_IF([[mhd_cv_macro__xopen_source_defined]], [["no"]],
+ [
+ dnl Some platforms (namely: Solaris) use '==' checks instead of '>='
+ dnl for _XOPEN_SOURCE, resulting that unknown for platform values are
+ dnl interpreted as oldest and platform expose reduced number of
+ dnl interfaces. Next checks will ensure that platform recognise
+ dnl requested mode instead of blindly define high number that can
+ dnl be simply ignored by platform.
+ _MHD_CHECK_POSIX2008([[mhd_mse_xopen_defines]],
+ [[mhd_mse_xopen_flags]],
+ [[${mhd_mse_sys_ext_defines}]],
+ [mhd_mse_xopen_features="${mhd_cv_headers_posix2008}"],
+ [
+ _MHD_CHECK_POSIX2001([[mhd_mse_xopen_defines]],
+ [[mhd_mse_xopen_flags]],
+ [[${mhd_mse_sys_ext_defines}]],
+ [mhd_mse_xopen_features="${mhd_cv_headers_posix2001}"],
+ [
+ _MHD_CHECK_SUSV2([[mhd_mse_xopen_defines]],
+ [[mhd_mse_xopen_flags]],
+ [[${mhd_mse_sys_ext_defines}]],
+ [mhd_mse_xopen_features="${mhd_cv_headers_susv2}"],
+ [mhd_mse_xopen_features="${mhd_cv_headers_susv2}"]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+
+ AS_IF([[test "x${mhd_cv_macro__xopen_source_defined}" = "xno" && \
+ test "x${mhd_cv_macro__xopen_source_def_fiveh}" = "xno" || \
+ test "x${mhd_mse_xopen_features}" = "xnot available" ]],
+ [
+ _MHD_XOPEN_VAR_ADD([mhd_mse_xopen_defines], [mhd_mse_xopen_flags], [${mhd_mse_sys_ext_defines}])
+ ]
+ )
+
+ mhd_mse_sys_features_src="
+#ifdef __APPLE__
+#include <sys/socket.h>
+#else
+#error No useful system features.
+choke me now;
+#endif
+
+int main()
+{
+#ifdef __APPLE__
+#ifndef sendfile
+ (void) sendfile;
+#endif
+#endif
+ return 0;
+}
+"
+ AC_CACHE_CHECK([[for useful system-specific features]],
+ [[mhd_cv_headers_useful_features_present]], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+${mhd_mse_sys_ext_defines}
+${mhd_mse_sys_features_src}
+ ]])],
+ [[mhd_cv_headers_useful_features_present="yes"]],
+ [[mhd_cv_headers_useful_features_present="no"]]
+ )dnl
+ ])
+ AS_VAR_IF([[mhd_cv_headers_useful_features_present]], [["yes"]],
+ [
+ AS_IF([[test "x${mhd_mse_xopen_flags}" = "x"]], [[:]],
+ [
+ AC_CACHE_CHECK([[whether useful system-specific features works with ${mhd_mse_xopen_flags}]],
+ [[mhd_cv_headers_useful_features_works_xopen]], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+${mhd_mse_sys_ext_defines}
+${mhd_mse_xopen_defines}
+${mhd_mse_sys_features_src}
+ ]])],
+ [[mhd_cv_headers_useful_features_works_xopen="yes"]],
+ [[mhd_cv_headers_useful_features_works_xopen="no"]]
+ )dnl
+ ])dnl
+ ]
+ )dnl
+ ]
+ )
+
+
+ AS_IF([[test "x${mhd_cv_headers_useful_features_present}" = "xyes" && \
+ test "x${mhd_cv_headers_useful_features_works_xopen}" = "xno" && \
+ test "x${mhd_mse_xopen_flags}" != "x"]],
+ [
+ _MHD_VAR_CONTAIN([[mhd_mse_xopen_features]], [[, activated by _XOPEN_SOURCE]],
+ [
+ AC_MSG_WARN([[_XOPEN_SOURCE macro is required to activate all headers symbols, however some useful system-specific features does not work with _XOPEN_SOURCE. ]dnl
+ [_XOPEN_SOURCE macro will not be used.]])
+ ]
+ )
+ AS_UNSET([[mhd_mse_xopen_defines]])
+ AS_UNSET([[mhd_mse_xopen_flags]])
+ AS_UNSET([[mhd_mse_xopen_values]])
+ ]
+ )
+
+ dnl Discard temporal source variables
+ AS_UNSET([[mhd_mse_sys_features_src]])
+ AS_UNSET([[mhd_mse_xopen_defines]])
+ AS_UNSET([[mhd_mse_sys_ext_defines]])
+
+ dnl Determined all required defines.
+ AC_MSG_CHECKING([[for final set of defined symbols]])
+ m4_ifblank([$1], [dnl
+ AH_TEMPLATE([[_XOPEN_SOURCE]], [Define to maximum value supported by system headers])dnl
+ AH_TEMPLATE([[_XOPEN_SOURCE_EXTENDED]], [Define to 1 if _XOPEN_SOURCE is defined to value less than 500 ]dnl
+ [and system headers require this symbol])dnl
+ AH_TEMPLATE([[_XOPEN_VERSION]], [Define to maximum value supported by system headers if _XOPEN_SOURCE ]dnl
+ [is defined to value less than 500 and headers do not support _XOPEN_SOURCE_EXTENDED])dnl
+ AH_TEMPLATE([[_GNU_SOURCE]], [Define to 1 to enable GNU-related header features])dnl
+ AH_TEMPLATE([[__BSD_VISIBLE]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ AH_TEMPLATE([[_DARWIN_C_SOURCE]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ AH_TEMPLATE([[__EXTENSIONS__]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ AH_TEMPLATE([[_NETBSD_SOURCE]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ AH_TEMPLATE([[_BSD_SOURCE]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ AH_TEMPLATE([[_TANDEM_SOURCE]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ AH_TEMPLATE([[_ALL_SOURCE]], [Define to 1 if it is required by headers to expose additional symbols])dnl
+ ])
+ for mhd_mse_Flag in ${mhd_mse_sys_ext_flags} ${mhd_mse_xopen_flags}
+ do
+ m4_ifnblank([$1], [dnl
+ AS_VAR_APPEND([$1],[[" -D$mhd_mse_Flag"]])
+ ], [dnl
+ AS_CASE([[$mhd_mse_Flag]], [[*=*]],
+ [dnl
+ AC_DEFINE_UNQUOTED([[`echo $mhd_mse_Flag | cut -f 1 -d =`]],
+ [[`echo $mhd_mse_Flag | cut -f 2 -d = -s`]])
+ ], [dnl
+ AC_DEFINE_UNQUOTED([[$mhd_mse_Flag]])
+ ])
+ ])
+ done
+ AS_UNSET([[mhd_mse_Flag]])
+ dnl Trim whitespaces
+ mhd_mse_result=`echo ${mhd_mse_sys_ext_flags} ${mhd_mse_xopen_flags}`
+ AC_MSG_RESULT([[${mhd_mse_result}]])
+ AS_UNSET([[mhd_mse_result]])
+ AS_UNSET([[mhd_mse_xopen_flags]])
+ AS_UNSET([[mhd_mse_sys_ext_flags]])
+ AC_LANG_POP([C])
+])
+
+
+#
+# _MHD_SYS_EXT_VAR_ADD_FLAG(DEFINES_VAR, FLAGS_VAR,
+# FLAG, [FLAG-VALUE = 1])
+#
+# Internal macro, only to be used from MHD_SYS_EXT, _MHD_XOPEN_VAR_ADD
+
+m4_define([_MHD_SYS_EXT_VAR_ADD_FLAG], [dnl
+ m4_ifnblank([$4],[dnl
+ ]m4_normalize([$1])[="[$]{]m4_normalize([$1])[}[#define ]m4_normalize($3) ]m4_normalize([$4])[
+"
+ AS_IF([test "x[$]{]m4_normalize([$2])[}" = "x"],
+ []m4_normalize([$2])[="]m4_normalize([$3])[=]m4_normalize([$4])["],
+ []m4_normalize([$2])[="[$]{]m4_normalize([$2])[} ]m4_normalize([$3])[=]m4_normalize([$4])["]
+ )dnl
+ ], [dnl
+ ]m4_normalize([$1])[="[$]{]m4_normalize([$1])[}[#define ]m4_normalize($3) 1
+"
+ AS_IF([test "x[$]{]m4_normalize([$2])[}" = "x"],
+ []m4_normalize([$2])[="]m4_normalize([$3])["],
+ []m4_normalize([$2])[="[$]{]m4_normalize([$2])[} ]m4_normalize([$3])["]
+ )dnl
+ ])dnl
+])
+
+#
+# _MHD_VAR_IF(VAR, VALUE, [IF-EQ], [IF-NOT-EQ])
+#
+# Same as AS_VAR_IF, except that it expands to nothing if
+# both IF-EQ and IF-NOT-EQ are empty.
+
+m4_define([_MHD_VAR_IF],[dnl
+m4_ifnblank([$3$4],[dnl
+AS_VAR_IF([$1],[$2],[$3],[$4])])])
+
+#
+# _MHD_STRING_CONTAIN(VAR, MATCH, [IF-MATCH], [IF-NOT-MATCH])
+#
+
+AC_DEFUN([_MHD_VAR_CONTAIN],[dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+AS_IF([[`echo "${]$1[}" | $FGREP ']$2[' >/dev/null 2>&1`]], [$3], [$4])
+])
+
+#
+# _MHD_STRING_CONTAIN_BRE(VAR, BRE, [IF-MATCH], [IF-NOT-MATCH])
+#
+
+AC_DEFUN([_MHD_VAR_CONTAIN_BRE],[dnl
+AC_REQUIRE([AC_PROG_GREP])dnl
+AS_IF([[`echo "${]$1[}" | $GREP ']$2[' >/dev/null 2>&1`]], [$3], [$4])
+])
+
+# SYNOPSIS
+#
+# _MHD_CHECK_POSIX2008(DEFINES_VAR, FLAGS_VAR,
+# [EXT_DEFINES],
+# [ACTION-IF-AVAILABLE],
+# [ACTION-IF-NOT-AVAILABLE])
+#
+#
+AC_DEFUN([_MHD_CHECK_POSIX2008], [dnl
+ AC_CACHE_CHECK([headers for POSIX.1-2008/SUSv4 features],
+ [[mhd_cv_headers_posix2008]], [dnl
+ _MHD_CHECK_POSIX_FEATURES_SINGLE([
+_MHD_BASIC_INCLUDES
+[
+/* Check will be passed if ALL features are available
+ * and failed if ANY feature is not available. */
+int main()
+{
+
+#ifndef stpncpy
+ (void) stpncpy;
+#endif
+#ifndef strnlen
+ (void) strnlen;
+#endif
+
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
+/* NetBSD and OpenBSD didn't implement wcsnlen() for some reason. */
+#ifndef wcsnlen
+ (void) wcsnlen;
+#endif
+#endif
+
+#ifdef __CYGWIN__
+/* The only depend function on Cygwin, but missing on some other platforms */
+#ifndef strndup
+ (void) strndup;
+#endif
+#endif
+
+#ifndef __sun
+/* illumos forget to uncomment some _XPG7 macros. */
+#ifndef renameat
+ (void) renameat;
+#endif
+
+#ifndef getline
+ (void) getline;
+#endif
+#endif /* ! __sun */
+
+/* gmtime_r() becomes mandatory only in POSIX.1-2008. */
+#ifndef gmtime_r
+ (void) gmtime_r;
+#endif
+
+/* unsetenv() actually defined in POSIX.1-2001 so it
+ * must be present with _XOPEN_SOURCE == 700 too. */
+#ifndef unsetenv
+ (void) unsetenv;
+#endif
+
+ return 0;
+}
+ ]],
+ [$3], [[700]],
+ [[mhd_cv_headers_posix2008]]dnl
+ )
+ ]
+ )
+ _MHD_VAR_CONTAIN_BRE([[mhd_cv_headers_posix2008]], [[^available]],
+ [
+ _MHD_VAR_CONTAIN([[mhd_cv_headers_posix2008]], [[does not work with _XOPEN_SOURCE]], [[:]],
+ [_MHD_SYS_EXT_VAR_ADD_FLAG([$1],[$2],[[_XOPEN_SOURCE]],[[700]])]
+ )
+ $4
+ ],
+ [$5]
+ )
+])
+
+
+# SYNOPSIS
+#
+# _MHD_CHECK_POSIX2001(DEFINES_VAR, FLAGS_VAR,
+# [EXT_DEFINES],
+# [ACTION-IF-AVAILABLE],
+# [ACTION-IF-NOT-AVAILABLE])
+#
+#
+AC_DEFUN([_MHD_CHECK_POSIX2001], [dnl
+ AC_CACHE_CHECK([headers for POSIX.1-2001/SUSv3 features],
+ [[mhd_cv_headers_posix2001]], [
+ _MHD_CHECK_POSIX_FEATURES_SINGLE([
+_MHD_BASIC_INCLUDES
+[
+/* Check will be passed if ALL features are available
+ * and failed if ANY feature is not available. */
+int main()
+{
+
+#ifndef setenv
+ (void) setenv;
+#endif
+
+#ifndef __NetBSD__
+#ifndef vsscanf
+ (void) vsscanf;
+#endif
+#endif
+
+/* Availability of next features varies, but they all must be present
+ * on platform with support for _XOPEN_SOURCE = 600. */
+
+/* vsnprintf() should be available with _XOPEN_SOURCE >= 500, but some platforms
+ * provide it only with _POSIX_C_SOURCE >= 200112 (autodefined when
+ * _XOPEN_SOURCE >= 600) where specification of vsnprintf() is aligned with
+ * ISO C99 while others platforms defined it with even earlier standards. */
+#ifndef vsnprintf
+ (void) vsnprintf;
+#endif
+
+/* On platforms that prefer POSIX over X/Open, fseeko() is available
+ * with _POSIX_C_SOURCE >= 200112 (autodefined when _XOPEN_SOURCE >= 600).
+ * On other platforms it should be available with _XOPEN_SOURCE >= 500. */
+#ifndef fseeko
+ (void) fseeko;
+#endif
+
+/* F_GETOWN must be defined with _XOPEN_SOURCE >= 600, but some platforms
+ * define it with _XOPEN_SOURCE >= 500. */
+#ifndef F_GETOWN
+#error F_GETOWN is not defined
+choke me now;
+#endif
+ return 0;
+}
+ ]],
+ [$3],[[600]],[[mhd_cv_headers_posix2001]]dnl
+ )
+ ]
+ )
+ _MHD_VAR_CONTAIN_BRE([[mhd_cv_headers_posix2001]], [[^available]],
+ [
+ _MHD_VAR_CONTAIN([[mhd_cv_headers_posix2001]], [[does not work with _XOPEN_SOURCE]], [[:]],
+ [_MHD_SYS_EXT_VAR_ADD_FLAG([$1],[$2],[[_XOPEN_SOURCE]],[[600]])]
+ )
+ $4
+ ],
+ [$5]
+ )
+])
+
+
+# SYNOPSIS
+#
+# _MHD_CHECK_SUSV2(DEFINES_VAR, FLAGS_VAR,
+# [EXT_DEFINES],
+# [ACTION-IF-AVAILABLE],
+# [ACTION-IF-NOT-AVAILABLE])
+#
+#
+AC_DEFUN([_MHD_CHECK_SUSV2], [dnl
+ AC_CACHE_CHECK([headers for SUSv2/XPG5 features],
+ [[mhd_cv_headers_susv2]], [
+ _MHD_CHECK_POSIX_FEATURES_SINGLE([
+_MHD_BASIC_INCLUDES
+[
+/* Check will be passed if ALL features are available
+ * and failed if ANY feature is not available. */
+int main()
+{
+/* It's not easy to write reliable test for _XOPEN_SOURCE = 500 as
+ * platforms not always precisely follow this standard and some
+ * functions are already deprecated in later standards. */
+
+/* Availability of next features varies, but they all must be present
+ * on platform with correct support for _XOPEN_SOURCE = 500. */
+
+/* Mandatory with _XOPEN_SOURCE >= 500 but as XSI extension available
+ * with much older standards. */
+#ifndef ftruncate
+ (void) ftruncate;
+#endif
+
+/* Added with _XOPEN_SOURCE >= 500 but was available in some standards
+ * before. XSI extension. */
+#ifndef pread
+ (void) pread;
+#endif
+
+#ifndef __APPLE__
+/* Actually comes from XPG4v2 and must be available
+ * with _XOPEN_SOURCE >= 500 as well. */
+#ifndef symlink
+ (void) symlink;
+#endif
+
+/* Actually comes from XPG4v2 and must be available
+ * with _XOPEN_SOURCE >= 500 as well. XSI extension. */
+#ifndef strdup
+ (void) strdup;
+#endif
+#endif /* ! __APPLE__ */
+ return 0;
+}
+ ]],
+ [$3],[[500]],[[mhd_cv_headers_susv2]]dnl
+ )
+ ]
+ )
+ _MHD_VAR_CONTAIN_BRE([[mhd_cv_headers_susv2]], [[^available]],
+ [
+ _MHD_VAR_CONTAIN([[mhd_cv_headers_susv2]], [[does not work with _XOPEN_SOURCE]], [[:]],
+ [_MHD_SYS_EXT_VAR_ADD_FLAG([$1],[$2],[[_XOPEN_SOURCE]],[[500]])]
+ )
+ $4
+ ],
+ [$5]
+ )
+])
+
+
+# SYNOPSIS
+#
+# _MHD_CHECK_POSIX_FEATURES_SINGLE(FEATURES_TEST,
+# EXT_DEFINES,
+# _XOPEN_SOURCE-VALUE,
+# VAR-RESULT)
+
+AC_DEFUN([_MHD_CHECK_POSIX_FEATURES_SINGLE], [dnl
+ AS_VAR_PUSHDEF([avail_Var], [mhd_cpsxfs_tmp_features_available])dnl
+ AS_VAR_PUSHDEF([ext_Var], [mhd_cpsxfs_tmp_extentions_allowed])dnl
+ AS_VAR_PUSHDEF([xopen_Var], [mhd_cpsxfs_tmp_src_xopen_allowed])dnl
+ AS_VAR_PUSHDEF([dislb_Var], [mhd_cpsxfs_tmp_features_disableable])dnl
+ AS_UNSET([avail_Var])
+ AS_UNSET([ext_Var])
+ AS_UNSET([xopen_Var])
+ AS_UNSET([dislb_Var])
+ _MHD_CHECK_POSIX_FEATURES([$1], [$2], [$3], [avail_Var], [ext_Var], [xopen_Var], [dislb_Var])
+ AS_VAR_IF([avail_Var], ["yes"],
+ [
+ AS_VAR_IF([dislb_Var], ["yes"],
+ [
+ AS_VAR_IF([ext_Var], ["required"],
+ [
+ AS_VAR_IF([xopen_Var], ["allowed"],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, activated by extension macro, works with _XOPEN_SOURCE=]m4_normalize([$3])["])
+ ],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, activated by extension macro, does not work with _XOPEN_SOURCE=]m4_normalize([$3])["])
+ ]
+ )
+ ],
+ [
+ AS_VAR_IF([ext_Var], ["allowed"],
+ [
+ AS_VAR_IF([xopen_Var], ["required"],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, activated by _XOPEN_SOURCE=]m4_normalize([$3])[, works with extension macro"])
+ ],
+ [
+ AS_VAR_IF([xopen_Var], ["allowed"],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, works with _XOPEN_SOURCE=]m4_normalize([$3])[, works with extension macro"])
+ ],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, works with extension macro, does not work with _XOPEN_SOURCE=]m4_normalize([$3])["])
+ ]
+ )
+ ]
+ )
+ ],
+ [
+ AS_VAR_IF([xopen_Var], ["required"],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, activated by _XOPEN_SOURCE=]m4_normalize([$3])[, does not work with extension macro"])
+ ],
+ [
+ AS_VAR_IF([xopen_Var], ["allowed"],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, works with _XOPEN_SOURCE=]m4_normalize([$3])[, does not work with extension macro"])
+ ],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, does not work with _XOPEN_SOURCE=]m4_normalize([$3])[, does not work with extension macro"])
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ ],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["available, works always"])
+ ]
+ )
+ ],
+ [
+ AS_VAR_SET(m4_normalize([$4]), ["not available"])
+ ]
+ )
+ AS_UNSET([dislb_Var])
+ AS_UNSET([xopen_Var])
+ AS_UNSET([ext_Var])
+ AS_UNSET([avail_Var])
+ AS_VAR_POPDEF([dislb_Var])dnl
+ AS_VAR_POPDEF([xopen_Var])dnl
+ AS_VAR_POPDEF([ext_Var])dnl
+ AS_VAR_POPDEF([avail_Var])dnl
+])
+
+# SYNOPSIS
+#
+# _MHD_CHECK_POSIX_FEATURES(FEATURES_TEST, EXT_DEFINES, _XOPEN_SOURCE-VALUE,
+# [VAR-FEATURES-AVAILABLE-YES_NO],
+# [VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED],
+# [VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED],
+# [VAR-FEATURES-DISABLEABLE-YES_NO])
+
+AC_DEFUN([_MHD_CHECK_POSIX_FEATURES], [dnl
+ AS_VAR_PUSHDEF([src_Var], [mhd_cpsxf_tmp_src_variable])dnl
+ AS_VAR_PUSHDEF([defs_Var], [mhd_cpsxf_tmp_defs_variable])dnl
+ AS_VAR_SET([src_Var],["
+$1
+"])
+ dnl To reduce 'configure' size
+ AS_VAR_SET([defs_Var],["
+$2
+"])
+ dnl To reduce 'configure' size
+
+ dnl Some platforms enable most features when no
+ dnl specific mode is requested by macro.
+ dnl Check whether features test works without _XOPEN_SOURCE and
+ dnl with disabled extensions (undefined most of
+ dnl predefined macros for specific requested mode).
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+_MHD_UNDEF_ALL_EXT
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work with undefined all extensions and without _XOPEN_SOURCE]])
+ AS_VAR_SET(m4_normalize([$4]),["yes"]) # VAR-FEATURES-AVAILABLE-YES_NO
+
+ dnl Check whether features will work extensions
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$defs_Var
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work with extensions]])
+ AS_VAR_SET(m4_normalize([$5]),["allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ dnl Check whether features will work with _XOPEN_SOURCE
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$defs_Var
+[#define _XOPEN_SOURCE ]]m4_normalize([$3])[
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([Checked features work with extensions and with _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$6]),["allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ dnl Check whether features could be disabled
+ dnl Request oldest POSIX mode and strict ANSI mode
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+_MHD_UNDEF_ALL_EXT
+[#define _POSIX_C_SOURCE 1]
+[#define _ANSI_SOURCE 1]
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work with disabled extensions, with _POSIX_C_SOURCE=1 and _ANSI_SOURCE=1]])
+ AS_VAR_SET(m4_normalize([$7]),["no"]) # VAR-FEATURES-DISABLEABLE-YES_NO
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT work with disabled extensions, with _POSIX_C_SOURCE=1 and _ANSI_SOURCE=1]])
+ AS_VAR_SET(m4_normalize([$7]),["yes"]) # VAR-FEATURES-DISABLEABLE-YES_NO
+ ]
+ )
+ ],
+ [dnl
+ _AS_ECHO_LOG([Checked features DO NOT work with extensions and with _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$6]),["not allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ AS_VAR_SET(m4_normalize([$7]),["yes"]) # VAR-FEATURES-DISABLEABLE-YES_NO
+ ]
+ )
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT work with extensions]])
+ AS_VAR_SET(m4_normalize([$7]),["yes"]) # VAR-FEATURES-DISABLEABLE-YES_NO
+ dnl Check whether features work with _XOPEN_SOURCE
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+[#define _XOPEN_SOURCE ]m4_normalize($3)
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([Checked features work with _XOPEN_SOURCE=]m4_normalize([$3])[])
+ dnl Check default state (without enabling/disabling)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work by default]])
+ AS_VAR_SET(m4_normalize([$6]),["allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT by default]])
+ AS_VAR_SET(m4_normalize([$6]),["required"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ dnl Check whether features work with _XOPEN_SOURCE and extensions
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$defs_Var
+[#define _XOPEN_SOURCE] ]m4_normalize([$3])[
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work with _XOPEN_SOURCE and extensions]])
+ AS_VAR_SET(m4_normalize([$5]),["allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT work with _XOPEN_SOURCE and extensions]])
+ AS_VAR_SET(m4_normalize([$5]),["not allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ ],
+ [dnl
+ _AS_ECHO_LOG([Checked features DO NOT work with _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$5]),["not allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ AS_VAR_SET(m4_normalize([$6]),["not allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ ]
+ )
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT work with undefined all extensions and without _XOPEN_SOURCE]])
+ dnl Let's find the way to enable POSIX features
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$defs_Var
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work with extensions]])
+ AS_VAR_SET(m4_normalize([$4]),["yes"]) # VAR-FEATURES-AVAILABLE-YES_NO
+ AS_VAR_SET(m4_normalize([$7]),["yes"]) # VAR-FEATURES-DISABLEABLE-YES_NO
+ dnl Check default state (without enabling/disabling)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work by default]])
+ AS_VAR_SET(m4_normalize([$5]),["allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT by default]])
+ AS_VAR_SET(m4_normalize([$5]),["required"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ dnl Check whether features work with extensions and _XOPEN_SOURCE
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$defs_Var
+[#define _XOPEN_SOURCE] ]m4_normalize([$3])[
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([Checked features work with extensions and _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$6]),["allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ],
+ [dnl
+ _AS_ECHO_LOG([Checked features DO NOT work with extensions and _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$6]),["not allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT work with extensions]])
+ dnl Check whether features work with _XOPEN_SOURCE
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+[#define _XOPEN_SOURCE] ]m4_normalize([$3])[
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([Checked features work with _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$4]),["yes"]) # VAR-FEATURES-AVAILABLE-YES_NO
+ dnl Check default state (without enabling/disabling)
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([[Checked features work by default]])
+ AS_VAR_SET(m4_normalize([$6]),["allowed"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ],
+ [dnl
+ _AS_ECHO_LOG([[Checked features DO NOT by default]])
+ AS_VAR_SET(m4_normalize([$6]),["required"]) # VAR-XOPEN-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ dnl Check whether features work with _XOPEN_SOURCE and extensions
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+$defs_Var
+[#define _XOPEN_SOURCE] ]m4_normalize([$3])[
+$src_Var
+ ])],
+ [dnl
+ _AS_ECHO_LOG([Checked features work with _XOPEN_SOURCE=]m4_normalize([$3])[ and extensions])
+ AS_VAR_SET(m4_normalize([$5]),["allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ ],
+ [dnl
+ _AS_ECHO_LOG([Checked features DO NOT work with _XOPEN_SOURCE=]m4_normalize([$3])[ and extensions])
+ AS_VAR_SET(m4_normalize([$5]),["not allowed"]) # VAR-EXTENSIONS-REQUIRED_NOT-ALLOWED_ALLOWED
+ ]
+ )
+ ],
+ [dnl
+ _AS_ECHO_LOG([Checked features DO NOT work with _XOPEN_SOURCE=]m4_normalize([$3])[])
+ AS_VAR_SET(m4_normalize([$4]),["no"]) # VAR-FEATURES-AVAILABLE-YES_NO
+ ]
+ )
+ ]
+ )
+ ]
+ )
+ AS_UNSET([defs_Var])
+ AS_UNSET([src_Var])
+ AS_VAR_POPDEF([defs_Var])dnl
+ AS_VAR_POPDEF([src_Var])dnl
+])
+
+
+#
+# MHD_CHECK_HEADER_PRESENCE(headername.h)
+#
+# Check only by preprocessor whether header file is present.
+
+AC_DEFUN([MHD_CHECK_HEADER_PRESENCE], [dnl
+ AC_PREREQ([2.64])dnl for AS_VAR_PUSHDEF, AS_VAR_SET
+ AS_VAR_PUSHDEF([mhd_cache_Var],[mhd_cv_header_[]$1[]_present])dnl
+ AC_CACHE_CHECK([for presence of $1], [mhd_cache_Var], [dnl
+ dnl Hack autoconf to get pure result of only single header presence
+ cat > conftest.$ac_ext <<_ACEOF
+@%:@include <[]$1[]>
+_ACEOF
+ AC_PREPROC_IFELSE([],
+ [AS_VAR_SET([mhd_cache_Var],[["yes"]])],
+ [AS_VAR_SET([mhd_cache_Var],[["no"]])]
+ )
+ rm -f conftest.$ac_ext
+ ])
+ AS_VAR_POPDEF([mhd_cache_Var])dnl
+])
+
+
+#
+# MHD_CHECK_HEADERS_PRESENCE(oneheader.h otherheader.h ...)
+#
+# Check each specified header in whitespace-separated list for presence.
+
+AC_DEFUN([MHD_CHECK_HEADERS_PRESENCE], [dnl
+ AC_PREREQ([2.60])dnl for m4_foreach_w
+ m4_foreach_w([mhd_chk_Header], [$1],
+ [MHD_CHECK_HEADER_PRESENCE(m4_defn([mhd_chk_Header]))]
+ )dnl
+])
+
+
+#
+# MHD_CHECK_HEADERS_PRESENCE_COMPACT(oneheader.h otherheader.h ...)
+#
+# Same as MHD_CHECK_HEADERS_PRESENCE, but a bit slower and produce more compact 'configure'.
+
+AC_DEFUN([MHD_CHECK_HEADERS_PRESENCE_COMPACT], [dnl
+ for mhd_chk_Header in $1 ; do
+ MHD_CHECK_HEADER_PRESENCE([[${mhd_chk_Header}]])
+ done
+])
+
+
+#
+# MHD_CHECK_BASIC_HEADERS_PRESENCE
+#
+# Check basic headers for presence.
+
+AC_DEFUN([MHD_CHECK_BASIC_HEADERS_PRESENCE], [dnl
+ MHD_CHECK_HEADERS_PRESENCE([stdio.h wchar.h stdlib.h string.h strings.h stdint.h fcntl.h sys/types.h time.h unistd.h])
+])
+
+
+#
+# _MHD_SET_BASIC_INCLUDES
+#
+# Internal preparatory macro.
+
+AC_DEFUN([_MHD_SET_BASIC_INCLUDES], [dnl
+ AC_REQUIRE([MHD_CHECK_BASIC_HEADERS_PRESENCE])dnl
+ AS_IF([[test -z "$mhd_basic_headers_includes"]], [dnl
+ AS_VAR_IF([mhd_cv_header_stdio_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="\
+#include <stdio.h>
+" ]],[[mhd_basic_headers_includes=""]]
+ )
+ AS_VAR_IF([mhd_cv_header_sys_types_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <sys/types.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_wchar_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <wchar.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_stdlib_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <stdlib.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_string_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <string.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_strings_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <strings.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_stdint_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <stdint.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_fcntl_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <fcntl.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_time_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <time.h>
+" ]]
+ )
+ AS_VAR_IF([mhd_cv_header_unistd_h_present], [["yes"]],
+ [[mhd_basic_headers_includes="${mhd_basic_headers_includes}\
+#include <unistd.h>
+" ]]
+ )
+ ])dnl
+])
+
+
+#
+# _MHD_BASIC_INCLUDES
+#
+# Internal macro. Output set of basic includes.
+
+AC_DEFUN([_MHD_BASIC_INCLUDES], [AC_REQUIRE([_MHD_SET_BASIC_INCLUDES])dnl
+[ /* Start of MHD basic test includes */
+$mhd_basic_headers_includes /* End of MHD basic test includes */
+]])
+
+
+#
+# MHD_CHECK_BASIC_HEADERS([PROLOG], [ACTION-IF-OK], [ACTION-IF-FAIL])
+#
+# Check whether basic headers can be compiled with specified prolog.
+
+AC_DEFUN([MHD_CHECK_BASIC_HEADERS], [dnl
+ AC_COMPILE_IFELSE([dnl
+ AC_LANG_PROGRAM([m4_n([$1])dnl
+_MHD_BASIC_INCLUDES
+ ], [[int i = 1; i++; if(i) return i]])
+ ], [$2], [$3])
+])
+
+
+#
+# _MHD_SET_UNDEF_ALL_EXT
+#
+# Internal preparatory macro.
+
+AC_DEFUN([_MHD_SET_UNDEF_ALL_EXT], [m4_divert_text([INIT_PREPARE],[dnl
+[mhd_undef_all_extensions="
+#ifdef _GNU_SOURCE
+#undef _GNU_SOURCE
+#endif
+#ifdef _XOPEN_SOURCE
+#undef _XOPEN_SOURCE
+#endif
+#ifdef _XOPEN_SOURCE_EXTENDED
+#undef _XOPEN_SOURCE_EXTENDED
+#endif
+#ifdef _XOPEN_VERSION
+#undef _XOPEN_VERSION
+#endif
+#ifdef _POSIX_C_SOURCE
+#undef _POSIX_C_SOURCE
+#endif
+#ifdef _POSIX_SOURCE
+#undef _POSIX_SOURCE
+#endif
+#ifdef _DEFAULT_SOURCE
+#undef _DEFAULT_SOURCE
+#endif
+#ifdef _BSD_SOURCE
+#undef _BSD_SOURCE
+#endif
+#ifdef _SVID_SOURCE
+#undef _SVID_SOURCE
+#endif
+#ifdef __EXTENSIONS__
+#undef __EXTENSIONS__
+#endif
+#ifdef _ALL_SOURCE
+#undef _ALL_SOURCE
+#endif
+#ifdef _TANDEM_SOURCE
+#undef _TANDEM_SOURCE
+#endif
+#ifdef _DARWIN_C_SOURCE
+#undef _DARWIN_C_SOURCE
+#endif
+#ifdef __BSD_VISIBLE
+#undef __BSD_VISIBLE
+#endif
+#ifdef _NETBSD_SOURCE
+#undef _NETBSD_SOURCE
+#endif
+"
+]])])
+
+
+#
+# _MHD_UNDEF_ALL_EXT
+#
+# Output prolog that undefine all known extension and visibility macros.
+
+AC_DEFUN([_MHD_UNDEF_ALL_EXT], [dnl
+AC_REQUIRE([_MHD_SET_UNDEF_ALL_EXT])dnl
+$mhd_undef_all_extensions
+])
+
+
+#
+# _MHD_CHECK_DEFINED(SYMBOL, [PROLOG],
+# [ACTION-IF-DEFINED], [ACTION-IF-NOT-DEFINED])
+#
+# Silently checks for defined symbols.
+
+AC_DEFUN([_MHD_CHECK_DEFINED], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+m4_n([$2])dnl
+[#ifndef ]$1[
+#error ]$1[ is not defined
+choke me now;
+#endif
+ ]],[])
+ ], [m4_default_nblank([$3])], [m4_default_nblank([$4])]
+ )
+])
+
+
+#
+# MHD_CHECK_DEFINED(SYMBOL, [PROLOG],
+# [ACTION-IF-DEFINED], [ACTION-IF-NOT-DEFINED],
+# [MESSAGE])
+#
+# Cache-check for defined symbols with printing results.
+
+AC_DEFUN([MHD_CHECK_DEFINED], [dnl
+ AS_VAR_PUSHDEF([mhd_cache_Var],[mhd_cv_macro_[]m4_tolower(m4_normalize($1))_defined])dnl
+ AC_CACHE_CHECK([dnl
+m4_ifnblank([$5], [$5], [whether ]m4_normalize([$1])[ is already defined])],
+ [mhd_cache_Var], [dnl
+ _MHD_CHECK_DEFINED(m4_normalize([$1]), [$2],
+ [mhd_cache_Var="yes"],
+ [mhd_cache_Var="no"]
+ )
+ ])
+ _MHD_VAR_IF([mhd_cache_Var], [["yes"]], [$3], [$4])
+ AS_VAR_POPDEF([mhd_cache_Var])dnl
+])
+
+
+#
+# MHD_CHECK_DEFINED_MSG(SYMBOL, [PROLOG], [MESSAGE]
+# [ACTION-IF-DEFINED], [ACTION-IF-NOT-DEFINED])
+#
+# Cache-check for defined symbols with printing results.
+# Reordered arguments for better readability.
+
+AC_DEFUN([MHD_CHECK_DEFINED_MSG],[dnl
+MHD_CHECK_DEFINED([$1],[$2],[$4],[$5],[$3])])
+
+#
+# MHD_CHECK_ACCEPT_DEFINE(DEFINE-SYMBOL, [DEFINE-VALUE = 1], [PROLOG],
+# [ACTION-IF-ACCEPTED], [ACTION-IF-NOT-ACCEPTED],
+# [MESSAGE])
+#
+# Cache-check whether specific defined symbol do not break basic headers.
+
+AC_DEFUN([MHD_CHECK_ACCEPT_DEFINE], [dnl
+ AC_PREREQ([2.64])dnl for AS_VAR_PUSHDEF, AS_VAR_SET, m4_ifnblank
+ AS_VAR_PUSHDEF([mhd_cache_Var],
+ [mhd_cv_define_[]m4_tolower(m4_normalize($1))[]_accepted[]m4_ifnblank([$2],[_[]$2])])dnl
+ AC_CACHE_CHECK([dnl
+m4_ifnblank([$6],[$6],[whether headers accept $1[]m4_ifnblank([$2],[[ with value ]$2])])],
+ [mhd_cache_Var], [dnl
+ MHD_CHECK_BASIC_HEADERS([
+m4_n([$3])[#define ]$1 m4_default_nblank($2,[[1]])],
+ [mhd_cache_Var="yes"], [mhd_cache_Var="no"]
+ )
+ ])
+ _MHD_VAR_IF([mhd_cache_Var], [["yes"]], [$4], [$5])
+ AS_VAR_POPDEF([mhd_cache_Var])dnl
+])
+
+
+#
+# MHD_CHECK_DEF_AND_ACCEPT(DEFINE-SYMBOL, [DEFINE-VALUE = 1], [PROLOG],
+# [ACTION-IF-DEFINED],
+# [ACTION-IF-ACCEPTED], [ACTION-IF-NOT-ACCEPTED])
+#
+# Combination of MHD_CHECK_DEFINED_ECHO and MHD_CHECK_ACCEPT_DEFINE.
+# First check whether symbol is already defined and, if not defined,
+# checks whether it can be defined.
+
+AC_DEFUN([MHD_CHECK_DEF_AND_ACCEPT], [dnl
+ MHD_CHECK_DEFINED([$1], [$3], [$4], [dnl
+ MHD_CHECK_ACCEPT_DEFINE([$1], [$2], [$3], [$5], [$6])dnl
+ ])dnl
+])
+
+#
+# _MHD_XOPEN_VAR_ADD(DEFINES_VAR, FLAGS_VAR, [PROLOG])
+#
+# Internal macro. Only to be used in MHD_SYS_EXT.
+
+AC_DEFUN([_MHD_XOPEN_VAR_ADD], [dnl
+ MHD_CHECK_DEF_AND_ACCEPT([[_XOPEN_SOURCE]], [[1]], [$3],
+ [
+ AC_CACHE_CHECK([[whether predefined value of _XOPEN_SOURCE is more or equal 500]],
+ [[mhd_cv_macro__xopen_source_def_fiveh]], [dnl
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+m4_n([$3])dnl
+[#if _XOPEN_SOURCE+0 < 500
+#error Value of _XOPEN_SOURCE is less than 500
+choke me now;
+#endif
+ ]],[[int i = 0; i++; if(i) return i]])],
+ [[mhd_cv_macro__xopen_source_def_fiveh="yes"]],
+ [[mhd_cv_macro__xopen_source_def_fiveh="no"]]
+ )dnl
+ ]
+ )dnl
+ ],
+ [_MHD_SYS_EXT_VAR_ADD_FLAG([$1], [$2], [[_XOPEN_SOURCE]], [[1]])]
+ )
+ AS_IF([[test "x${mhd_cv_define__xopen_source_accepted_1}" = "xyes" || \
+ test "x${mhd_cv_macro__xopen_source_def_fiveh}" = "xno"]],
+ [
+ MHD_CHECK_DEF_AND_ACCEPT([[_XOPEN_SOURCE_EXTENDED]], [],
+ [
+m4_n([$3])], [],
+ [dnl
+ _MHD_SYS_EXT_VAR_ADD_FLAG([$1],[$2],[[_XOPEN_SOURCE_EXTENDED]])
+ ], [dnl
+ MHD_CHECK_DEFINED([[_XOPEN_VERSION]],
+ [
+m4_n([$3])], [],
+ [dnl
+ AC_CACHE_CHECK([[for value of _XOPEN_VERSION accepted by headers]],
+ [mhd_cv_define__xopen_version_accepted], [dnl
+ MHD_CHECK_BASIC_HEADERS([
+m4_n([$3])
+[#define _XOPEN_VERSION 4]],
+ [[mhd_cv_define__xopen_version_accepted="4"]],
+ [
+ MHD_CHECK_BASIC_HEADERS([
+m4_n([$3])
+[#define _XOPEN_VERSION 3]],
+ [[mhd_cv_define__xopen_version_accepted="3"]],
+ [[mhd_cv_define__xopen_version_accepted="no"]]
+ )
+ ])
+ ])
+ AS_VAR_IF([mhd_cv_define__xopen_version_accepted], [["no"]],
+ [[:]],
+ [dnl
+ _MHD_SYS_EXT_VAR_ADD_FLAG([$1],[$2],[[_XOPEN_VERSION]],
+ [[${mhd_cv_define__xopen_version_accepted}]]dnl
+ )
+ ])
+ ])
+ ])
+ ]
+ )dnl
+])
+
diff --git a/m4/pkg.m4 b/m4/pkg.m4
@@ -0,0 +1,275 @@
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
+dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
+dnl
+dnl This program is free software; you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation; either version 2 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+dnl General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+dnl 02111-1307, USA.
+dnl
+dnl As a special exception to the GNU General Public License, if you
+dnl distribute this file as part of a program that contains a
+dnl configuration script generated by Autoconf, you may include it under
+dnl the same distribution terms that you use for the rest of that
+dnl program.
+
+dnl PKG_PREREQ(MIN-VERSION)
+dnl -----------------------
+dnl Since: 0.29
+dnl
+dnl Verify that the version of the pkg-config macros are at least
+dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
+dnl installed version of pkg-config, this checks the developer's version
+dnl of pkg.m4 when generating configure.
+dnl
+dnl To ensure that this macro is defined, also add:
+dnl m4_ifndef([PKG_PREREQ],
+dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
+dnl
+dnl See the "Since" comment for each macro you use to see what version
+dnl of the macros you require.
+m4_defun([PKG_PREREQ],
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
+m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
+ [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
+])dnl PKG_PREREQ
+
+dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
+dnl ----------------------------------
+dnl Since: 0.16
+dnl
+dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
+dnl first found in the path. Checks that the version of pkg-config found
+dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
+dnl used since that's the first version where most current features of
+dnl pkg-config existed.
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+fi[]dnl
+])dnl PKG_PROG_PKG_CONFIG
+
+dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------------------------------
+dnl Since: 0.18
+dnl
+dnl Check to see whether a particular set of modules exists. Similar to
+dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
+dnl
+dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+dnl only at the first occurrence in configure.ac, so if the first place
+dnl it's called might be skipped (such as if it is within an "if", you
+dnl have to call PKG_CHECK_EXISTS manually
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_default([$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+dnl ---------------------------------------------
+dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
+dnl pkg_failed based on the result.
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
+ [pkg_failed=yes])
+ else
+ pkg_failed=untried
+fi[]dnl
+])dnl _PKG_CONFIG
+
+dnl _PKG_SHORT_ERRORS_SUPPORTED
+dnl ---------------------------
+dnl Internal check to see if pkg-config supports short errors.
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])dnl _PKG_SHORT_ERRORS_SUPPORTED
+
+
+dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl --------------------------------------------------------------
+dnl Since: 0.4.0
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
+dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $2])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ AC_MSG_RESULT([no])
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+ ])
+elif test $pkg_failed = untried; then
+ AC_MSG_RESULT([no])
+ m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+ ])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ $3
+fi[]dnl
+])dnl PKG_CHECK_MODULES
+
+
+dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+dnl [ACTION-IF-NOT-FOUND])
+dnl ---------------------------------------------------------------------
+dnl Since: 0.29
+dnl
+dnl Checks for existence of MODULES and gathers its build flags with
+dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
+dnl and VARIABLE-PREFIX_LIBS from --libs.
+dnl
+dnl Note that if there is a possibility the first call to
+dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
+dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
+dnl configure.ac.
+AC_DEFUN([PKG_CHECK_MODULES_STATIC],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+_save_PKG_CONFIG=$PKG_CONFIG
+PKG_CONFIG="$PKG_CONFIG --static"
+PKG_CHECK_MODULES($@)
+PKG_CONFIG=$_save_PKG_CONFIG[]dnl
+])dnl PKG_CHECK_MODULES_STATIC
+
+
+dnl PKG_INSTALLDIR([DIRECTORY])
+dnl -------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable pkgconfigdir as the location where a module
+dnl should install pkg-config .pc files. By default the directory is
+dnl $libdir/pkgconfig, but the default can be changed by passing
+dnl DIRECTORY. The user can override through the --with-pkgconfigdir
+dnl parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+ [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+ [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_INSTALLDIR
+
+
+dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
+dnl --------------------------------
+dnl Since: 0.27
+dnl
+dnl Substitutes the variable noarch_pkgconfigdir as the location where a
+dnl module should install arch-independent pkg-config .pc files. By
+dnl default the directory is $datadir/pkgconfig, but the default can be
+dnl changed by passing DIRECTORY. The user can override through the
+dnl --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+ [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+ [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+ [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+])dnl PKG_NOARCH_INSTALLDIR
+
+
+dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+dnl -------------------------------------------
+dnl Since: 0.28
+dnl
+dnl Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])dnl PKG_CHECK_VAR
diff --git a/m4/printf-posix.m4 b/m4/printf-posix.m4
@@ -0,0 +1,48 @@
+# printf-posix.m4 serial 6 (gettext-0.18.2)
+dnl Copyright (C) 2003, 2007, 2009-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+ gt_cv_func_printf_posix,
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}]])],
+ [gt_cv_func_printf_posix=yes],
+ [gt_cv_func_printf_posix=no],
+ [
+ AC_EGREP_CPP([notposix], [
+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+ notposix
+#endif
+ ],
+ [gt_cv_func_printf_posix="guessing no"],
+ [gt_cv_func_printf_posix="guessing yes"])
+ ])
+ ])
+ case $gt_cv_func_printf_posix in
+ *yes)
+ AC_DEFINE([HAVE_POSIX_PRINTF], [1],
+ [Define if your printf() function supports format strings with positions.])
+ ;;
+ esac
+])
diff --git a/m4/size_max.m4 b/m4/size_max.m4
@@ -0,0 +1,75 @@
+# size_max.m4 serial 12
+dnl Copyright (C) 2003, 2005-2006, 2008-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.61])
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+ AC_CHECK_HEADERS([stdint.h])
+ dnl First test whether the system already has SIZE_MAX.
+ AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
+ gl_cv_size_max=no
+ AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], [gl_cv_size_max=yes])
+ if test $gl_cv_size_max != yes; then
+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+ dnl than the type 'unsigned long'. Try hard to find a definition that can
+ dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+ AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
+ [#include <stddef.h>
+#include <limits.h>], [size_t_bits_minus_1=])
+ AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
+ [#include <stddef.h>], [fits_in_uint=])
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+ ]],
+ [[]])],
+ [fits_in_uint=0])
+ fi
+ dnl We cannot use 'expr' to simplify this expression, because 'expr'
+ dnl works only with 'long' integers in the host environment, while we
+ dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ dnl Shouldn't happen, but who knows...
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+ ])
+ if test "$gl_cv_size_max" != yes; then
+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+ fi
+ dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
+ dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
+ dnl #define by AC_DEFINE_UNQUOTED.
+ AH_VERBATIM([SIZE_MAX],
+[/* Define as the maximum value of type 'size_t', if the system doesn't define
+ it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif])
+])
diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4
@@ -0,0 +1,27 @@
+# stdint_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <stdint.h>]],
+ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
+ [gl_cv_header_stdint_h=yes],
+ [gl_cv_header_stdint_h=no])])
+ if test $gl_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
@@ -0,0 +1,622 @@
+# threadlib.m4 serial 29
+dnl Copyright (C) 2005-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.60])
+
+dnl The general structure of the multithreading modules in gnulib is that we
+dnl have three set of modules:
+dnl
+dnl * POSIX API:
+dnl pthread, which combines
+dnl pthread-h
+dnl pthread-thread
+dnl pthread-once
+dnl pthread-mutex
+dnl pthread-rwlock
+dnl pthread-cond
+dnl pthread-tss
+dnl pthread-spin
+dnl sched_yield
+dnl
+dnl * ISO C API:
+dnl threads, which combines
+dnl threads-h
+dnl thrd
+dnl mtx
+dnl cnd
+dnl tss
+dnl
+dnl * Gnulib API, with an implementation that can be chosen at configure
+dnl time through the option --enable-threads=...
+dnl thread
+dnl lock
+dnl cond
+dnl tls
+dnl yield
+dnl
+dnl They are independent, except for the fact that
+dnl - the implementation of the ISO C API may use the POSIX (or some other
+dnl platform dependent) API,
+dnl - the implementation of the Gnulib API may use the POSIX or ISO C or
+dnl some other platform dependent API, depending on the --enable-threads
+dnl option.
+dnl
+dnl This file contains macros for all of these APIs!
+
+dnl ============================================================================
+dnl Macros for all thread APIs
+
+AC_DEFUN([gl_ANYTHREADLIB_EARLY],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test -z "$gl_anythreadlib_early_done"; then
+ case "$host_os" in
+ osf*)
+ # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+ # groks <pthread.h>. cc also understands the flag -pthread, but
+ # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+ # 2. putting a flag into CPPFLAGS that has an effect on the linker
+ # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
+ # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ ;;
+ esac
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case "$host_os" in
+ aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+ solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+ esac
+ gl_anythreadlib_early_done=done
+ fi
+])
+
+dnl Checks whether the compiler and linker support weak declarations of symbols.
+
+AC_DEFUN([gl_WEAK_SYMBOLS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether imported symbols can be declared weak],
+ [gl_cv_have_weak],
+ [gl_cv_have_weak=no
+ dnl First, test whether the compiler accepts it syntactically.
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern void xyzzy ();
+#pragma weak xyzzy]],
+ [[xyzzy();]])],
+ [gl_cv_have_weak=maybe])
+ if test $gl_cv_have_weak = maybe; then
+ dnl Second, test whether it actually works. On Cygwin 1.7.2, with
+ dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#pragma weak fputs
+int main ()
+{
+ return (fputs == NULL);
+}]])],
+ [gl_cv_have_weak=yes],
+ [gl_cv_have_weak=no],
+ [dnl When cross-compiling, assume that only ELF platforms support
+ dnl weak symbols.
+ AC_EGREP_CPP([Extensible Linking Format],
+ [#ifdef __ELF__
+ Extensible Linking Format
+ #endif
+ ],
+ [gl_cv_have_weak="guessing yes"],
+ [gl_cv_have_weak="guessing no"])
+ ])
+ fi
+ dnl But when linking statically, weak symbols don't work.
+ case " $LDFLAGS " in
+ *" -static "*) gl_cv_have_weak=no ;;
+ esac
+ dnl Test for a bug in FreeBSD 11: A link error occurs when using a weak
+ dnl symbol and linking against a shared library that has a dependency on
+ dnl the shared library that defines the symbol.
+ case "$gl_cv_have_weak" in
+ *yes)
+ case "$host_os" in
+ freebsd* | dragonfly*)
+ : > conftest1.c
+ $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&AS_MESSAGE_LOG_FD 2>&1
+ cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+ return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+ $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&AS_MESSAGE_LOG_FD 2>&1 \
+ || gl_cv_have_weak=no
+ rm -f conftest1.c libempty.so conftest2.c conftest
+ ;;
+ esac
+ ;;
+ esac
+ ])
+ case "$gl_cv_have_weak" in
+ *yes)
+ AC_DEFINE([HAVE_WEAK_SYMBOLS], [1],
+ [Define to 1 if the compiler and linker support weak declarations of symbols.])
+ ;;
+ esac
+])
+
+dnl ============================================================================
+dnl Macros for the POSIX API
+
+dnl gl_PTHREADLIB
+dnl -------------
+dnl Tests for the libraries needs for using the POSIX threads API.
+dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile.
+dnl Sets the variable LIBPMULTITHREAD, for programs that really need
+dnl multithread functionality. The difference between LIBPTHREAD and
+dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
+dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
+dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the
+dnl sched_yield() function.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Defines the C macro HAVE_PTHREAD_API if (at least parts of) the POSIX
+dnl threads API is available.
+
+dnl The guts of gl_PTHREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_PTHREADLIB_BODY],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ if test -z "$gl_pthreadlib_body_done"; then
+ gl_pthread_api=no
+ LIBPTHREAD=
+ LIBPMULTITHREAD=
+ # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+ # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
+ AC_CHECK_HEADER([pthread.h],
+ [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+ # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+ # the second one only in libpthread, and lock.c needs it.
+ #
+ # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
+ # needs -pthread for some reason. See:
+ # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
+ save_LIBS=$LIBS
+ for gl_pthread in '' '-pthread'; do
+ LIBS="$LIBS $gl_pthread"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ pthread_mutex_t m;
+ pthread_mutexattr_t ma;
+ ]],
+ [[pthread_mutex_lock (&m);
+ pthread_mutexattr_init (&ma);]])],
+ [gl_pthread_api=yes
+ LIBPTHREAD=$gl_pthread
+ LIBPMULTITHREAD=$gl_pthread])
+ LIBS=$save_LIBS
+ test $gl_pthread_api = yes && break
+ done
+
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [LIBPMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ # On Solaris 10 or newer, this test is no longer needed, because
+ # libc contains the fully functional pthread functions.
+ case "$host_os" in
+ solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ esac
+ ])
+ elif test $gl_pthread_api != yes; then
+ # Some library is needed. Try libpthread and libc_r.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [gl_pthread_api=yes
+ LIBPTHREAD=-lpthread
+ LIBPMULTITHREAD=-lpthread])
+ if test $gl_pthread_api != yes; then
+ # For FreeBSD 4.
+ AC_CHECK_LIB([c_r], [pthread_kill],
+ [gl_pthread_api=yes
+ LIBPTHREAD=-lc_r
+ LIBPMULTITHREAD=-lc_r])
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([whether POSIX threads API is available])
+ AC_MSG_RESULT([$gl_pthread_api])
+ AC_SUBST([LIBPTHREAD])
+ AC_SUBST([LIBPMULTITHREAD])
+ if test $gl_pthread_api = yes; then
+ AC_DEFINE([HAVE_PTHREAD_API], [1],
+ [Define if you have the <pthread.h> header and the POSIX threads API.])
+ fi
+
+ dnl On some systems, sched_yield is in librt, rather than in libpthread.
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sched.h>]],
+ [[sched_yield ();]])],
+ [LIB_SCHED_YIELD=
+ ],
+ [dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
+ AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+ [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
+ AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])])
+ ])
+ AC_SUBST([LIB_SCHED_YIELD])
+
+ gl_pthreadlib_body_done=done
+ fi
+])
+
+AC_DEFUN([gl_PTHREADLIB],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ gl_PTHREADLIB_BODY
+])
+
+dnl ============================================================================
+dnl Macros for the ISO C API
+
+dnl gl_STDTHREADLIB
+dnl ---------------
+dnl Tests for the libraries needs for using the ISO C threads API.
+dnl Sets the variable LIBSTDTHREAD to the linker options for use in a Makefile.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Defines the C macro HAVE_THREADS_H if (at least parts of) the ISO C threads
+dnl API is available.
+
+dnl The guts of gl_STDTHREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_STDTHREADLIB_BODY],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test -z "$gl_stdthreadlib_body_done"; then
+ AC_CHECK_HEADERS_ONCE([threads.h])
+
+ case "$host_os" in
+ mingw*)
+ LIBSTDTHREAD=
+ ;;
+ *)
+ gl_PTHREADLIB_BODY
+ if test $ac_cv_header_threads_h = yes; then
+ dnl glibc >= 2.29 has thrd_create in libpthread.
+ dnl FreeBSD >= 10 has thrd_create in libstdthreads; this library depends
+ dnl on libpthread (for the symbol 'pthread_mutexattr_gettype').
+ dnl AIX >= 7.1 and Solaris >= 11.4 have thrd_create in libc.
+ AC_CHECK_FUNCS([thrd_create])
+ if test $ac_cv_func_thrd_create = yes; then
+ LIBSTDTHREAD=
+ else
+ AC_CHECK_LIB([stdthreads], [thrd_create], [
+ LIBSTDTHREAD='-lstdthreads -lpthread'
+ ], [
+ dnl Guess that thrd_create is in libpthread.
+ LIBSTDTHREAD="$LIBPMULTITHREAD"
+ ])
+ fi
+ else
+ dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
+ LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+ fi
+ ;;
+ esac
+ AC_SUBST([LIBSTDTHREAD])
+
+ AC_MSG_CHECKING([whether ISO C threads API is available])
+ AC_MSG_RESULT([$ac_cv_header_threads_h])
+ gl_stdthreadlib_body_done=done
+ fi
+])
+
+AC_DEFUN([gl_STDTHREADLIB],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ gl_STDTHREADLIB_BODY
+])
+
+dnl ============================================================================
+dnl Macros for the Gnulib API
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
+dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
+dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl can change the choice through the options --enable-threads=choice or
+dnl --disable-threads.
+dnl Defines at most one of the macros USE_ISOC_THREADS, USE_POSIX_THREADS,
+dnl USE_ISOC_AND_POSIX_THREADS, USE_WINDOWS_THREADS.
+dnl The choice --enable-threads=isoc+posix is available only on platforms that
+dnl have both the ISO C and the POSIX threads APIs. It has the effect of using
+dnl the ISO C API for most things and the POSIX API only for creating and
+dnl controlling threads (because there is no equivalent to pthread_atfork in
+dnl the ISO C API).
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Since support for GNU pth was removed, $LTLIBTHREAD and $LIBTHREAD have the
+dnl same value, and similarly $LTLIBMULTITHREAD and $LIBMULTITHREAD have the
+dnl same value. Only system libraries are needed.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+ dnl influences the result of the autoconf tests that test for *_unlocked
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ dnl Check for multithreading.
+ m4_ifdef([gl_THREADLIB_DEFAULT_NO],
+ [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
+ [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
+ m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
+ AC_ARG_ENABLE([threads],
+AS_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
+ [gl_use_threads=$enableval],
+ [if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+changequote(,)dnl
+ case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+ dnl child process gets an endless segmentation fault inside execvp().
+ osf*) gl_use_threads=no ;;
+ dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+ dnl bugs that lead to endless loops or crashes. See
+ dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+ cygwin*)
+ case `uname -r` in
+ 1.[0-5].*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ dnl Obey gl_AVOID_WINPTHREAD on mingw.
+ mingw*)
+ case "$gl_use_winpthreads_default" in
+ yes) gl_use_threads=posix ;;
+ no) gl_use_threads=windows ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ *) gl_use_threads=yes ;;
+ esac
+changequote([,])dnl
+ fi
+ ])
+ if test "$gl_use_threads" = yes \
+ || test "$gl_use_threads" = isoc \
+ || test "$gl_use_threads" = posix \
+ || test "$gl_use_threads" = isoc+posix; then
+ # For using <threads.h> or <pthread.h>:
+ gl_ANYTHREADLIB_EARLY
+ fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ dnl Check whether the compiler and linker support weak declarations.
+ gl_WEAK_SYMBOLS
+ if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+ dnl If we use weak symbols to implement pthread_in_use / pth_in_use /
+ dnl thread_in_use, we also need to test whether the ISO C 11 thrd_create
+ dnl facility is in use.
+ AC_CHECK_HEADERS_ONCE([threads.h])
+ :
+ fi
+ if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
+ AC_CHECK_HEADERS_ONCE([threads.h])
+ gl_have_isoc_threads="$ac_cv_header_threads_h"
+ fi
+ if test "$gl_use_threads" = yes \
+ || test "$gl_use_threads" = posix \
+ || test "$gl_use_threads" = isoc+posix; then
+ gl_PTHREADLIB_BODY
+ LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
+ LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
+ if test $gl_pthread_api = yes; then
+ if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
+ gl_threads_api='isoc+posix'
+ AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1],
+ [Define if the combination of the ISO C and POSIX multithreading APIs can be used.])
+ LIBTHREAD= LTLIBTHREAD=
+ else
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], [1],
+ [Define if the POSIX multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+ [Define if references to the POSIX multithreading library should be made weak.])
+ LIBTHREAD= LTLIBTHREAD=
+ else
+ case "$host_os" in
+ freebsd* | dragonfly*)
+ if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
+ dnl If weak symbols can't tell whether pthread_create(), pthread_key_create()
+ dnl etc. will succeed, we need a runtime test.
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ fi
+ ;;
+ esac
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test $gl_threads_api = none; then
+ if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
+ gl_STDTHREADLIB_BODY
+ LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
+ LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
+ gl_threads_api=isoc
+ AC_DEFINE([USE_ISOC_THREADS], [1],
+ [Define if the ISO C multithreading library can be used.])
+ fi
+ fi
+ if test $gl_threads_api = none; then
+ case "$gl_use_threads" in
+ yes | windows | win32) # The 'win32' is for backward compatibility.
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=windows
+ AC_DEFINE([USE_WINDOWS_THREADS], [1],
+ [Define if the native Windows multithreading API can be used.])
+ fi
+ ;;
+ esac
+ fi
+ fi
+ AC_MSG_CHECKING([for multithread API to use])
+ AC_MSG_RESULT([$gl_threads_api])
+ AC_SUBST([LIBTHREAD])
+ AC_SUBST([LTLIBTHREAD])
+ AC_SUBST([LIBMULTITHREAD])
+ AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl gl_AVOID_WINPTHREAD
+dnl -------------------
+dnl Sets the gl_THREADLIB default so that on mingw, a dependency to the
+dnl libwinpthread DLL (mingw-w64 winpthreads library) is avoided.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_AVOID_WINPTHREAD], [
+ m4_divert_text([INIT_PREPARE], [gl_use_winpthreads_default=no])
+])
+
+
+dnl ============================================================================
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl
+dnl GNU Hurd/glibc posix
+dnl
+dnl Ubuntu 14.04 posix -pthread Y OK
+dnl
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl
+dnl NetBSD 1.6 --
+dnl
+dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl
+dnl Mac OS X 10.[123] posix -lpthread Y OK
+dnl
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl Y (gcc)
+dnl
+dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl -lpthread (gcc) Y
+dnl
+dnl Cygwin posix -lpthread Y OK
+dnl
+dnl Mingw windows N OK
+dnl
+dnl BeOS 5 --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl OK if all three tests terminate OK,
+dnl 0.5 if the first test terminates OK but the second one loops endlessly,
+dnl 0.0 if the first test already loops endlessly.
diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 12
+dnl Copyright (C) 1997-2004, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_PREREQ([2.13])
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
+ [Define to unsigned long or unsigned long long
+ if <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE([HAVE_UINTMAX_T], [1],
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
diff --git a/m4/visibility.m4 b/m4/visibility.m4
@@ -0,0 +1,77 @@
+# visibility.m4 serial 6
+dnl Copyright (C) 2005, 2008, 2010-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl Mac OS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ dnl First, check whether -Werror can be added to the command line, or
+ dnl whether it leads to an error because of some other option that the
+ dnl user has put into $CC $CFLAGS $CPPFLAGS.
+ AC_CACHE_CHECK([whether the -Werror option is usable],
+ [gl_cv_cc_vis_werror],
+ [gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_vis_werror=yes],
+ [gl_cv_cc_vis_werror=no])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ dnl Now check whether visibility declarations are supported.
+ AC_CACHE_CHECK([for simple visibility declarations],
+ [gl_cv_cc_visibility],
+ [gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ dnl We use the option -Werror and a function dummyfunc, because on some
+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+ dnl "visibility attribute not supported in this configuration; ignored"
+ dnl at the first function definition in every compilation unit, and we
+ dnl don't want to use the option in this case.
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}
+ ]],
+ [[]])],
+ [gl_cv_cc_visibility=yes],
+ [gl_cv_cc_visibility=no])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4
@@ -0,0 +1,24 @@
+# wchar_t.m4 serial 4 (gettext-0.18.2)
+dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';]],
+ [[]])],
+ [gt_cv_c_wchar_t=yes],
+ [gt_cv_c_wchar_t=no])])
+ if test $gt_cv_c_wchar_t = yes; then
+ AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
+ fi
+])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
@@ -0,0 +1,57 @@
+# wint_t.m4 serial 10
+dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
+dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';]],
+ [[]])],
+ [gt_cv_c_wint_t=yes],
+ [gt_cv_c_wint_t=no])])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+
+ dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
+ dnl override 'wint_t'.
+ AC_CACHE_CHECK([whether wint_t is large enough],
+ [gl_cv_type_wint_t_large_enough],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+ ]])],
+ [gl_cv_type_wint_t_large_enough=yes],
+ [gl_cv_type_wint_t_large_enough=no])])
+ if test $gl_cv_type_wint_t_large_enough = no; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ AC_SUBST([GNULIB_OVERRIDES_WINT_T])
+])
+
+dnl Prerequisites of the 'wint_t' override.
+AC_DEFUN([gl_TYPE_WINT_T_PREREQ],
+[
+ AC_CHECK_HEADERS_ONCE([crtdefs.h])
+ if test $ac_cv_header_crtdefs_h = yes; then
+ HAVE_CRTDEFS_H=1
+ else
+ HAVE_CRTDEFS_H=0
+ fi
+ AC_SUBST([HAVE_CRTDEFS_H])
+])
diff --git a/m4/xsize.m4 b/m4/xsize.m4
@@ -0,0 +1,12 @@
+# xsize.m4 serial 5
+dnl Copyright (C) 2003-2004, 2008-2016 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSIZE],
+[
+ dnl Prerequisites of lib/xsize.h.
+ AC_REQUIRE([gl_SIZE_MAX])
+ AC_CHECK_HEADERS([stdint.h])
+])
diff --git a/po/.gitignore b/po/.gitignore
@@ -0,0 +1,5 @@
+/build-aux/install?sh
+/autopoint-trigger
+/autopoint-timestamp
+/stamp-m.in
+/stamp-m
diff --git a/po/ABOUT-NLS b/po/ABOUT-NLS
@@ -0,0 +1 @@
+<https://www.gnu.org/software/gettext/manual/html_node/Users.html>
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
@@ -0,0 +1,510 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 2000-2020 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+#
+# Origin: gettext-0.21
+GETTEXT_MACRO_VERSION = 0.20
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SED = @SED@
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+# When building gettext-tools, we prefer to use the built programs
+# rather than installed programs. However, we can't do that when we
+# are cross compiling.
+CROSS_COMPILING = @CROSS_COMPILING@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = @MSGMERGE@
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
+POFILESDEPS_yes = $(POFILESDEPS_)
+POFILESDEPS_no =
+POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
+
+DISTFILESDEPS_ = update-po
+DISTFILESDEPS_yes = $(DISTFILESDEPS_)
+DISTFILESDEPS_no =
+DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+all: all-@USE_NLS@
+
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
+
+# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
+# The GNU Coding Standards say in
+# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
+# "GNU distributions usually contain some files which are not source files
+# ... . Since these files normally appear in the source directory, they
+# should always appear in the source directory, not in the build directory.
+# So Makefile rules to update them should put the updated files in the
+# source directory."
+# Therefore we put these files in the source directory, not the build directory.
+
+# During .po -> .gmo conversion, take into account the most recent changes to
+# the .pot file. This eliminates the need to update the .po files when the
+# .pot file has changed, which would be troublesome if the .po files are put
+# under version control.
+$(GMOFILES): $(srcdir)/$(DOMAIN).pot
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
+ cd $(srcdir) && \
+ rm -f $${lang}.gmo && \
+ $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
+ $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
+ mv t-$${lang}.gmo $${lang}.gmo && \
+ rm -f $${lang}.1po
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all-yes: $(srcdir)/stamp-po
+all-no:
+
+# Ensure that the gettext macros and this Makefile.in.in are in sync.
+CHECK_MACRO_VERSION = \
+ test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
+ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
+ exit 1; \
+ }
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
+
+# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
+# have been loosely updated. Its purpose is that when a developer or translator
+# checks out the package from a version control system, and the $(DOMAIN).pot
+# file is not under version control, "make" will update the $(DOMAIN).pot and
+# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
+# timestamp would not be necessary if updating the $(CATALOGS) would always
+# touch them; however, the rule for $(POFILES) has been designed to not touch
+# files that don't need to be changed.
+$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
+ @$(CHECK_MACRO_VERSION)
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+ echo "touch $(srcdir)/stamp-po" && \
+ echo timestamp > $(srcdir)/stamp-poT && \
+ mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
+ }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+# The determination of whether the package xyz is a GNU one is based on the
+# heuristic whether some file in the top level directory mentions "GNU xyz".
+# If GNU 'find' is available, we avoid grepping through monster files.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ package_gnu="$(PACKAGE_GNU)"; \
+ test -n "$$package_gnu" || { \
+ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
+ LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \
+ else \
+ LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
+ fi; \
+ } | grep -v 'libtool:' >/dev/null; then \
+ package_gnu=yes; \
+ else \
+ package_gnu=no; \
+ fi; \
+ }; \
+ if test "$$package_gnu" = "yes"; then \
+ package_prefix='GNU '; \
+ else \
+ package_prefix=''; \
+ fi; \
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+ else \
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
+ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ ;; \
+ *) \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --package-name="$${package_prefix}@PACKAGE@" \
+ --package-version='@VERSION@' \
+ --msgid-bugs-address="$$msgid_bugs_address" \
+ $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
+ ;; \
+ esac
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot-header; then \
+ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
+ cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
+ rm -f $(DOMAIN).1po \
+ || exit 1; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(POFILESDEPS)
+ @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ if test -f "$(srcdir)/$${lang}.po"; then \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) \
+ && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
+ 0.1[6-7] | 0.1[6-7].*) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
+ esac; \
+ }; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+install-dvi install-ps install-pdf install-html:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f $(srcdir)/stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(srcdir)/stamp-po $(DISTFILES)
+ @dists="$(DISTFILES)"; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
+ else \
+ case $(XGETTEXT) in \
+ :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
+ *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
+ esac; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir) || exit 1; \
+ else \
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+ exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ 0.1[6-7] | 0.1[6-7].*) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ *) \
+ $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
+ esac; \
+ }; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
+# because execution permission bits may not work on the current file system.
+# Use @SHELL@, which is the shell determined by autoconf for the use by its
+# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+ cd $(top_builddir) \
+ && @SHELL@ ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
@@ -0,0 +1,113 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+#
+# Copyright (C) 2003-2019 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to use, copy, distribute, and modify it.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty. If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU = yes
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = libmicrohttpd@gnu.org
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+# --previous to keep previous msgids of translated messages,
+# --quiet to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed. Possible values are "yes" and "no". Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = yes
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist". Possible values are "yes" and
+# "no". Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = yes
+
+# Hacks for MHD
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+
+$(top_builddir)/po-config.status: $(srcdir)/po-configure.ac.in $(top_srcdir)/configure.ac
+ @echo "cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) po-config.status" && \
+ $(am__cd) '$(top_builddir)' && $(MAKE) $(AM_MAKEFLAGS) po-config.status
+
+$(srcdir)/POTFILES.in: $(top_srcdir)/src/microhttpd/Makefile.am
+ @echo "cd $(top_srcdir)/src/microhttpd && $(MAKE) $(AM_MAKEFLAGS) update-po-POTFILES.in" && \
+ $(am__cd) '$(top_srcdir)/src/microhttpd' && $(MAKE) $(AM_MAKEFLAGS) update-po-POTFILES.in
+
+$(srcdir)/stamp-m.in:
+ @: > '$@'
+
+stamp-m: $(srcdir)/Makefile.in.in $(srcdir)/Makevars $(top_builddir)/po-config.status $(srcdir)/POTFILES.in $(srcdir)/stamp-m.in
+ @$(am__cd) $(top_builddir) \
+ && $(MHD_CONFIG_SHELL) ./po-config.status po/stamp-m po/Makefile.in po-directories
+
+.DELETE_ON_ERROR: stamp-m
+
+$(srcdir)/$(MHD_AUX_DIR)/install-sh: $(topsrcdir)/$(MHD_AUX_DIR)/install-sh
+ @$(MKDIR_P) '$(topsrcdir)/$(MHD_AUX_DIR)'
+ cp -f '$(topsrcdir)/$(MHD_AUX_DIR)/install-sh' '$@'
+
+mostlyclean: mostlycleancustom
+mostlycleancustom:
+ -rm -f stamp-m Makefile.in po-configure.ac
+ -rm -f $(top_builddir)/po-config.status
+
+.PHONY: mostlycleancustom
diff --git a/po/Makevars.template b/po/Makevars.template
@@ -0,0 +1,82 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+#
+# Copyright (C) 2003-2019 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to use, copy, distribute, and modify it.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty. If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU =
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+# --previous to keep previous msgids of translated messages,
+# --quiet to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed. Possible values are "yes" and "no". Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = yes
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist". Possible values are "yes" and
+# "no". Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = yes
diff --git a/po/POTFILES.in b/po/POTFILES.in
@@ -0,0 +1,41 @@
+src/include/microhttpd.h
+src/microhttpd/base64.h
+src/microhttpd/mhd_mono_clock.h
+src/microhttpd/tsearch.h
+src/microhttpd/connection_https.c
+src/microhttpd/reason_phrase.c
+src/microhttpd/mhd_itc_types.h
+src/microhttpd/sysfdsetsize.h
+src/microhttpd/mhd_threads.h
+src/microhttpd/mhd_sockets.c
+src/microhttpd/mhd_threads.c
+src/microhttpd/mhd_str.h
+src/microhttpd/mhd_compat.c
+src/microhttpd/tsearch.c
+src/microhttpd/internal.c
+src/microhttpd/mhd_byteorder.h
+src/microhttpd/mhd_locks.h
+src/microhttpd/memorypool.h
+src/microhttpd/memorypool.c
+src/microhttpd/connection.h
+src/microhttpd/internal.h
+src/microhttpd/digestauth.c
+src/microhttpd/sysfdsetsize.c
+src/microhttpd/md5.h
+src/microhttpd/postprocessor.c
+src/microhttpd/response.h
+src/microhttpd/mhd_str.c
+src/microhttpd/daemon.c
+src/microhttpd/mhd_assert.h
+src/microhttpd/mhd_mono_clock.c
+src/microhttpd/base64.c
+src/microhttpd/md5.c
+src/microhttpd/mhd_sockets.h
+src/microhttpd/mhd_compat.h
+src/microhttpd/connection.c
+src/microhttpd/response.c
+src/microhttpd/mhd_itc.h
+src/microhttpd/connection_https.h
+src/microhttpd/mhd_limits.h
+src/microhttpd/mhd_itc.c
+src/microhttpd/basicauth.c
diff --git a/po/Rules-quot b/po/Rules-quot
@@ -0,0 +1,62 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+#
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
+# This file, Rules-quot, and its auxiliary files (listed under
+# DISTFILES.common.extra1) are free software; the Free Software Foundation
+# gives unlimited permission to use, copy, distribute, and modify them.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+ $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+ $(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ ll=`echo $$lang | sed -e 's/@.*//'`; \
+ LC_ALL=C; export LC_ALL; \
+ cd $(srcdir); \
+ if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
+ | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
+ { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
+ $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
+ ;; \
+ *) \
+ $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
+ ;; \
+ esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
+ ; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "creation of $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+en@quot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“[1m/g
+s/”/[0m”/g
+s/‘/‘[1m/g
+s/’/[0m’/g
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/insert-header.sin b/po/insert-header.sin
@@ -0,0 +1,28 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# Copyright (C) 2001 Free Software Foundation, Inc.
+# Written by Bruno Haible <bruno@clisp.org>, 2001.
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to use, copy, distribute, and modify it.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/m4/gettext.m4 b/po/m4/gettext.m4
@@ -0,0 +1,386 @@
+# gettext.m4 serial 72 (gettext-0.21.1)
+dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL must be one of 'external', 'use-libtool'.
+dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and
+dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED).
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value '$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])
+ m4_if(m4_if([$1], [], [old])[]m4_if([$1], [no-libtool], [old]), [old],
+ [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
+])])
+ m4_if([$2], [], , [m4_if([$2], [need-ngettext], , [m4_if([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ m4_if([$1], [external], [no], [yes]))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ m4_if(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
+ m4_if(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ m4_if(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ m4_if(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH([included-gettext],
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+ ]])],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ m4_if(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+ ]])],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <libintl.h>
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
+ ]],
+ [[
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
+ ]])],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ m4_if(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
+ LTLIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE([ENABLE_NLS], [1],
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE([HAVE_GETTEXT], [1],
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ m4_if(gt_included_intl, yes, [
+ dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes'
+ dnl because some of the testsuite requires it.
+ BUILD_INCLUDED_LIBINTL=yes
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST([INTLLIBS])
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+
+dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
diff --git a/po/m4/host-cpu-c-abi.m4 b/po/m4/host-cpu-c-abi.m4
@@ -0,0 +1,678 @@
+# host-cpu-c-abi.m4 serial 15
+dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible and Sam Steingold.
+
+dnl Sets the HOST_CPU variable to the canonical name of the CPU.
+dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
+dnl C language ABI (application binary interface).
+dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
+dnl config.h.
+dnl
+dnl This canonical name can be used to select a particular assembly language
+dnl source file that will interoperate with C code on the given host.
+dnl
+dnl For example:
+dnl * 'i386' and 'sparc' are different canonical names, because code for i386
+dnl will not run on SPARC CPUs and vice versa. They have different
+dnl instruction sets.
+dnl * 'sparc' and 'sparc64' are different canonical names, because code for
+dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
+dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
+dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
+dnl mode, but not both.
+dnl * 'mips' and 'mipsn32' are different canonical names, because they use
+dnl different argument passing and return conventions for C functions, and
+dnl although the instruction set of 'mips' is a large subset of the
+dnl instruction set of 'mipsn32'.
+dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
+dnl different sizes for the C types like 'int' and 'void *', and although
+dnl the instruction sets of 'mipsn32' and 'mips64' are the same.
+dnl * The same canonical name is used for different endiannesses. You can
+dnl determine the endianness through preprocessor symbols:
+dnl - 'arm': test __ARMEL__.
+dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
+dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
+dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
+dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
+dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
+dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
+dnl assembly language source files use such instructions, you will
+dnl need to make the distinction.
+dnl - Speed of execution of the common instruction set is reasonable across
+dnl the entire family of CPUs. If you have assembly language source files
+dnl that are optimized for particular CPU types (like GNU gmp has), you
+dnl will need to make the distinction.
+dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
+AC_DEFUN([gl_HOST_CPU_C_ABI],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_C_ASM])
+ AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
+ [case "$host_cpu" in
+
+changequote(,)dnl
+ i[34567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi=i386
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=x86_64-x32],
+ [gl_cv_host_cpu_c_abi=x86_64])],
+ [gl_cv_host_cpu_c_abi=i386])
+ ;;
+
+changequote(,)dnl
+ alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi=alpha
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __aarch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __ILP32__ || defined _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=arm64-ilp32],
+ [gl_cv_host_cpu_c_abi=arm64])],
+ [# Don't distinguish little-endian and big-endian arm, since they
+ # don't require different machine code for simple operations and
+ # since the user can distinguish them through the preprocessor
+ # defines __ARMEL__ vs. __ARMEB__.
+ # But distinguish arm which passes floating-point arguments and
+ # return values in integer registers (r0, r1, ...) - this is
+ # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
+ # passes them in float registers (s0, s1, ...) and double registers
+ # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
+ # sets the preprocessor defines __ARM_PCS (for the first case) and
+ # __ARM_PCS_VFP (for the second case), but older GCC does not.
+ echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
+ # Look for a reference to the register d0 in the .s file.
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
+ if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
+ gl_cv_host_cpu_c_abi=armhf
+ else
+ gl_cv_host_cpu_c_abi=arm
+ fi
+ rm -f conftest*
+ ])
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=hppa64],
+ [gl_cv_host_cpu_c_abi=hppa])
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=ia64-ilp32],
+ [gl_cv_host_cpu_c_abi=ia64])
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=mips64],
+ [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
+ # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
+ # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (_MIPS_SIM == _ABIN32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=mipsn32],
+ [gl_cv_host_cpu_c_abi=mips])])
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# On powerpc64, there are two ABIs on Linux: The AIX compatible
+ # one and the ELFv2 one. The latter defines _CALL_ELF=2.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _CALL_ELF && _CALL_ELF == 2
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=powerpc64-elfv2],
+ [gl_cv_host_cpu_c_abi=powerpc64])
+ ],
+ [gl_cv_host_cpu_c_abi=powerpc])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi=powerpc
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 2 architectures (with variants): rv32* and rv64*.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if __riscv_xlen == 64
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [cpu=riscv64],
+ [cpu=riscv32])
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [main_abi=lp64],
+ [main_abi=ilp32])
+ # Float ABIs:
+ # __riscv_float_abi_double:
+ # 'float' and 'double' are passed in floating-point registers.
+ # __riscv_float_abi_single:
+ # 'float' are passed in floating-point registers.
+ # __riscv_float_abi_soft:
+ # No values are passed in floating-point registers.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __riscv_float_abi_double
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [float_abi=d],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __riscv_float_abi_single
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [float_abi=f],
+ [float_abi=''])
+ ])
+ gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=s390x],
+ [gl_cv_host_cpu_c_abi=s390])
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi=sparc64],
+ [gl_cv_host_cpu_c_abi=sparc])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi="$host_cpu"
+ ;;
+ esac
+ ])
+
+ dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
+ HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
+ HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
+ AC_SUBST([HOST_CPU])
+ AC_SUBST([HOST_CPU_C_ABI])
+
+ # This was
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
+ # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
+ # earlier, but KAI C++ 3.2d doesn't like this.
+ sed -e 's/-/_/g' >> confdefs.h <<EOF
+#ifndef __${HOST_CPU}__
+#define __${HOST_CPU}__ 1
+#endif
+#ifndef __${HOST_CPU_C_ABI}__
+#define __${HOST_CPU_C_ABI}__ 1
+#endif
+EOF
+ AH_TOP([/* CPU and C ABI indicator */
+#ifndef __i386__
+#undef __i386__
+#endif
+#ifndef __x86_64_x32__
+#undef __x86_64_x32__
+#endif
+#ifndef __x86_64__
+#undef __x86_64__
+#endif
+#ifndef __alpha__
+#undef __alpha__
+#endif
+#ifndef __arm__
+#undef __arm__
+#endif
+#ifndef __armhf__
+#undef __armhf__
+#endif
+#ifndef __arm64_ilp32__
+#undef __arm64_ilp32__
+#endif
+#ifndef __arm64__
+#undef __arm64__
+#endif
+#ifndef __hppa__
+#undef __hppa__
+#endif
+#ifndef __hppa64__
+#undef __hppa64__
+#endif
+#ifndef __ia64_ilp32__
+#undef __ia64_ilp32__
+#endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
+#ifndef __loongarch64__
+#undef __loongarch64__
+#endif
+#ifndef __m68k__
+#undef __m68k__
+#endif
+#ifndef __mips__
+#undef __mips__
+#endif
+#ifndef __mipsn32__
+#undef __mipsn32__
+#endif
+#ifndef __mips64__
+#undef __mips64__
+#endif
+#ifndef __powerpc__
+#undef __powerpc__
+#endif
+#ifndef __powerpc64__
+#undef __powerpc64__
+#endif
+#ifndef __powerpc64_elfv2__
+#undef __powerpc64_elfv2__
+#endif
+#ifndef __riscv32__
+#undef __riscv32__
+#endif
+#ifndef __riscv64__
+#undef __riscv64__
+#endif
+#ifndef __riscv32_ilp32__
+#undef __riscv32_ilp32__
+#endif
+#ifndef __riscv32_ilp32f__
+#undef __riscv32_ilp32f__
+#endif
+#ifndef __riscv32_ilp32d__
+#undef __riscv32_ilp32d__
+#endif
+#ifndef __riscv64_ilp32__
+#undef __riscv64_ilp32__
+#endif
+#ifndef __riscv64_ilp32f__
+#undef __riscv64_ilp32f__
+#endif
+#ifndef __riscv64_ilp32d__
+#undef __riscv64_ilp32d__
+#endif
+#ifndef __riscv64_lp64__
+#undef __riscv64_lp64__
+#endif
+#ifndef __riscv64_lp64f__
+#undef __riscv64_lp64f__
+#endif
+#ifndef __riscv64_lp64d__
+#undef __riscv64_lp64d__
+#endif
+#ifndef __s390__
+#undef __s390__
+#endif
+#ifndef __s390x__
+#undef __s390x__
+#endif
+#ifndef __sh__
+#undef __sh__
+#endif
+#ifndef __sparc__
+#undef __sparc__
+#endif
+#ifndef __sparc64__
+#undef __sparc64__
+#endif
+])
+
+])
+
+
+dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
+dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
+dnl one, or to 'unknown' if unknown.
+dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
+AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
+ [if test -n "$gl_cv_host_cpu_c_abi"; then
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
+ esac
+ else
+ case "$host_cpu" in
+
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh[1234] | sh[1234]e[lb] \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ # CPUs that only support a 64-bit ABI.
+changequote(,)dnl
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
+
+changequote(,)dnl
+ i[34567]86 )
+changequote([,])dnl
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ x86_64 )
+ # On x86_64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
+ # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
+ # with native Windows (mingw, MSVC).
+ # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if (defined __x86_64__ || defined __amd64__ \
+ || defined _M_X64 || defined _M_AMD64) \
+ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ arm* | aarch64 )
+ # Assume arm with EABI.
+ # On arm64 systems, the C compiler may be generating code in one of
+ # these ABIs:
+ # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
+ # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
+ # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
+ # On hppa, the C compiler may be generating 32-bit code or 64-bit
+ # code. In the latter case, it defines _LP64 and __LP64__.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ ia64* )
+ # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
+ # 32-bit code. In the latter case, it defines _ILP32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifdef _ILP32
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=yes],
+ [gl_cv_host_cpu_c_abi_32bit=no])
+ ;;
+
+ mips* )
+ # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
+ # at 32.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ powerpc* )
+ # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
+ # No need to distinguish them here; the caller may distinguish
+ # them based on the OS.
+ # On powerpc64 systems, the C compiler may still be generating
+ # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
+ # be generating 64-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ rs6000 )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+
+ riscv32 | riscv64 )
+ # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
+ # Size of 'long' and 'void *':
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ s390* )
+ # On s390x, the C compiler may be generating 64-bit (= s390x) code
+ # or 31-bit (= s390) code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __LP64__ || defined __s390x__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ sparc | sparc64 )
+ # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
+ # C compiler still generates 32-bit code.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [gl_cv_host_cpu_c_abi_32bit=no],
+ [gl_cv_host_cpu_c_abi_32bit=yes])
+ ;;
+
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ ;;
+ esac
+ fi
+ ])
+
+ HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
+])
diff --git a/po/m4/iconv.m4 b/po/m4/iconv.m4
@@ -0,0 +1,283 @@
+# iconv.m4 serial 24
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-2021 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.64])
+
+dnl Note: AM_ICONV is documented in the GNU gettext manual
+dnl <https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html>.
+dnl Don't make changes that are incompatible with that documentation!
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);]])],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+ ]],
+ [[iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);]])],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
+ dnl Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ am_cv_func_iconv_works=no
+ for ac_iconv_const in '' 'const'; do
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <iconv.h>
+#include <string.h>
+
+#ifndef ICONV_CONST
+# define ICONV_CONST $ac_iconv_const
+#endif
+ ]],
+ [[int result = 0;
+ /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from
+ successful returns. This is even documented in
+ <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 1;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\263";
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_ascii_to_88591);
+ }
+ }
+ /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
+ result |= 4;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ result |= 8;
+ iconv_close (cd_88591_to_utf8);
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ {
+ /* Try standardized names. */
+ iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
+ /* Try IRIX, OSF/1 names. */
+ iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
+ /* Try AIX names. */
+ iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
+ /* Try HP-UX names. */
+ iconv_t cd4 = iconv_open ("utf8", "eucJP");
+ if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
+ && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
+ result |= 16;
+ if (cd1 != (iconv_t)(-1))
+ iconv_close (cd1);
+ if (cd2 != (iconv_t)(-1))
+ iconv_close (cd2);
+ if (cd3 != (iconv_t)(-1))
+ iconv_close (cd3);
+ if (cd4 != (iconv_t)(-1))
+ iconv_close (cd4);
+ }
+ return result;
+]])],
+ [am_cv_func_iconv_works=yes], ,
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ test "$am_cv_func_iconv_works" = no || break
+ done
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE, in order to avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+AC_DEFUN_ONCE([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([whether iconv is compatible with its POSIX signature],
+ [gl_cv_iconv_nonconst],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+ ]],
+ [[]])],
+ [gl_cv_iconv_nonconst=yes],
+ [gl_cv_iconv_nonconst=no])
+ ])
+ else
+ dnl When compiling GNU libiconv on a system that does not have iconv yet,
+ dnl pick the POSIX compliant declaration without 'const'.
+ gl_cv_iconv_nonconst=yes
+ fi
+ if test $gl_cv_iconv_nonconst = yes; then
+ iconv_arg1=""
+ else
+ iconv_arg1="const"
+ fi
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
+ m4_ifdef([gl_ICONV_H_DEFAULTS],
+ [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test $gl_cv_iconv_nonconst != yes; then
+ ICONV_CONST="const"
+ fi
+ ])
+])
diff --git a/po/m4/intlmacosx.m4 b/po/m4/intlmacosx.m4
@@ -0,0 +1,65 @@
+# intlmacosx.m4 serial 8 (gettext-0.20.2)
+dnl Copyright (C) 2004-2014, 2016, 2019-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on Mac OS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in Mac OS X 10.4.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFPreferences.h>]],
+ [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent,
+ dnl because in macOS 10.13.4 it has the following behaviour:
+ dnl When two or more languages are specified in the
+ dnl "System Preferences > Language & Region > Preferred Languages" panel,
+ dnl it returns en_CC where CC is the territory (even when English is not among
+ dnl the preferred languages!). What we want instead is what
+ dnl CFLocaleCopyCurrent returned in earlier macOS releases and what
+ dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the
+ dnl first among the preferred languages and CC is the territory.
+ AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyPreferredLanguages();]])],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
+ [gt_cv_func_CFLocaleCopyPreferredLanguages=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
+ || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/po/m4/lib-ld.m4 b/po/m4/lib-ld.m4
@@ -0,0 +1,168 @@
+# lib-ld.m4 serial 10
+dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
+dnl collision with libtool.m4.
+
+dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes
+ ;;
+*)
+ acl_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-2.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld [default=no]])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+if test -n "$LD"; then
+ AC_MSG_CHECKING([for ld])
+elif test "$GCC" = yes; then
+ AC_MSG_CHECKING([for ld used by $CC])
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+if test -n "$LD"; then
+ # Let the user override the test with a path.
+ :
+else
+ AC_CACHE_VAL([acl_cv_path_LD],
+ [
+ acl_cv_path_LD= # Final result of this test
+ ac_prog=ld # Program to search in $PATH
+ if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $acl_output in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
+ while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
+ acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
+ done
+ # Got the pathname. No search in PATH is needed.
+ acl_cv_path_LD="$acl_output"
+ ac_prog=
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+ fi
+ if test -n "$ac_prog"; then
+ # Search for $ac_prog in $PATH.
+ acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$acl_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_ifs"
+ fi
+ case $host in
+ *-*-aix*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __powerpc64__ || defined __LP64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [# The compiler produces 64-bit code. Add option '-b64' so that the
+ # linker groks 64-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -b64 "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
+ esac
+ ], [])
+ ;;
+ sparc64-*-netbsd*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if defined __sparcv9 || defined __arch64__
+ int ok;
+ #else
+ error fail
+ #endif
+ ]])],
+ [],
+ [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
+ # so that the linker groks 32-bit object files.
+ case "$acl_cv_path_LD " in
+ *" -m elf32_sparc "*) ;;
+ *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
+ esac
+ ])
+ ;;
+ esac
+ ])
+ LD="$acl_cv_path_LD"
+fi
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([no acceptable ld found in \$PATH])
+fi
+AC_LIB_PROG_LD_GNU
+])
diff --git a/po/m4/lib-link.m4 b/po/m4/lib-link.m4
@@ -0,0 +1,813 @@
+# lib-link.m4 serial 33
+dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.61])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+ dnl because these -l options might require -L options that are present in
+ dnl LIBS. -l options benefit only from the -L options listed before it.
+ dnl Otherwise, add it to the front of LIBS, because it may be a static
+ dnl library that depends on another static library that is present in LIBS.
+ dnl Static libraries benefit only from the static libraries listed after
+ dnl it.
+ case " $LIB[]NAME" in
+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+ *) LIBS="$LIB[]NAME $LIBS" ;;
+ esac
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[$3]], [[$4]])],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_libname_spec,
+dnl acl_library_names_spec,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Complain if config.rpath is missing.
+ AC_REQUIRE_AUX_FILE([config.rpath])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+ ])
+ AC_ARG_WITH(PACK[-prefix],
+[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib
+ --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
+ eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ additional_libdir2="$withval/$acl_libdirstem2"
+ additional_libdir3="$withval/$acl_libdirstem3"
+ fi
+ fi
+])
+ if test "X$additional_libdir2" = "X$additional_libdir"; then
+ additional_libdir2=
+ fi
+ if test "X$additional_libdir3" = "X$additional_libdir"; then
+ additional_libdir3=
+ fi
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
+ if test "X$found_dir" = "X"; then
+ eval dir=\$$additional_libdir_variable
+ if test -n "$dir"; then
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ fi
+ done
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem3 | */$acl_libdirstem3/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
+ haveit=
+ if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
+ || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$dependency_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$dependency_libdir"; then
+ dnl Really add $dependency_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ dnl But on GNU systems, ignore -lc options, because
+ dnl - linking with libc is the default anyway,
+ dnl - linking with libc.a may produce an error
+ dnl "/usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie"
+ dnl or may produce an executable that always crashes, see
+ dnl <https://lists.gnu.org/archive/html/grep-devel/2020-09/msg00052.html>.
+ dep=`echo "X$dep" | sed -e 's/^X-l//'`
+ if test "X$dep" != Xc \
+ || case $host_os in
+ linux* | gnu* | k*bsd*-gnu) false ;;
+ *) true ;;
+ esac; then
+ names_next_round="$names_next_round $dep"
+ fi
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dir" != "X/usr/$acl_libdirstem3"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2" \
+ && test "X$dir" != "X/usr/$acl_libdirstem3"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/po/m4/lib-prefix.m4 b/po/m4/lib-prefix.m4
@@ -0,0 +1,323 @@
+# lib-prefix.m4 serial 20
+dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH([lib-prefix],
+[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a function acl_is_expected_elfclass, that tests whether standard input
+dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI,
+dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing
+dnl the basename of the libdir to try in turn, either "lib" or "lib64" or
+dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar.
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib, lib32, and lib64.
+ dnl On most glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on
+ dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go
+ dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib.
+ dnl We determine the compiler's default mode by looking at the compiler's
+ dnl library search path. If at least one of its elements ends in /lib64 or
+ dnl points to a directory whose absolute pathname ends in /lib64, we use that
+ dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
+ dnl namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
+
+ AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
+ [AC_EGREP_CPP([Extensible Linking Format],
+ [#if defined __ELF__ || (defined __linux__ && defined __EDG__)
+ Extensible Linking Format
+ #endif
+ ],
+ [gl_cv_elf=yes],
+ [gl_cv_elf=no])
+ ])
+ if test $gl_cv_elf = yes; then
+ # Extract the ELF class of a file (5th byte) in decimal.
+ # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
+ if od -A x < /dev/null >/dev/null 2>/dev/null; then
+ # Use POSIX od.
+ func_elfclass ()
+ {
+ od -A n -t d1 -j 4 -N 1
+ }
+ else
+ # Use BSD hexdump.
+ func_elfclass ()
+ {
+ dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
+ echo
+ }
+ fi
+ # Use 'expr', not 'test', to compare the values of func_elfclass, because on
+ # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002,
+ # not 1 or 2.
+changequote(,)dnl
+ case $HOST_CPU_C_ABI_32BIT in
+ yes)
+ # 32-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null
+ }
+ ;;
+ no)
+ # 64-bit ABI.
+ acl_is_expected_elfclass ()
+ {
+ expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null
+ }
+ ;;
+ *)
+ # Unknown.
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ ;;
+ esac
+changequote([,])dnl
+ else
+ acl_is_expected_elfclass ()
+ {
+ :
+ }
+ fi
+
+ dnl Allow the user to override the result by setting acl_cv_libdirstems.
+ AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
+ [acl_cv_libdirstems],
+ [dnl Try 'lib' first, because that's the default for libdir in GNU, see
+ dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ acl_libdirstem3=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ acl_libdirstem2=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem3=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ dnl If $CC generates code for a 32-bit ABI, the libraries are
+ dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
+ dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
+ dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
+ dnl Find the compiler's search path. However, non-system compilers
+ dnl sometimes have odd library search paths. But we can't simply invoke
+ dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
+ dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
+ searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
+ | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ # 32-bit or unknown ABI.
+ if test -d /usr/lib32; then
+ acl_libdirstem2=lib32
+ fi
+ fi
+ if test $HOST_CPU_C_ABI_32BIT != yes; then
+ # 64-bit or unknown ABI.
+ if test -d /usr/lib64; then
+ acl_libdirstem3=lib64
+ fi
+ fi
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib32 ) acl_libdirstem2=lib32 ;;
+ */lib64 ) acl_libdirstem3=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ if test $HOST_CPU_C_ABI_32BIT = yes; then
+ # 32-bit ABI.
+ acl_libdirstem3=
+ fi
+ if test $HOST_CPU_C_ABI_32BIT = no; then
+ # 64-bit ABI.
+ acl_libdirstem2=
+ fi
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+ test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
+ acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
+ ])
+ dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
+ dnl acl_libdirstem3.
+changequote(,)dnl
+ acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
+ acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
+ acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
+changequote([,])dnl
+])
diff --git a/po/m4/nls.m4 b/po/m4/nls.m4
@@ -0,0 +1,32 @@
+# nls.m4 serial 6 (gettext-0.20.2)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2021 Free
+dnl Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
diff --git a/po/m4/po.m4 b/po/m4/po.m4
@@ -0,0 +1,454 @@
+# po.m4 serial 32 (gettext-0.21.1)
+dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.60])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+ AC_REQUIRE([AC_PROG_SED])dnl
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.20])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Test whether it is GNU msgmerge >= 0.20.
+ if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt'
+ else
+ dnl Test whether it is GNU msgmerge >= 0.12.
+ if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet'
+ else
+ dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is
+ dnl slow. But this is not a big problem, as such old gettext versions are
+ dnl hardly in use any more.
+ MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet'
+ fi
+ fi
+ AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ gt_tab=`printf '\t'`
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
+ useit=yes
+ ;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS.
+ OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS"
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ tab=`printf '\t'`
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
+ # Seen the first line of the variable definition.
+ s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
+ useit=yes
+ ;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ tab=`printf '\t'`
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/po/m4/progtest.m4 b/po/m4/progtest.m4
@@ -0,0 +1,91 @@
+# progtest.m4 serial 9 (gettext-0.21.1)
+dnl Copyright (C) 1996-2003, 2005, 2008-2021 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Lesser General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Lesser General Public License, and the rest of the GNU
+dnl gettext package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ([2.53])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
+ # contains only /bin. Note that ksh looks also at the FPATH variable,
+ # so we have to set that as well for the test.
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
+ || PATH_SEPARATOR=';'
+ }
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in m4_if([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+m4_if([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test m4_if([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$][$1])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
diff --git a/po/po-configure.ac.in b/po/po-configure.ac.in
@@ -0,0 +1,51 @@
+AC_INIT([@PACKAGE_NAME@],[@PACKAGE_VERSION@],[@PACKAGE_BUGREPORT@])
+CONFIG_STATUS='./po-config.status'
+
+AC_CONFIG_AUX_DIR([@MHD_AUX_DIR@])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_PRESERVE_HELP_ORDER
+
+AC_MSG_NOTICE([
+This special $as_me is designed to be run only internally as part of distribution tarball building process.
+The only purpose of the $as_me is a preparation of the files to update ${PACKAGE_TARNAME}.pot
+
+$as_me is not meant to be started by the user and is not needed to build ${PACKAGE_NAME} library.
+])
+AC_MSG_NOTICE([Check src/examples/msgs_i18n.c for inspiration how to use ${PACKAGE_TARNAME}.pot])
+
+AM_PROG_INSTALL_SH
+AC_PROG_MKDIR_P
+
+AS_VAR_SET_IF([enable_nls], [], [[enable_nls=no]])
+AM_GNU_GETTEXT([external],[need-ngettext])
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.18])
+
+m4_divert_text([HELP_VAR_END], [[
+###############################################################################
+This special po-configure is designed to be run only internally as part of
+distribution tarball building process.
+The only purpose of the po-configure is a preparation of the files to update
+@PACKAGE_TARNAME@.pot
+
+po-configure is not meant to be started by the user and is not needed to build
+@PACKAGE_NAME@ library.
+###############################################################################
+]])
+
+# Hacks for libmicrohttpd
+AC_CONFIG_FILES([po/stamp-m],[echo 'timestamp' > po/stamp-m])
+AC_SUBST([POMAKEFILEDEPS],["POTFILES.in stamp-m"])
+AM_SUBST_NOTMAKE([POMAKEFILEDEPS])
+AC_SUBST([MHD_CONFIG_SHELL],["${CONFIG_SHELL}"])
+AC_SUBST([MHD_AUX_DIR],['@MHD_AUX_DIR@'])
+
+AC_CONFIG_FILES([po/Makefile.in])
+AS_IF([test -z "${XGETTEXT}" || test "x${XGETTEXT}" = "x:"], [AC_MSG_ERROR([Cannot find xgettext. xgettext is required to update distribution tarball files.])])
+AC_SUBST([PACKAGE],["${PACKAGE_TARNAME}"])
+AC_SUBST([VERSION],["${PACKAGE_VERSION}"])
+AC_SUBST([CROSS_COMPILING],["${cross_compiling}"])
+AC_SUBST([MKDIR_P])
+AC_SUBST([mkdir_p],['$(MKDIR_P)'])
+
+AC_OUTPUT
diff --git a/po/quot.sed b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
@@ -0,0 +1,25 @@
+# Sed script that removes the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/stamp-po b/po/stamp-po
@@ -0,0 +1 @@
+timestamp
diff --git a/src/.gitignore b/src/.gitignore
@@ -0,0 +1,7 @@
+*.exe
+*.o
+*.lo
+*.la
+*.log
+*.trs
+*.exe.manifest
diff --git a/src/Makefile.am b/src/Makefile.am
@@ -0,0 +1,9 @@
+# This Makefile.am is in the public domain
+
+SUBDIRS = include .
+
+EXTRA_DIST = \
+ datadir/cert-and-key.pem \
+ datadir/cert-and-key-for-wireshark.pem
+
+.NOTPARALLEL:
diff --git a/src/datadir/cert-and-key-for-wireshark.pem b/src/datadir/cert-and-key-for-wireshark.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCff7amw9zNSE+h
+rOMhBrzbbsJluUP3gmd8nOKY5MUimoPkxmAXfp2L0il+MPZT/ZEmo11q0k6J2jfG
+UBQ+oZW9ahNZ9gCDjbYlBblo/mqTai+LdeLO3qk53d0zrZKXvCO6sA3uKpG2WR+g
++sNKxfYpIHCpanqBU6O+degIV/+WKy3nQ2Fwp7K5HUNj1u0pg0QQ18yf68LTnKFU
+HFjZmmaaopWki5wKSBieHivzQy6w+04HSTogHHRK/y/UcoJNSG7xnHmoPPo1vLT8
+CMRIYnSSgU3wJ43XBJ80WxrC2dcoZjV2XZz+XdQwCD4ZrC1ihykcAmiQA+sauNm7
+dztOMkGzAgMBAAECggEAIbKDzlvXDG/YkxnJqrKXt+yAmak4mNQuNP+YSCEdHSBz
++SOILa6MbnvqVETX5grOXdFp7SWdfjZiTj2g6VKOJkSA7iKxHRoVf2DkOTB3J8np
+XZd8YaRdMGKVV1O2guQ20Dxd1RGdU18k9YfFNsj4Jtw5sTFTzHr1P0n9ybV9xCXp
+znSxVfRg8U6TcMHoRDJR9EMKQMO4W3OQEmreEPoGt2/+kMuiHjclxLtbwDxKXTLP
+pD0gdg3ibvlufk/ccKl/yAglDmd0dfW22oS7NgvRKUve7tzDxY1Q6O5v8BCnLFSW
+D+z4hS1PzooYRXRkM0xYudvPkryPyu+1kEpw3fNsoQKBgQDRfXJo82XQvlX8WPdZ
+Ts3PfBKKMVu3Wf8J3SYpuvYT816qR3ot6e4Ivv5ZCQkdDwzzBKe2jAv6JddMJIhx
+pkGHc0KKOodd9HoBewOd8Td++hapJAGaGblhL5beIidLKjXDjLqtgoHRGlv5Cojo
+zHa7Viel1eOPPcBumhp83oJ+mQKBgQDC6PmdETZdrW3QPm7ZXxRzF1vvpC55wmPg
+pRfTRM059jzRzAk0QiBgVp3yk2a6Ob3mB2MLfQVDgzGf37h2oO07s5nspSFZTFnM
+KgSjFy0xVOAVDLe+0VpbmLp1YUTYvdCNowaoTE7++5rpePUDu3BjAifx07/yaSB+
+W+YPOfOuKwKBgQCGK6g5G5qcJSuBIaHZ6yTZvIdLRu2M8vDral5k3793a6m3uWvB
+OFAh/eF9ONJDcD5E7zhTLEMHhXDs7YEN+QODMwjs6yuDu27gv97DK5j1lEsrLUpx
+XgRjAE3KG2m7NF+WzO1K74khWZaKXHrvTvTEaxudlO3X8h7rN3u7ee9uEQKBgQC2
+wI1zeTUZhsiFTlTPWfgppchdHPs6zUqq0wFQ5Zzr8Pa72+zxY+NJkU2NqinTCNsG
+ePykQ/gQgk2gUrt595AYv2De40IuoYk9BlTMuql0LNniwsbykwd/BOgnsSlFdEy8
+0RQn70zOhgmNSg2qDzDklJvxghLi7zE5aV9//V1/ewKBgFRHHZN1a8q/v8AAOeoB
+ROuXfgDDpxNNUKbzLL5MO5odgZGi61PBZlxffrSOqyZoJkzawXycNtoBP47tcVzT
+QPq5ZOB3kjHTcN7dRLmPWjji9h4O3eHCX67XaPVMSWiMuNtOZIg2an06+jxGFhLE
+qdJNJ1DkyUc9dN2cliX4R+rG
+-----END PRIVATE KEY-----
diff --git a/src/datadir/cert-and-key.pem b/src/datadir/cert-and-key.pem
@@ -0,0 +1,59 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCff7amw9zNSE+h
+rOMhBrzbbsJluUP3gmd8nOKY5MUimoPkxmAXfp2L0il+MPZT/ZEmo11q0k6J2jfG
+UBQ+oZW9ahNZ9gCDjbYlBblo/mqTai+LdeLO3qk53d0zrZKXvCO6sA3uKpG2WR+g
++sNKxfYpIHCpanqBU6O+degIV/+WKy3nQ2Fwp7K5HUNj1u0pg0QQ18yf68LTnKFU
+HFjZmmaaopWki5wKSBieHivzQy6w+04HSTogHHRK/y/UcoJNSG7xnHmoPPo1vLT8
+CMRIYnSSgU3wJ43XBJ80WxrC2dcoZjV2XZz+XdQwCD4ZrC1ihykcAmiQA+sauNm7
+dztOMkGzAgMBAAECggEAIbKDzlvXDG/YkxnJqrKXt+yAmak4mNQuNP+YSCEdHSBz
++SOILa6MbnvqVETX5grOXdFp7SWdfjZiTj2g6VKOJkSA7iKxHRoVf2DkOTB3J8np
+XZd8YaRdMGKVV1O2guQ20Dxd1RGdU18k9YfFNsj4Jtw5sTFTzHr1P0n9ybV9xCXp
+znSxVfRg8U6TcMHoRDJR9EMKQMO4W3OQEmreEPoGt2/+kMuiHjclxLtbwDxKXTLP
+pD0gdg3ibvlufk/ccKl/yAglDmd0dfW22oS7NgvRKUve7tzDxY1Q6O5v8BCnLFSW
+D+z4hS1PzooYRXRkM0xYudvPkryPyu+1kEpw3fNsoQKBgQDRfXJo82XQvlX8WPdZ
+Ts3PfBKKMVu3Wf8J3SYpuvYT816qR3ot6e4Ivv5ZCQkdDwzzBKe2jAv6JddMJIhx
+pkGHc0KKOodd9HoBewOd8Td++hapJAGaGblhL5beIidLKjXDjLqtgoHRGlv5Cojo
+zHa7Viel1eOPPcBumhp83oJ+mQKBgQDC6PmdETZdrW3QPm7ZXxRzF1vvpC55wmPg
+pRfTRM059jzRzAk0QiBgVp3yk2a6Ob3mB2MLfQVDgzGf37h2oO07s5nspSFZTFnM
+KgSjFy0xVOAVDLe+0VpbmLp1YUTYvdCNowaoTE7++5rpePUDu3BjAifx07/yaSB+
+W+YPOfOuKwKBgQCGK6g5G5qcJSuBIaHZ6yTZvIdLRu2M8vDral5k3793a6m3uWvB
+OFAh/eF9ONJDcD5E7zhTLEMHhXDs7YEN+QODMwjs6yuDu27gv97DK5j1lEsrLUpx
+XgRjAE3KG2m7NF+WzO1K74khWZaKXHrvTvTEaxudlO3X8h7rN3u7ee9uEQKBgQC2
+wI1zeTUZhsiFTlTPWfgppchdHPs6zUqq0wFQ5Zzr8Pa72+zxY+NJkU2NqinTCNsG
+ePykQ/gQgk2gUrt595AYv2De40IuoYk9BlTMuql0LNniwsbykwd/BOgnsSlFdEy8
+0RQn70zOhgmNSg2qDzDklJvxghLi7zE5aV9//V1/ewKBgFRHHZN1a8q/v8AAOeoB
+ROuXfgDDpxNNUKbzLL5MO5odgZGi61PBZlxffrSOqyZoJkzawXycNtoBP47tcVzT
+QPq5ZOB3kjHTcN7dRLmPWjji9h4O3eHCX67XaPVMSWiMuNtOZIg2an06+jxGFhLE
+qdJNJ1DkyUc9dN2cliX4R+rG
+-----END PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIIFSzCCAzOgAwIBAgIBBDANBgkqhkiG9w0BAQsFADCBgTELMAkGA1UEBhMCUlUx
+DzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwGTW9zY293MRswGQYDVQQKDBJ0ZXN0
+LWxpYm1pY3JvaHR0cGQxITAfBgkqhkiG9w0BCQEWEm5vYm9keUBleGFtcGxlLm9y
+ZzEQMA4GA1UEAwwHdGVzdC1DQTAgFw0yMjA0MjAxODQzMDJaGA8yMTIyMDMyNjE4
+NDMwMlowZTELMAkGA1UEBhMCUlUxDzANBgNVBAgMBk1vc2NvdzEPMA0GA1UEBwwG
+TW9zY293MRswGQYDVQQKDBJ0ZXN0LWxpYm1pY3JvaHR0cGQxFzAVBgNVBAMMDnRl
+c3QtbWhkc2VydmVyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn3+2
+psPczUhPoazjIQa8227CZblD94JnfJzimOTFIpqD5MZgF36di9IpfjD2U/2RJqNd
+atJOido3xlAUPqGVvWoTWfYAg422JQW5aP5qk2ovi3Xizt6pOd3dM62Sl7wjurAN
+7iqRtlkfoPrDSsX2KSBwqWp6gVOjvnXoCFf/list50NhcKeyuR1DY9btKYNEENfM
+n+vC05yhVBxY2ZpmmqKVpIucCkgYnh4r80MusPtOB0k6IBx0Sv8v1HKCTUhu8Zx5
+qDz6Nby0/AjESGJ0koFN8CeN1wSfNFsawtnXKGY1dl2c/l3UMAg+GawtYocpHAJo
+kAPrGrjZu3c7TjJBswIDAQABo4HmMIHjMAsGA1UdDwQEAwIFoDAMBgNVHRMBAf8E
+AjAAMBYGA1UdJQEB/wQMMAoGCCsGAQUFBwMBMDEGA1UdEQQqMCiCDnRlc3QtbWhk
+c2VydmVyhwR/AAABhxAAAAAAAAAAAAAAAAAAAAABMB0GA1UdDgQWBBQ57Z06WJae
+8fJIHId4QGx/HsRgDDAoBglghkgBhvhCAQ0EGxYZVGVzdCBsaWJtaWNyb2h0dHBk
+IHNlcnZlcjARBglghkgBhvhCAQEEBAMCBkAwHwYDVR0jBBgwFoAUWHVDwKVqMcOF
+Nd0arI3/QB3W6SwwDQYJKoZIhvcNAQELBQADggIBAI7Lggm/XzpugV93H5+KV48x
+X+Ct8unNmPCSzCaI5hAHGeBBJpvD0KME5oiJ5p2wfCtK5Dt9zzf0S0xYdRKqU8+N
+aKIvPoU1hFixXLwTte1qOp6TviGvA9Xn2Fc4n36dLt6e9aiqDnqPbJgBwcVO82ll
+HJxVr3WbrAcQTB3irFUMqgAke/Cva9Bw79VZgX4ghb5EnejDzuyup4pHGzV10Myv
+hdg+VWZbAxpCe0S4eKmstZC7mWsFCLeoRTf/9Pk1kQ6+azbTuV/9QOBNfFi8QNyb
+18jUjmm8sc2HKo8miCGqb2sFqaGD918hfkWmR+fFkzQ3DZQrT+eYbKq2un3k0pMy
+UySy8SRn1eadfab+GwBVb68I9TrPRMrJsIzysNXMX4iKYl2fFE/RSNnaHtPw0C8y
+B7memyxPRl+H2xg6UjpoKYh3+8e44/XKm0rNIzXjrwA8f8gnw2TbqmMDkj1YqGnC
+SCj5A27zUzaf2pT/YsnQXIWOJjVvbEI+YKj34wKWyTrXA093y8YI8T3mal7Kr9YM
+WiIyPts0/aVeziM0Gunglz+8Rj1VesL52FTurobqusPgM/AME82+qb/qnxuPaCKj
+OT1qAbIblaRuWqCsid8BzP7ZQiAnAWgMRSUg1gzDwSwRhrYQRRWAyn/Qipzec+27
+/w0gW9EVWzFhsFeGEssi
+-----END CERTIFICATE-----
diff --git a/src/incl_priv/.gitignore b/src/incl_priv/.gitignore
@@ -0,0 +1,2 @@
+/mhd_config.h
+/mhd_config.h.in
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
@@ -0,0 +1,4 @@
+# This Makefile.am is in the public domain
+SUBDIRS = .
+
+include_HEADERS = microhttpd2.h
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
diff --git a/w32/.editorconfig b/w32/.editorconfig
@@ -0,0 +1,87 @@
+# Do not check parent dirs for .editorconfig
+root = true
+
+[Makefile{,.in,.am}]
+indent_style = tab
+charset = latin1
+insert_final_newline = true
+
+[*.{c,h}]
+indent_style = space
+charset = utf-8
+insert_final_newline = true
+indent_size = 2
+tab_width = 4
+trim_trailing_whitespace = true
+max_line_length = 80
+
+# Visual C++ Code Style settings
+
+cpp_generate_documentation_comments = doxygen_slash_star
+
+# Visual C++ Formatting settings
+
+cpp_indent_braces = false
+cpp_indent_multi_line_relative_to = innermost_parenthesis
+cpp_indent_within_parentheses = align_to_parenthesis
+cpp_indent_preserve_within_parentheses = true
+cpp_indent_case_contents = true
+cpp_indent_case_labels = false
+cpp_indent_case_contents_when_block = true
+cpp_indent_lambda_braces_when_parameter = true
+cpp_indent_goto_labels = leftmost_column
+cpp_indent_preprocessor = leftmost_column
+cpp_indent_access_specifiers = false
+cpp_indent_namespace_contents = false
+cpp_indent_preserve_comments = true
+cpp_new_line_before_open_brace_namespace = new_line
+cpp_new_line_before_open_brace_type = new_line
+cpp_new_line_before_open_brace_function = new_line
+cpp_new_line_before_open_brace_block = new_line
+cpp_new_line_before_open_brace_lambda = ignore
+cpp_new_line_scope_braces_on_separate_lines = true
+cpp_new_line_close_brace_same_line_empty_type = false
+cpp_new_line_close_brace_same_line_empty_function = false
+cpp_new_line_before_catch = false
+cpp_new_line_before_else = true
+cpp_new_line_before_while_in_do_while = false
+cpp_space_before_function_open_parenthesis = insert
+cpp_space_within_parameter_list_parentheses = false
+cpp_space_between_empty_parameter_list_parentheses = false
+cpp_space_after_keywords_in_control_flow_statements = true
+cpp_space_within_control_flow_statement_parentheses = false
+cpp_space_before_lambda_open_parenthesis = false
+cpp_space_within_cast_parentheses = false
+cpp_space_after_cast_close_parenthesis = true
+cpp_space_within_expression_parentheses = false
+cpp_space_before_block_open_brace = false
+cpp_space_between_empty_braces = false
+cpp_space_before_initializer_list_open_brace = true
+cpp_space_within_initializer_list_braces = false
+cpp_space_preserve_in_initializer_list = true
+cpp_space_before_open_square_bracket = false
+cpp_space_within_square_brackets = false
+cpp_space_before_empty_square_brackets = false
+cpp_space_between_empty_square_brackets = false
+cpp_space_group_square_brackets = true
+cpp_space_within_lambda_brackets = false
+cpp_space_between_empty_lambda_brackets = false
+cpp_space_before_comma = false
+cpp_space_after_comma = true
+cpp_space_remove_around_member_operators = true
+cpp_space_before_inheritance_colon = true
+cpp_space_before_constructor_colon = true
+cpp_space_remove_before_semicolon = true
+cpp_space_after_semicolon = true
+cpp_space_remove_around_unary_operator = false
+cpp_space_around_binary_operator = insert
+cpp_space_around_assignment_operator = insert
+cpp_space_pointer_reference_alignment = right
+cpp_space_around_ternary_operator = insert
+cpp_use_unreal_engine_macro_formatting = false
+cpp_wrap_preserve_blocks = never
+
+# Visual C++ Inlcude Cleanup settings
+
+cpp_include_cleanup_add_missing_error_tag_type = suggestion
+cpp_include_cleanup_remove_unused_error_tag_type = dimmed
diff --git a/w32/.gitignore b/w32/.gitignore
@@ -0,0 +1,14 @@
+*.suo
+*.sdf
+*.opensdf
+*.vcxproj.user
+*.obj
+*.lib
+*.dll
+*.pdb
+*.log
+*.tlog
+*.idb
+*.rc
+*.VC.db
+.vs
diff --git a/w32/VS-Any-Version/.gitignore b/w32/VS-Any-Version/.gitignore
@@ -0,0 +1,7 @@
+/Output
+/libmicrohttpd
+/hellobrowser
+/largepost
+/simplepost
+/perf_replies
+/.vs
diff --git a/w32/VS-Any-Version/hellobrowser.vcxproj b/w32/VS-Any-Version/hellobrowser.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{310F39BD-A2D6-44FF-8344-37ADD0524CBD}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>hellobrowser</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS-Any-Version/hellobrowser.vcxproj.filters b/w32/VS-Any-Version/hellobrowser.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS-Any-Version/largepost.vcxproj b/w32/VS-Any-Version/largepost.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)largepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{77A27E6D-9A39-40B8-961B-40E63DB7FA65}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>largepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS-Any-Version/libmicrohttpd.sln b/w32/VS-Any-Version/libmicrohttpd.sln
@@ -0,0 +1,210 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+MinimumVisualStudioVersion = 10.0.40219.1
+
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobrowser", "hellobrowser.vcxproj", "{310F39BD-A2D6-44FF-8344-37ADD0524CBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmicrohttpd", "libmicrohttpd.vcxproj", "{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplepost", "simplepost.vcxproj", "{294D5317-E983-4682-8DB5-678EA4645E11}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largepost", "largepost.vcxproj", "{77A27E6D-9A39-40B8-961B-40E63DB7FA65}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_replies", "perf_replies.vcxproj", "{0192C6B5-D870-4857-B673-471E3EBD41D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug-dll|Win32 = Debug-dll|Win32
+ Debug-dll|x64 = Debug-dll|x64
+ Debug-dll|ARM = Debug-dll|ARM
+ Debug-dll|ARM64 = Debug-dll|ARM64
+ Debug-static|Win32 = Debug-static|Win32
+ Debug-static|x64 = Debug-static|x64
+ Debug-static|ARM = Debug-static|ARM
+ Debug-static|ARM64 = Debug-static|ARM64
+ Release-dll|Win32 = Release-dll|Win32
+ Release-dll|x64 = Release-dll|x64
+ Release-dll|ARM = Release-dll|ARM
+ Release-dll|ARM64 = Release-dll|ARM64
+ Release-static|Win32 = Release-static|Win32
+ Release-static|x64 = Release-static|x64
+ Release-static|ARM = Release-static|ARM
+ Release-static|ARM64 = Release-static|ARM64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.Build.0 = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.Build.0 = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.Build.0 = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.ActiveCfg = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.Build.0 = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/w32/VS-Any-Version/libmicrohttpd.vcxproj b/w32/VS-Any-Version/libmicrohttpd.vcxproj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmicrohttpd</RootNamespace>
+ <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType Condition="$(Configuration.EndsWith('-static'))">StaticLibrary</ConfigurationType>
+ <ConfigurationType Condition="! $(Configuration.EndsWith('-static'))">DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <Lib />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS-Any-Version/libmicrohttpd.vcxproj.filters b/w32/VS-Any-Version/libmicrohttpd.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS-Any-Version/perf_replies.vcxproj b/w32/VS-Any-Version/perf_replies.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <PropertyGroup Label="Globals">
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{0192c6b5-d870-4857-b673-471e3ebd41d4}</ProjectGuid>
+ <RootNamespace>perf_replies</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(MhdW32Common)perf_replies-files.vcxproj" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS-Any-Version/perf_replies.vcxproj.filters b/w32/VS-Any-Version/perf_replies.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)perf_replies-filters.vcxproj" />
+</Project>
diff --git a/w32/VS-Any-Version/simplepost.vcxproj b/w32/VS-Any-Version/simplepost.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)simplepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{294D5317-E983-4682-8DB5-678EA4645E11}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>simplepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/.gitignore b/w32/VS2013/.gitignore
@@ -0,0 +1,6 @@
+/Output
+/libmicrohttpd
+/hellobrowser
+/largepost
+/simplepost
+/perf_replies
diff --git a/w32/VS2013/hellobrowser.vcxproj b/w32/VS2013/hellobrowser.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{310F39BD-A2D6-44FF-8344-37ADD0524CBD}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>hellobrowser</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/hellobrowser.vcxproj.filters b/w32/VS2013/hellobrowser.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/largepost.vcxproj b/w32/VS2013/largepost.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)largepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{77A27E6D-9A39-40B8-961B-40E63DB7FA65}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>largepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/libmicrohttpd.sln b/w32/VS2013/libmicrohttpd.sln
@@ -0,0 +1,380 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobrowser", "hellobrowser.vcxproj", "{310F39BD-A2D6-44FF-8344-37ADD0524CBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmicrohttpd", "libmicrohttpd.vcxproj", "{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplepost", "simplepost.vcxproj", "{294D5317-E983-4682-8DB5-678EA4645E11}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largepost", "largepost.vcxproj", "{77A27E6D-9A39-40B8-961B-40E63DB7FA65}"
+ 77ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_replies", "perf_replies.vcxproj", "{0192C6B5-D870-4857-B673-471E3EBD41D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug-dll|x64 = Debug-dll|x64
+ Debug-dll|Win32 = Debug-dll|Win32
+ Debug-dll|ARM64 = Debug-dll|ARM64
+ Debug-dll|ARM = Debug-dll|ARM
+ Debug-dll-xp|x64 = Debug-dll-xp|x64
+ Debug-dll-xp|Win32 = Debug-dll-xp|Win32
+ Debug-dll-xp|ARM64 = Debug-dll-xp|ARM64
+ Debug-dll-xp|ARM = Debug-dll-xp|ARM
+ Debug-static|x64 = Debug-static|x64
+ Debug-static|Win32 = Debug-static|Win32
+ Debug-static|ARM64 = Debug-static|ARM64
+ Debug-static|ARM = Debug-static|ARM
+ Debug-static-xp|x64 = Debug-static-xp|x64
+ Debug-static-xp|Win32 = Debug-static-xp|Win32
+ Debug-static-xp|ARM64 = Debug-static-xp|ARM64
+ Debug-static-xp|ARM = Debug-static-xp|ARM
+ Release-dll|x64 = Release-dll|x64
+ Release-dll|Win32 = Release-dll|Win32
+ Release-dll|ARM64 = Release-dll|ARM64
+ Release-dll|ARM = Release-dll|ARM
+ Release-dll-xp|x64 = Release-dll-xp|x64
+ Release-dll-xp|Win32 = Release-dll-xp|Win32
+ Release-dll-xp|ARM64 = Release-dll-xp|ARM64
+ Release-dll-xp|ARM = Release-dll-xp|ARM
+ Release-static|x64 = Release-static|x64
+ Release-static|Win32 = Release-static|Win32
+ Release-static|ARM64 = Release-static|ARM64
+ Release-static|ARM = Release-static|ARM
+ Release-static-xp|x64 = Release-static-xp|x64
+ Release-static-xp|Win32 = Release-static-xp|Win32
+ Release-static-xp|ARM64 = Release-static-xp|ARM64
+ Release-static-xp|ARM = Release-static-xp|ARM
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|x64.ActiveCfg = Debug-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|x64.Build.0 = Debug-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|Win32.Build.0 = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|ARM64.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|ARM.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.Build.0 = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|x64.ActiveCfg = Debug-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|x64.Build.0 = Debug-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|Win32.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|Win32.Build.0 = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|ARM64.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|ARM.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.Build.0 = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|x64.ActiveCfg = Release-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|x64.Build.0 = Release-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|Win32.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|Win32.Build.0 = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|ARM64.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|ARM.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.ActiveCfg = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.Build.0 = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.Build.0 = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|x64.ActiveCfg = Release-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|x64.Build.0 = Release-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|Win32.ActiveCfg = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|Win32.Build.0 = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|ARM64.ActiveCfg = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|ARM.ActiveCfg = Release-static-xp|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/w32/VS2013/libmicrohttpd.vcxproj b/w32/VS2013/libmicrohttpd.vcxproj
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)project-configs-xp.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmicrohttpd</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static-xp'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll-xp'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static-xp'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll-xp'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120_xp</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <Lib />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/libmicrohttpd.vcxproj.filters b/w32/VS2013/libmicrohttpd.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/perf_replies.vcxproj b/w32/VS2013/perf_replies.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <PropertyGroup Label="Globals">
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{0192c6b5-d870-4857-b673-471e3ebd41d4}</ProjectGuid>
+ <RootNamespace>perf_replies</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(MhdW32Common)perf_replies-files.vcxproj" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2013/perf_replies.vcxproj.filters b/w32/VS2013/perf_replies.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)perf_replies-filters.vcxproj" />
+</Project>
diff --git a/w32/VS2013/simplepost.vcxproj b/w32/VS2013/simplepost.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)simplepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{294D5317-E983-4682-8DB5-678EA4645E11}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>simplepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v120</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/.gitignore b/w32/VS2015/.gitignore
@@ -0,0 +1,8 @@
+/Output
+/libmicrohttpd
+/hellobrowser
+/largepost
+/simplepost
+/perf_replies
+/*.VC.db
+/*.VC.opendb
diff --git a/w32/VS2015/hellobrowser.vcxproj b/w32/VS2015/hellobrowser.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{310F39BD-A2D6-44FF-8344-37ADD0524CBD}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>hellobrowser</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/hellobrowser.vcxproj.filters b/w32/VS2015/hellobrowser.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/largepost.vcxproj b/w32/VS2015/largepost.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)largepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{77A27E6D-9A39-40B8-961B-40E63DB7FA65}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>largepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/libmicrohttpd.sln b/w32/VS2015/libmicrohttpd.sln
@@ -0,0 +1,380 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobrowser", "hellobrowser.vcxproj", "{310F39BD-A2D6-44FF-8344-37ADD0524CBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmicrohttpd", "libmicrohttpd.vcxproj", "{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplepost", "simplepost.vcxproj", "{294D5317-E983-4682-8DB5-678EA4645E11}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largepost", "largepost.vcxproj", "{77A27E6D-9A39-40B8-961B-40E63DB7FA65}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_replies", "perf_replies.vcxproj", "{0192C6B5-D870-4857-B673-471E3EBD41D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug-dll|x64 = Debug-dll|x64
+ Debug-dll|Win32 = Debug-dll|Win32
+ Debug-dll|ARM64 = Debug-dll|ARM64
+ Debug-dll|ARM = Debug-dll|ARM
+ Debug-dll-xp|x64 = Debug-dll-xp|x64
+ Debug-dll-xp|Win32 = Debug-dll-xp|Win32
+ Debug-dll-xp|ARM64 = Debug-dll-xp|ARM64
+ Debug-dll-xp|ARM = Debug-dll-xp|ARM
+ Debug-static|x64 = Debug-static|x64
+ Debug-static|Win32 = Debug-static|Win32
+ Debug-static|ARM64 = Debug-static|ARM64
+ Debug-static|ARM = Debug-static|ARM
+ Debug-static-xp|x64 = Debug-static-xp|x64
+ Debug-static-xp|Win32 = Debug-static-xp|Win32
+ Debug-static-xp|ARM64 = Debug-static-xp|ARM64
+ Debug-static-xp|ARM = Debug-static-xp|ARM
+ Release-dll|x64 = Release-dll|x64
+ Release-dll|Win32 = Release-dll|Win32
+ Release-dll|ARM64 = Release-dll|ARM64
+ Release-dll|ARM = Release-dll|ARM
+ Release-dll-xp|x64 = Release-dll-xp|x64
+ Release-dll-xp|Win32 = Release-dll-xp|Win32
+ Release-dll-xp|ARM64 = Release-dll-xp|ARM64
+ Release-dll-xp|ARM = Release-dll-xp|ARM
+ Release-static|x64 = Release-static|x64
+ Release-static|Win32 = Release-static|Win32
+ Release-static|ARM64 = Release-static|ARM64
+ Release-static|ARM = Release-static|ARM
+ Release-static-xp|x64 = Release-static-xp|x64
+ Release-static-xp|Win32 = Release-static-xp|Win32
+ Release-static-xp|ARM64 = Release-static-xp|ARM64
+ Release-static-xp|ARM = Release-static-xp|ARM
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|x64.ActiveCfg = Debug-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|x64.Build.0 = Debug-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|Win32.Build.0 = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|ARM64.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|ARM.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.Build.0 = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|x64.ActiveCfg = Debug-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|x64.Build.0 = Debug-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|Win32.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|Win32.Build.0 = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|ARM64.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|ARM.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.Build.0 = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|x64.ActiveCfg = Release-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|x64.Build.0 = Release-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|Win32.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|Win32.Build.0 = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|ARM64.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|ARM.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.ActiveCfg = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.Build.0 = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.Build.0 = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|x64.ActiveCfg = Release-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|x64.Build.0 = Release-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|Win32.ActiveCfg = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|Win32.Build.0 = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|ARM64.ActiveCfg = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|ARM.ActiveCfg = Release-static-xp|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/w32/VS2015/libmicrohttpd.vcxproj b/w32/VS2015/libmicrohttpd.vcxproj
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)project-configs-xp.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmicrohttpd</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static-xp'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140_xp</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll-xp'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140_xp</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static-xp'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140_xp</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll-xp'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140_xp</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <Lib />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/libmicrohttpd.vcxproj.filters b/w32/VS2015/libmicrohttpd.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/perf_replies.vcxproj b/w32/VS2015/perf_replies.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <PropertyGroup Label="Globals">
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{0192c6b5-d870-4857-b673-471e3ebd41d4}</ProjectGuid>
+ <RootNamespace>perf_replies</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(MhdW32Common)perf_replies-files.vcxproj" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2015/perf_replies.vcxproj.filters b/w32/VS2015/perf_replies.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)perf_replies-filters.vcxproj" />
+</Project>
diff --git a/w32/VS2015/simplepost.vcxproj b/w32/VS2015/simplepost.vcxproj
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)simplepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{294D5317-E983-4682-8DB5-678EA4645E11}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>simplepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/.gitignore b/w32/VS2017/.gitignore
@@ -0,0 +1,7 @@
+/Output
+/libmicrohttpd
+/hellobrowser
+/largepost
+/simplepost
+/perf_replies
+/.vs
diff --git a/w32/VS2017/hellobrowser.vcxproj b/w32/VS2017/hellobrowser.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{310F39BD-A2D6-44FF-8344-37ADD0524CBD}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>hellobrowser</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/hellobrowser.vcxproj.filters b/w32/VS2017/hellobrowser.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/largepost.vcxproj b/w32/VS2017/largepost.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)largepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{77A27E6D-9A39-40B8-961B-40E63DB7FA65}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>largepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/libmicrohttpd.sln b/w32/VS2017/libmicrohttpd.sln
@@ -0,0 +1,380 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26228.9
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobrowser", "hellobrowser.vcxproj", "{310F39BD-A2D6-44FF-8344-37ADD0524CBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmicrohttpd", "libmicrohttpd.vcxproj", "{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplepost", "simplepost.vcxproj", "{294D5317-E983-4682-8DB5-678EA4645E11}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largepost", "largepost.vcxproj", "{77A27E6D-9A39-40B8-961B-40E63DB7FA65}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_replies", "perf_replies.vcxproj", "{0192C6B5-D870-4857-B673-471E3EBD41D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug-dll|x64 = Debug-dll|x64
+ Debug-dll|Win32 = Debug-dll|Win32
+ Debug-dll|ARM64 = Debug-dll|ARM64
+ Debug-dll|ARM = Debug-dll|ARM
+ Debug-dll-xp|x64 = Debug-dll-xp|x64
+ Debug-dll-xp|Win32 = Debug-dll-xp|Win32
+ Debug-dll-xp|ARM64 = Debug-dll-xp|ARM64
+ Debug-dll-xp|ARM = Debug-dll-xp|ARM
+ Debug-static|x64 = Debug-static|x64
+ Debug-static|Win32 = Debug-static|Win32
+ Debug-static|ARM64 = Debug-static|ARM64
+ Debug-static|ARM = Debug-static|ARM
+ Debug-static-xp|x64 = Debug-static-xp|x64
+ Debug-static-xp|Win32 = Debug-static-xp|Win32
+ Debug-static-xp|ARM64 = Debug-static-xp|ARM64
+ Debug-static-xp|ARM = Debug-static-xp|ARM
+ Release-dll|x64 = Release-dll|x64
+ Release-dll|Win32 = Release-dll|Win32
+ Release-dll|ARM64 = Release-dll|ARM64
+ Release-dll|ARM = Release-dll|ARM
+ Release-dll-xp|x64 = Release-dll-xp|x64
+ Release-dll-xp|Win32 = Release-dll-xp|Win32
+ Release-dll-xp|ARM64 = Release-dll-xp|ARM64
+ Release-dll-xp|ARM = Release-dll-xp|ARM
+ Release-static|x64 = Release-static|x64
+ Release-static|Win32 = Release-static|Win32
+ Release-static|ARM64 = Release-static|ARM64
+ Release-static|ARM = Release-static|ARM
+ Release-static-xp|x64 = Release-static-xp|x64
+ Release-static-xp|Win32 = Release-static-xp|Win32
+ Release-static-xp|ARM64 = Release-static-xp|ARM64
+ Release-static-xp|ARM = Release-static-xp|ARM
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|x64.ActiveCfg = Debug-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|x64.Build.0 = Debug-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|Win32.Build.0 = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|ARM64.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll-xp|ARM.ActiveCfg = Debug-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.Build.0 = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|x64.ActiveCfg = Debug-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|x64.Build.0 = Debug-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|Win32.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|Win32.Build.0 = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|ARM64.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static-xp|ARM.ActiveCfg = Debug-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.Build.0 = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|x64.ActiveCfg = Release-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|x64.Build.0 = Release-dll-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|Win32.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|Win32.Build.0 = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|ARM64.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll-xp|ARM.ActiveCfg = Release-dll-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.ActiveCfg = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.Build.0 = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.Build.0 = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|x64.ActiveCfg = Release-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|x64.Build.0 = Release-static-xp|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|Win32.ActiveCfg = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|Win32.Build.0 = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|ARM64.ActiveCfg = Release-static-xp|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static-xp|ARM.ActiveCfg = Release-static-xp|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll-xp|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM64.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM64.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static-xp|ARM.Build.0 = Release-static|ARM
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/w32/VS2017/libmicrohttpd.vcxproj b/w32/VS2017/libmicrohttpd.vcxproj
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)project-configs-xp.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmicrohttpd</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType Condition="$(Configuration.Contains('-static'))">StaticLibrary</ConfigurationType>
+ <ConfigurationType Condition="! $(Configuration.Contains('-static'))">DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset Condition="! $(Configuration.EndsWith('-xp'))">v141</PlatformToolset>
+ <PlatformToolset Condition="$(Configuration.EndsWith('-xp'))">v141_xp</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <Lib />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/libmicrohttpd.vcxproj.filters b/w32/VS2017/libmicrohttpd.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/perf_replies.vcxproj b/w32/VS2017/perf_replies.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <PropertyGroup Label="Globals">
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{0192c6b5-d870-4857-b673-471e3ebd41d4}</ProjectGuid>
+ <RootNamespace>perf_replies</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(MhdW32Common)perf_replies-files.vcxproj" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2017/perf_replies.vcxproj.filters b/w32/VS2017/perf_replies.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)perf_replies-filters.vcxproj" />
+</Project>
diff --git a/w32/VS2017/simplepost.vcxproj b/w32/VS2017/simplepost.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)simplepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{294D5317-E983-4682-8DB5-678EA4645E11}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>simplepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v141</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/.gitignore b/w32/VS2019/.gitignore
@@ -0,0 +1,6 @@
+/Output
+/libmicrohttpd
+/hellobrowser
+/largepost
+/simplepost
+/.vs
diff --git a/w32/VS2019/hellobrowser.vcxproj b/w32/VS2019/hellobrowser.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <ProjectGuid>{310F39BD-A2D6-44FF-8344-37ADD0524CBD}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>hellobrowser</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/hellobrowser.vcxproj.filters b/w32/VS2019/hellobrowser.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/largepost.vcxproj b/w32/VS2019/largepost.vcxproj
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)largepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{77A27E6D-9A39-40B8-961B-40E63DB7FA65}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>largepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/libmicrohttpd.sln b/w32/VS2019/libmicrohttpd.sln
@@ -0,0 +1,212 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28803.156
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobrowser", "hellobrowser.vcxproj", "{310F39BD-A2D6-44FF-8344-37ADD0524CBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmicrohttpd", "libmicrohttpd.vcxproj", "{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplepost", "simplepost.vcxproj", "{294D5317-E983-4682-8DB5-678EA4645E11}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largepost", "largepost.vcxproj", "{77A27E6D-9A39-40B8-961B-40E63DB7FA65}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_replies", "perf_replies.vcxproj", "{0192C6B5-D870-4857-B673-471E3EBD41D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug-dll|Win32 = Debug-dll|Win32
+ Debug-dll|x64 = Debug-dll|x64
+ Debug-dll|ARM = Debug-dll|ARM
+ Debug-dll|ARM64 = Debug-dll|ARM64
+ Debug-static|Win32 = Debug-static|Win32
+ Debug-static|x64 = Debug-static|x64
+ Debug-static|ARM = Debug-static|ARM
+ Debug-static|ARM64 = Debug-static|ARM64
+ Release-dll|Win32 = Release-dll|Win32
+ Release-dll|x64 = Release-dll|x64
+ Release-dll|ARM = Release-dll|ARM
+ Release-dll|ARM64 = Release-dll|ARM64
+ Release-static|Win32 = Release-static|Win32
+ Release-static|x64 = Release-static|x64
+ Release-static|ARM = Release-static|ARM
+ Release-static|ARM64 = Release-static|ARM64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.Build.0 = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.Build.0 = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.Build.0 = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.ActiveCfg = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.Build.0 = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/w32/VS2019/libmicrohttpd.vcxproj b/w32/VS2019/libmicrohttpd.vcxproj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmicrohttpd</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType Condition="$(Configuration.EndsWith('-static'))">StaticLibrary</ConfigurationType>
+ <ConfigurationType Condition="! $(Configuration.EndsWith('-static'))">DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <Lib />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/libmicrohttpd.vcxproj.filters b/w32/VS2019/libmicrohttpd.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/perf_replies.vcxproj b/w32/VS2019/perf_replies.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{0192c6b5-d870-4857-b673-471e3ebd41d4}</ProjectGuid>
+ <RootNamespace>perf_replies</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(MhdW32Common)perf_replies-files.vcxproj" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2019/perf_replies.vcxproj.filters b/w32/VS2019/perf_replies.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)perf_replies-filters.vcxproj" />
+</Project>
diff --git a/w32/VS2019/simplepost.vcxproj b/w32/VS2019/simplepost.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)simplepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>16.0</VCProjectVersion>
+ <ProjectGuid>{294D5317-E983-4682-8DB5-678EA4645E11}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>simplepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v142</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/.gitignore b/w32/VS2022/.gitignore
@@ -0,0 +1,7 @@
+/Output
+/libmicrohttpd
+/hellobrowser
+/largepost
+/simplepost
+/perf_replies
+/.vs
diff --git a/w32/VS2022/hellobrowser.vcxproj b/w32/VS2022/hellobrowser.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <ProjectGuid>{310F39BD-A2D6-44FF-8344-37ADD0524CBD}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>hellobrowser</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/hellobrowser.vcxproj.filters b/w32/VS2022/hellobrowser.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)hellobrowser-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/largepost.vcxproj b/w32/VS2022/largepost.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)largepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <ProjectGuid>{77A27E6D-9A39-40B8-961B-40E63DB7FA65}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>largepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/libmicrohttpd.sln b/w32/VS2022/libmicrohttpd.sln
@@ -0,0 +1,213 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.31815.197
+MinimumVisualStudioVersion = 10.0.40219.1
+
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hellobrowser", "hellobrowser.vcxproj", "{310F39BD-A2D6-44FF-8344-37ADD0524CBD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmicrohttpd", "libmicrohttpd.vcxproj", "{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "simplepost", "simplepost.vcxproj", "{294D5317-E983-4682-8DB5-678EA4645E11}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "largepost", "largepost.vcxproj", "{77A27E6D-9A39-40B8-961B-40E63DB7FA65}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "perf_replies", "perf_replies.vcxproj", "{0192C6B5-D870-4857-B673-471E3EBD41D4}"
+ ProjectSection(ProjectDependencies) = postProject
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A} = {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug-dll|Win32 = Debug-dll|Win32
+ Debug-dll|x64 = Debug-dll|x64
+ Debug-dll|ARM = Debug-dll|ARM
+ Debug-dll|ARM64 = Debug-dll|ARM64
+ Debug-static|Win32 = Debug-static|Win32
+ Debug-static|x64 = Debug-static|x64
+ Debug-static|ARM = Debug-static|ARM
+ Debug-static|ARM64 = Debug-static|ARM64
+ Release-dll|Win32 = Release-dll|Win32
+ Release-dll|x64 = Release-dll|x64
+ Release-dll|ARM = Release-dll|ARM
+ Release-dll|ARM64 = Release-dll|ARM64
+ Release-static|Win32 = Release-static|Win32
+ Release-static|x64 = Release-static|x64
+ Release-static|ARM = Release-static|ARM
+ Release-static|ARM64 = Release-static|ARM64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|x64.Build.0 = Debug-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|x64.Build.0 = Release-dll|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|Win32.Build.0 = Release-static|Win32
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.ActiveCfg = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|x64.Build.0 = Release-static|x64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM.Build.0 = Release-static|ARM
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|x64.Build.0 = Debug-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|x64.Build.0 = Release-dll|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|Win32.Build.0 = Release-static|Win32
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.ActiveCfg = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|x64.Build.0 = Release-static|x64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM.Build.0 = Release-static|ARM
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {310F39BD-A2D6-44FF-8344-37ADD0524CBD}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|x64.Build.0 = Debug-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|x64.Build.0 = Release-dll|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|Win32.Build.0 = Release-static|Win32
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.ActiveCfg = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|x64.Build.0 = Release-static|x64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM.Build.0 = Release-static|ARM
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {294D5317-E983-4682-8DB5-678EA4645E11}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Debug-static|x64.Build.0 = Debug-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|x64.Build.0 = Release-dll|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|Win32.Build.0 = Release-static|Win32
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.ActiveCfg = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|x64.Build.0 = Release-static|x64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM.Build.0 = Release-static|ARM
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {77A27E6D-9A39-40B8-961B-40E63DB7FA65}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.ActiveCfg = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|Win32.Build.0 = Debug-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.ActiveCfg = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|x64.Build.0 = Debug-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.ActiveCfg = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM.Build.0 = Debug-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.ActiveCfg = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-dll|ARM64.Build.0 = Debug-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.ActiveCfg = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|Win32.Build.0 = Debug-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.ActiveCfg = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|x64.Build.0 = Debug-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.ActiveCfg = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM.Build.0 = Debug-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.ActiveCfg = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Debug-static|ARM64.Build.0 = Debug-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.ActiveCfg = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|Win32.Build.0 = Release-dll|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.ActiveCfg = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|x64.Build.0 = Release-dll|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.ActiveCfg = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM.Build.0 = Release-dll|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.ActiveCfg = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-dll|ARM64.Build.0 = Release-dll|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.ActiveCfg = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|Win32.Build.0 = Release-static|Win32
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.ActiveCfg = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|x64.Build.0 = Release-static|x64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.ActiveCfg = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM.Build.0 = Release-static|ARM
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.ActiveCfg = Release-static|ARM64
+ {0192C6B5-D870-4857-B673-471E3EBD41D4}.Release-static|ARM64.Build.0 = Release-static|ARM64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/w32/VS2022/libmicrohttpd.vcxproj b/w32/VS2022/libmicrohttpd.vcxproj
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <ProjectGuid>{9CFB0342-A9E7-483E-BEE5-A1DE22584C5A}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>libmicrohttpd</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType Condition="$(Configuration.EndsWith('-static'))">StaticLibrary</ConfigurationType>
+ <ConfigurationType Condition="! $(Configuration.EndsWith('-static'))">DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <Lib />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/libmicrohttpd.vcxproj.filters b/w32/VS2022/libmicrohttpd.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)libmicrohttpd-filters.vcxproj" />
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/perf_replies.vcxproj b/w32/VS2022/perf_replies.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectGuid>{0192c6b5-d870-4857-b673-471e3ebd41d4}</ProjectGuid>
+ <RootNamespace>perf_replies</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="Shared">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(MhdW32Common)perf_replies-files.vcxproj" />
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/VS2022/perf_replies.vcxproj.filters b/w32/VS2022/perf_replies.vcxproj.filters
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)perf_replies-filters.vcxproj" />
+</Project>
diff --git a/w32/VS2022/simplepost.vcxproj b/w32/VS2022/simplepost.vcxproj
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <Import Project="$(SolutionDir)..\common\vs_dirs.props" />
+ <Import Project="$(MhdW32Common)project-configs.props" />
+ <Import Project="$(MhdW32Common)simplepost-files.vcxproj" />
+ <PropertyGroup Label="Globals">
+ <VCProjectVersion>17.0</VCProjectVersion>
+ <ProjectGuid>{294D5317-E983-4682-8DB5-678EA4645E11}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>simplepost</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <PropertyGroup Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries Condition="$(Configuration.StartsWith('Debug'))">true</UseDebugLibraries>
+ <UseDebugLibraries Condition="! $(Configuration.StartsWith('Debug'))">false</UseDebugLibraries>
+ <PlatformToolset>v143</PlatformToolset>
+ <WholeProgramOptimization Condition="! $(Configuration.StartsWith('Debug'))">true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <Import Project="$(MhdW32Common)common-build-settings.props" />
+ <Import Project="$(MhdW32Common)apps-build-settings.props" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <ClCompile />
+ <Link />
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
+\ No newline at end of file
diff --git a/w32/common/MHD_config.h b/w32/common/MHD_config.h
@@ -0,0 +1,267 @@
+/* MHD_config.h for W32 */
+/* Created manually. */
+
+/* *** Basic OS/compiler information *** */
+
+/* This is a Windows system */
+#define WINDOWS 1
+
+/* Define if MS VC compiler is used */
+#define MSVC 1
+
+#ifndef __clang__
+/* Define that MS VC does not support VLAs */
+#ifndef __STDC_NO_VLA__
+#define __STDC_NO_VLA__ 1
+#endif /* ! __STDC_NO_VLA__ */
+#else
+/* If clang is used then variable-length arrays are supported. */
+#define HAVE_C_VARARRAYS 1
+#endif
+
+/* Define to 1 if your C compiler supports inline functions. */
+#define INLINE_FUNC 1
+
+/* Define to prefix which will be used with MHD inline functions. */
+#define _MHD_static_inline static __forceinline
+
+#ifdef __clang__
+/* Define to 1 if you have __builtin_bswap32() builtin function */
+#define MHD_HAVE___BUILTIN_BSWAP32 1
+
+/* Define to 1 if you have __builtin_bswap64() builtin function */
+#define MHD_HAVE___BUILTIN_BSWAP64 1
+#endif /* __clang__ */
+
+/* The size of `size_t', as computed by sizeof. */
+#if defined(_M_X64) || defined(_M_AMD64) || defined(_M_ARM64) || defined(_WIN64)
+#define SIZEOF_SIZE_T 8
+#else /* ! _WIN64 */
+#define SIZEOF_SIZE_T 4
+#endif /* ! _WIN64 */
+
+/* The size of `tv_sec' member of `struct timeval', as computed by sizeof */
+#define SIZEOF_STRUCT_TIMEVAL_TV_SEC 4
+
+/* The size of `int64_t', as computed by sizeof. */
+#define SIZEOF_INT64_T 8
+
+/* The size of `uint64_t', as computed by sizeof. */
+#define SIZEOF_UINT64_T 8
+
+/* The size of `int', as computed by sizeof. */
+#define SIZEOF_INT 4
+
+/* The size of `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT 4
+
+/* The size of `unsigned long long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG_LONG 8
+
+/* Define to supported 'noreturn' function declaration */
+#if defined(_STDC_VERSION__) && (__STDC_VERSION__ + 0) >= 201112L
+#define _MHD_NORETURN _Noreturn
+#else /* before C11 */
+#define _MHD_NORETURN __declspec(noreturn)
+#endif /* before C11 */
+
+/* *** MHD configuration *** */
+/* Undef to disable feature */
+
+/* Enable basic Auth support */
+#define BAUTH_SUPPORT 1
+
+/* Enable digest Auth support */
+#define DAUTH_SUPPORT 1
+
+/* The default HTTP Digest Auth default maximum nc (nonce count) value */
+#define MHD_DAUTH_DEF_MAX_NC_ 1000
+
+/* The default HTTP Digest Auth default nonce timeout value (in seconds) */
+#define MHD_DAUTH_DEF_TIMEOUT_ 90
+
+/* Enable MD5 hashing support. */
+#define MHD_MD5_SUPPORT 1
+
+/* Enable SHA-256 hashing support. */
+#define MHD_SHA256_SUPPORT 1
+
+/* Enable SHA-512/256 hashing support. */
+#define MHD_SHA512_256_SUPPORT 1
+
+/* Enable postprocessor.c */
+#define HAVE_POSTPROCESSOR 1
+
+/* Enable error messages */
+#define HAVE_MESSAGES 1
+
+/* Enable HTTP Upgrade support. */
+#define UPGRADE_SUPPORT 1
+
+/* Enable HTTP cookie parsing support. */
+#define COOKIE_SUPPORT 1
+
+/* *** OS features *** */
+
+/* Provides IPv6 headers */
+#define HAVE_INET6 1
+
+/* Define to 1 if your system allow overriding the value of FD_SETSIZE macro */
+#define HAS_FD_SETSIZE_OVERRIDABLE 1
+
+#if 0 /* Do not define the macro to keep maintability simple if system value is updated */
+/* Define to system default value of FD_SETSIZE macro */
+# define MHD_SYS_FD_SETSIZE_ 64
+#endif
+
+/* Define to use socketpair for inter-thread communication */
+#define _MHD_ITC_SOCKETPAIR 1
+
+/* define to use W32 threads */
+#define MHD_USE_W32_THREADS 1
+
+#ifndef _WIN32_WINNT
+/* MHD supports Windows XP and later W32 systems*/
+#define _WIN32_WINNT 0x0600
+#endif /* _WIN32_WINNT */
+
+/* winsock poll is available only on Vista and later */
+#if _WIN32_WINNT >= 0x0600
+#define HAVE_POLL 1
+#endif /* _WIN32_WINNT >= 0x0600 */
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#define HAVE_WINSOCK2_H 1
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#define HAVE_WS2TCPIP_H 1
+
+/* Define to 1 if you have the `_lseeki64' function. */
+#define HAVE___LSEEKI64 1
+
+/* Define to 1 if you have the `gmtime_s' function in W32 form. */
+#define HAVE_W32_GMTIME_S 1
+
+/* Define to 1 if you have the usable `calloc' function. */
+#define HAVE_CALLOC 1
+
+/* Define if you have usable assert() and assert.h */
+#define HAVE_ASSERT 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
+#if _MSC_VER >= 1900 /* snprintf() supported natively since VS2015 */
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+#endif
+
+#if _MSC_VER >= 1800
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+#endif
+
+#if _MSC_VER + 0 >= 1800 /* VS 2013 and later */
+/* Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines
+ 'bool' type. */
+#define HAVE_STDBOOL_H 1
+/* Define to 1 if you have the real boolean type. */
+#define HAVE_REAL_BOOL 1
+/* Define to 1 if you have the real boolean type. */
+#define HAVE_BUILTIN_TYPE_BOOL 1
+#else /* before VS 2013 */
+
+/* Define to type name which will be used as boolean type. */
+#define bool int
+
+/* Define to value interpreted by compiler as boolean "false", if "false" is
+ not defined by system headers. */
+#define false 0
+
+/* Define to value interpreted by compiler as boolean "true", if "true" is not
+ defined by system headers. */
+#define true (!0)
+#endif /* before VS 2013 */
+
+/* Define to 1 if you have the `getsockname' function. */
+#define HAVE_GETSOCKNAME 1
+
+/* Define if you have usable `getsockname' function. */
+#define MHD_USE_GETSOCKNAME 1
+
+/* Define to 1 if your compiler supports __func__ magic-macro. */
+#define HAVE___FUNC__ 1
+
+#if _MSC_VER + 0 >= 1900 /* VS 2015 and later */
+#if defined(_STDC_VERSION__) && (__STDC_VERSION__ + 0) >= 201112L
+/* Define to 1 if your compiler supports 'alignof()' */
+#define HAVE_C_ALIGNOF 1
+/* Define to 1 if you have the <stdalign.h> header file. */
+#define HAVE_STDALIGN_H 1
+#endif /* C11 */
+#endif /* VS 2015 and later */
+
+/* Define to 1 if you have the 'rand' function. */
+#define HAVE_RAND 1
+
+/* *** Headers information *** */
+/* Not really important as not used by code currently */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if you have the <math.h> header file. */
+#define HAVE_MATH_H 1
+
+/* Define to 1 if you have the <sdkddkver.h> header file. */
+#define HAVE_SDKDDKVER_H 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <windows.h> header file. */
+#define HAVE_WINDOWS_H 1
+
+
+/* *** Other useful staff *** */
+
+#define _GNU_SOURCE 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+
+/* End of MHD_config.h */
diff --git a/w32/common/apps-build-settings.props b/w32/common/apps-build-settings.props
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-static'">
+ <TargetName>$(ProjectName)_d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Debug-dll'">
+ <TargetName>$(ProjectName)-dll_d</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-static'">
+ <TargetName>$(ProjectName)</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)'=='Release-dll'">
+ <TargetName>$(ProjectName)-dll</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ <ProjectReference />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <RuntimeLibrary Condition="'$(Configuration)'=='Debug-static'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)'=='Debug-dll'">MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)'=='Release-static'">MultiThreaded</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(Configuration)'=='Release-dll'">MultiThreadedDLL</RuntimeLibrary>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project>
diff --git a/w32/common/common-build-settings.props b/w32/common/common-build-settings.props
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="UserMacros">
+ <!-- Target minimum OS version: WinXP = 0; Vista = 1; Win7 = 2; Win8 = 3...
+ Only 0, 1 and 3 are used currently -->
+ <TargetOSLevel Condition="$(Platform.ToLowerInvariant().StartsWith('arm'))">3</TargetOSLevel>
+ <TargetOSLevel Condition="! $(Platform.ToLowerInvariant().StartsWith('arm')) And $(PlatformToolset.EndsWith('_xp'))">0</TargetOSLevel>
+ <TargetOSLevel Condition="! $(Platform.ToLowerInvariant().StartsWith('arm')) And ! $(PlatformToolset.EndsWith('_xp'))">1</TargetOSLevel>
+ <MhdNumBits Condition="$(Platform.EndsWith('64'))">64</MhdNumBits>
+ <MhdNumBits Condition="! $(Platform.EndsWith('64'))">32</MhdNumBits>
+ </PropertyGroup>
+ <PropertyGroup>
+ <IncludePath>$(SolutionDir);$(MhdW32Common);$(MhdSrc)include;$(IncludePath)</IncludePath>
+ </PropertyGroup>
+ <PropertyGroup>
+ <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
+ <OutDir>$(SolutionDir)Output\$(Platform)\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(UseDebugLibraries)'=='true'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(UseDebugLibraries)'!='true'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <WarningLevel Condition="'%(ClCompile.ExternalWarningLevel)' != ''">EnableAllWarnings</WarningLevel>
+ <WarningLevel Condition="'%(ClCompile.ExternalWarningLevel)' == ''">Level4</WarningLevel>
+ <ExternalWarningLevel>Level3</ExternalWarningLevel>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4996;4820;4127;5045;4711;4710</DisableSpecificWarnings>
+ <TreatSpecificWarningsAsErrors>4013</TreatSpecificWarningsAsErrors>
+ <SmallerTypeCheck>false</SmallerTypeCheck>
+ <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <LanguageStandard_C Condition="'%(ClCompile.LanguageStandard_C)' != ''">stdc17</LanguageStandard_C>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(MhdNumBits)' == '32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(TargetOSLevel)'>='3'">
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0602;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <MinimumRequiredVersion>6.02</MinimumRequiredVersion>
+ </Link>
+ <Lib>
+ <MinimumRequiredVersion>6.02</MinimumRequiredVersion>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(TargetOSLevel)'>'0' And '$(TargetOSLevel)'<'3'">
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <MinimumRequiredVersion>6.00</MinimumRequiredVersion>
+ </Link>
+ <Lib>
+ <MinimumRequiredVersion>6.00</MinimumRequiredVersion>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(TargetOSLevel)'=='0' And '$(Platform)'=='Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
+ </Link>
+ <Lib>
+ <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(TargetOSLevel)'=='0' And '$(Platform)'=='x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0502;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <MinimumRequiredVersion>5.02</MinimumRequiredVersion>
+ </Link>
+ <Lib>
+ <MinimumRequiredVersion>5.02</MinimumRequiredVersion>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(UseDebugLibraries)'=='true'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(UseDebugLibraries)'!='true'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ </Link>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
+ <Link>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ <Lib>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
+ <Link>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ <Lib>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Lib>
+ </ItemDefinitionGroup>
+</Project>
diff --git a/w32/common/cpp.hint b/w32/common/cpp.hint
@@ -0,0 +1,3 @@
+/* This is a helper file used by MSVC Browsing Database Parser.
+ This file is required to quickly identify functions in the code. */
+#define _MHD_EXTERN
diff --git a/w32/common/gen_dll_res.ps1 b/w32/common/gen_dll_res.ps1
@@ -0,0 +1,39 @@
+param ([string]$BasePath = ".\")
+
+$Host.SetShouldExit(111) # Set non-zero return code until task successfully finished
+$ErrorActionPreference = "Stop" # Stop on any error
+
+Remove-Variable MHD_ver,MHD_ver_major,MHD_ver_minor,MHD_ver_patchlev -ErrorAction:SilentlyContinue
+
+Write-Output "Processing: ${BasePath}..\..\configure.ac"
+foreach($line in Get-Content "${BasePath}..\..\configure.ac")
+{
+ if ($line -match '^AC_INIT\(\[(?:GNU )?libmicrohttpd\],\[((\d+).(\d+).(\d+))\]')
+ {
+ [string]$MHD_ver = $Matches[1].ToString()
+ [string]$MHD_ver_major = $Matches[2].ToString()
+ [string]$MHD_ver_minor = $Matches[3].ToString()
+ [string]$MHD_ver_patchlev = $Matches[4].ToString()
+ break
+ }
+}
+if ("$MHD_ver" -eq "" -or "$MHD_ver_major" -eq "" -or "$MHD_ver_minor" -eq "" -or "$MHD_ver_patchlev" -eq "")
+{
+ Write-Error -Message ("error MHDVSVER01 : Can't find MHD version")
+ Throw ($MyInvocation.MyCommand.Name + " : error MHDVSVER01 : Can't find MHD version")
+}
+
+Write-Output "Detected MHD version: $MHD_ver"
+
+Write-Output "Generating ${BasePath}microhttpd_dll_res_vc.rc"
+Get-Content "${BasePath}microhttpd_dll_res_vc.rc.in" | ForEach-Object {
+ $_ -replace '@PACKAGE_VERSION_MAJOR@',"$MHD_ver_major" `
+ -replace '@PACKAGE_VERSION_MINOR@', "$MHD_ver_minor" `
+ -replace '@PACKAGE_VERSION_SUBMINOR@', "$MHD_ver_patchlev" `
+ -replace '@PACKAGE_VERSION@', "$MHD_ver"
+} | Out-File -FilePath "${BasePath}microhttpd_dll_res_vc.rc" -Force
+
+$Host.SetShouldExit(0) # Reset return code
+
+Write-Output "${BasePath}microhttpd_dll_res_vc.rc was generated "
+exit 0 # Exit with success code
diff --git a/w32/common/hellobrowser-files.vcxproj b/w32/common/hellobrowser-files.vcxproj
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(MhdRoot)doc\examples\hellobrowser.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libmicrohttpd.vcxproj">
+ <Project>{9cfb0342-a9e7-483e-bee5-a1de22584c5a}</Project>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/hellobrowser-filters.vcxproj b/w32/common/hellobrowser-filters.vcxproj
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(MhdRoot)doc\examples\hellobrowser.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/largepost-files.vcxproj b/w32/common/largepost-files.vcxproj
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(MhdRoot)doc\examples\largepost.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libmicrohttpd.vcxproj">
+ <Project>{9cfb0342-a9e7-483e-bee5-a1de22584c5a}</Project>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/libmicrohttpd-build-settings.props b/w32/common/libmicrohttpd-build-settings.props
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <CustomBuildBeforeTargets>ResourceCompile</CustomBuildBeforeTargets>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(ConfigurationType)'=='StaticLibrary'">
+ <TargetName Condition="'$(UseDebugLibraries)'=='true'">$(ProjectName)_d</TargetName>
+ <TargetName Condition="'$(UseDebugLibraries)'!='true'">$(ProjectName)</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(ConfigurationType)'=='DynamicLibrary'">
+ <TargetName Condition="'$(UseDebugLibraries)'=='true'">$(ProjectName)-dll_d</TargetName>
+ <TargetName Condition="'$(UseDebugLibraries)'!='true'">$(ProjectName)-dll</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>BUILDING_MHD_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4746;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <Link>
+ <Subsystem>WINDOWS</Subsystem>
+ </Link>
+ <Lib>
+ <SubSystem>Windows</SubSystem>
+ </Lib>
+ <CustomBuildStep>
+ <Message>Copy headers to output</Message>
+ <Command>xcopy /F /I /Y "$(MhdSrc)include\microhttpd.h" "$(OutputPath)"</Command>
+ <Outputs>$(OutputPath)microhttpd.h;%(Outputs)</Outputs>
+ <Inputs>$(MhdSrc)include\microhttpd.h</Inputs>
+ </CustomBuildStep>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(ConfigurationType)'=='StaticLibrary'">
+ <ClCompile>
+ <PreprocessorDefinitions>_LIB;MHD_W32LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebug</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'!='true'">MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Lib>
+ <AdditionalDependencies>Ws2_32.lib</AdditionalDependencies>
+ </Lib>
+ <PostBuildEvent>
+ <Command>xcopy /F /I /Y "$(IntermediateOutputPath)$(TargetName).pdb" "$(OutputPath)"</Command>
+ <Message>Copy .pdb to output directory</Message>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(ConfigurationType)'=='DynamicLibrary'">
+ <ClCompile>
+ <PreprocessorDefinitions>_USRDLL;MHD_W32DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'=='true'">MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary Condition="'$(UseDebugLibraries)'!='true'">MultiThreadedDLL</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+</Project>
diff --git a/w32/common/libmicrohttpd-files.vcxproj b/w32/common/libmicrohttpd-files.vcxproj
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(MhdSrc)microhttpd\basicauth.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\connection.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\daemon.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\digestauth.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\gen_auth.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\internal.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\md5.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\sha256.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\sha512_256.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\memorypool.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_mono_clock.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\postprocessor.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\reason_phrase.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\response.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\tsearch.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\sysfdsetsize.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_str.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_threads.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_send.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_sockets.c" />
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_itc.c">
+ <ExcludedFromBuild>true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_compat.c">
+ <ExcludedFromBuild Condition="'$(PlatformToolsetVersion)'>='140'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_panic.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(MhdSrc)include\autoinit_funcs.h" />
+ <ClInclude Include="$(MhdSrc)include\microhttpd.h" />
+ <ClInclude Include="$(MhdSrc)include\mhd_options.h" />
+ <ClInclude Include="$(MhdSrc)include\platform.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\basicauth.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\connection.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\digestauth.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\gen_auth.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\internal.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_md5_wrap.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\md5.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_sha256_wrap.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\sha256.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\sha512_256.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\memorypool.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_assert.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_align.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_bithelpers.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_byteorder.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_limits.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_mono_clock.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\response.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\postprocessor.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\tsearch.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\sysfdsetsize.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_str.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_str_types.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_threads.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_locks.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_send.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_sockets.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_itc.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_itc_types.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_compat.h" />
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_panic.h" />
+ <ClInclude Include="$(MhdW32Common)MHD_config.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="$(MhdW32Common)microhttpd_dll_res_vc.rc">
+ <ExcludedFromBuild Condition="'$(ConfigurationType)'=='StaticLibrary'">true</ExcludedFromBuild>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="$(MhdW32Common)microhttpd_dll_res_vc.rc.in">
+ <ExcludedFromBuild Condition="'$(ConfigurationType)'=='StaticLibrary'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(ConfigurationType)'=='DynamicLibrary'">false</ExcludedFromBuild>
+ <FileType>Document</FileType>
+ <Command>PowerShell.exe -Version 3.0 -NonInteractive -NoProfile -ExecutionPolicy Bypass -File "$(MhdW32Common)gen_dll_res.ps1" -BasePath "$(MhdW32Common)\"</Command>
+ <Message>Generating .dll description resource</Message>
+ <Outputs>$(MhdW32Common)microhttpd_dll_res_vc.rc</Outputs>
+ <AdditionalInputs>$(MhdW32Common)gen_dll_res.ps1;$(MhdRoot)configure.ac</AdditionalInputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="$(MhdW32Common)cpp.hint" />
+ </ItemGroup>
+</Project>
diff --git a/w32/common/libmicrohttpd-filters.vcxproj b/w32/common/libmicrohttpd-filters.vcxproj
@@ -0,0 +1,221 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Internal Headers">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Public Headers">
+ <UniqueIdentifier>{ec88d605-3383-4989-8e25-bc8efa824720}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ <Filter Include="Template Files">
+ <UniqueIdentifier>{df5ad836-e372-437b-a0e3-299d3675d6b4}</UniqueIdentifier>
+ <Extensions>in</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(MhdSrc)include\microhttpd.h">
+ <Filter>Public Headers</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(MhdSrc)include\autoinit_funcs.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)include\platform.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)include\mhd_options.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdW32Common)MHD_config.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\basicauth.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\connection.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\digestauth.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\gen_auth.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\internal.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_md5_wrap.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\md5.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_sha256_wrap.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\sha256.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\sha512_256.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\memorypool.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\postprocessor.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\response.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\tsearch.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_assert.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_align.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_limits.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_bithelpers.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_byteorder.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_mono_clock.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\sysfdsetsize.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_str.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_str_types.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_threads.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_locks.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_sockets.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_itc_types.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_itc.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_send.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_compat.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)microhttpd\mhd_panic.h">
+ <Filter>Internal Headers</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(MhdSrc)microhttpd\basicauth.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\connection.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\daemon.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\digestauth.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\gen_auth.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\internal.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\md5.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\sha256.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\sha512_256.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\memorypool.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\postprocessor.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\reason_phrase.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\response.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\tsearch.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_mono_clock.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\sysfdsetsize.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_str.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_threads.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_sockets.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_itc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_send.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_compat.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdSrc)microhttpd\mhd_panic.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="$(MhdW32Common)microhttpd_dll_res_vc.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="$(MhdW32Common)microhttpd_dll_res_vc.rc.in">
+ <Filter>Template Files</Filter>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="$(MhdW32Common)cpp.hint" />
+ </ItemGroup>
+</Project>
diff --git a/w32/common/microhttpd_dll_res_vc.rc.in b/w32/common/microhttpd_dll_res_vc.rc.in
@@ -0,0 +1,42 @@
+/* W32 resources for .dll */
+
+#include <winresrc.h>
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION @PACKAGE_VERSION_MAJOR@,@PACKAGE_VERSION_MINOR@,@PACKAGE_VERSION_SUBMINOR@,0
+ PRODUCTVERSION @PACKAGE_VERSION_MAJOR@,@PACKAGE_VERSION_MINOR@,@PACKAGE_VERSION_SUBMINOR@,0
+ FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+#if defined(_DEBUG)
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "04090000" /* Lang = US English, Charset = ASCII */
+ BEGIN
+ VALUE "ProductName", "GNU libmicrohttpd\0"
+ VALUE "ProductVersion", "@PACKAGE_VERSION@\0"
+ VALUE "FileVersion", "@PACKAGE_VERSION@\0"
+ VALUE "FileDescription", "GNU libmicrohttpd DLL for Windows (VC build)\0"
+ VALUE "InternalName", "libmicrohttpd\0"
+#if defined(_DEBUG)
+ VALUE "OriginalFilename", "libmicrohttpd-dll_d.dll\0"
+#else
+ VALUE "OriginalFilename", "libmicrohttpd-dll.dll\0"
+#endif
+ VALUE "CompanyName", "Free Software Foundation\0"
+ VALUE "LegalCopyright", "Copyright (C) 2007-2021 Christian Grothoff, Evgeny Grin, and project contributors\0"
+ VALUE "Comments", "http://www.gnu.org/software/libmicrohttpd/\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0 /* US English, ASCII */
+ END
+END
diff --git a/w32/common/perf_replies-files.vcxproj b/w32/common/perf_replies-files.vcxproj
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ProjectReference Include="libmicrohttpd.vcxproj">
+ <Project>{9cfb0342-a9e7-483e-bee5-a1de22584c5a}</Project>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(MhdRoot)src\tools\perf_replies.c" />
+ <ClCompile Include="$(MhdRoot)src\tools\mhd_tool_get_cpu_count.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(MhdSrc)src\tools\mhd_tool_get_cpu_count.h" />
+ <ClInclude Include="$(MhdSrc)src\tools\mhd_tool_str_to_uint.h" />
+ </ItemGroup>
+</Project>
diff --git a/w32/common/perf_replies-filters.vcxproj b/w32/common/perf_replies-filters.vcxproj
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="$(MhdSrc)src\tools\mhd_tool_get_cpu_count.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="$(MhdSrc)src\tools\mhd_tool_str_to_uint.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="$(MhdRoot)src\tools\perf_replies.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="$(MhdRoot)src\tools\mhd_tool_get_cpu_count.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/project-configs-xp.props b/w32/common/project-configs-xp.props
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug-dll-xp|Win32">
+ <Configuration>Debug-dll-xp</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-dll-xp|x64">
+ <Configuration>Debug-dll-xp</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static-xp|Win32">
+ <Configuration>Debug-static-xp</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static-xp|x64">
+ <Configuration>Debug-static-xp</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll-xp|Win32">
+ <Configuration>Release-dll-xp</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll-xp|x64">
+ <Configuration>Release-dll-xp</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static-xp|Win32">
+ <Configuration>Release-static-xp</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static-xp|x64">
+ <Configuration>Release-static-xp</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <!-- Next configurations are uselss, but VS requires the full set to function properly -->
+ <ProjectConfiguration Include="Debug-dll-xp|ARM">
+ <Configuration>Debug-dll-xp</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-dll-xp|ARM64">
+ <Configuration>Debug-dll-xp</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static-xp|ARM">
+ <Configuration>Debug-static-xp</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static-xp|ARM64">
+ <Configuration>Debug-static-xp</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll-xp|ARM">
+ <Configuration>Release-dll-xp</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll-xp|ARM64">
+ <Configuration>Release-dll-xp</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static-xp|ARM">
+ <Configuration>Release-static-xp</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static-xp|ARM64">
+ <Configuration>Release-static-xp</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/project-configs.props b/w32/common/project-configs.props
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug-dll|Win32">
+ <Configuration>Debug-dll</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-dll|x64">
+ <Configuration>Debug-dll</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-dll|ARM">
+ <Configuration>Debug-dll</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-dll|ARM64">
+ <Configuration>Debug-dll</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static|Win32">
+ <Configuration>Debug-static</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static|x64">
+ <Configuration>Debug-static</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static|ARM">
+ <Configuration>Debug-static</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug-static|ARM64">
+ <Configuration>Debug-static</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll|Win32">
+ <Configuration>Release-dll</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll|x64">
+ <Configuration>Release-dll</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll|ARM">
+ <Configuration>Release-dll</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-dll|ARM64">
+ <Configuration>Release-dll</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static|Win32">
+ <Configuration>Release-static</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static|x64">
+ <Configuration>Release-static</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static|ARM">
+ <Configuration>Release-static</Configuration>
+ <Platform>ARM</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release-static|ARM64">
+ <Configuration>Release-static</Configuration>
+ <Platform>ARM64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/simplepost-files.vcxproj b/w32/common/simplepost-files.vcxproj
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="$(MhdRoot)doc\examples\simplepost.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="libmicrohttpd.vcxproj">
+ <Project>{9cfb0342-a9e7-483e-bee5-a1de22584c5a}</Project>
+ </ProjectReference>
+ </ItemGroup>
+</Project>
diff --git a/w32/common/vs_dirs.props b/w32/common/vs_dirs.props
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Label="UserMacros">
+ <MhdRoot>$(SolutionDir)..\..\</MhdRoot>
+ <MhdSrc>$(SolutionDir)..\..\src\</MhdSrc>
+ <MhdW32Dir>$(SolutionDir)..\</MhdW32Dir>
+ <MhdW32Common>$(MhdW32Dir)common\</MhdW32Common>
+ </PropertyGroup>
+</Project>