Yet Another eXchange Tool 0.11.3
Loading...
Searching...
No Matches
xt_xmlInitParser.c
Go to the documentation of this file.
1
15/*
16 * Maintainer: Jörg Behrens <behrens@dkrz.de>
17 * Moritz Hanke <hanke@dkrz.de>
18 * Thomas Jahns <jahns@dkrz.de>
19 * URL: https://dkrz-sw.gitlab-pages.dkrz.de/yaxt/
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are
23 * met:
24 *
25 * Redistributions of source code must retain the above copyright notice,
26 * this list of conditions and the following disclaimer.
27 *
28 * Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 *
32 * Neither the name of the DKRZ GmbH nor the names of its contributors
33 * may be used to endorse or promote products derived from this software
34 * without specific prior written permission.
35 *
36 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
37 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
38 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
39 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
40 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
41 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
42 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
43 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
44 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
45 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
46 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
47 */
48#ifdef HAVE_CONFIG_H
49#include <config.h>
50#endif
51
52#ifdef XT_LIBXML_INCLUDE_SUBDIR
53#include <libxml2/libxml/parser.h>
54#else
55#include <libxml/parser.h>
56#endif
57
58#include <fenv.h>
59#pragma STDC FENV_ACCESS ON
60
61static void __attribute__((constructor))
62xt_init_xml_parser_nofpe(void) {
63 fenv_t prev_fenv;
64 fegetenv(&prev_fenv)
65 int prevmask = fedisableexcept(FE_DIVBYZERO);
66 xmlInitParser();
67 fesetenv(&prev_fenv)
68}
69
70
71/*
72 * Local Variables:
73 * c-basic-offset: 2
74 * coding: utf-8
75 * indent-tabs-mode: nil
76 * show-trailing-whitespace: t
77 * require-trailing-newline: t
78 * End:
79 */
#define __attribute__(x)
Definition core.h:82