1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 20:25:14 +03:00
Commit Graph

129 Commits

Author SHA1 Message Date
Nick Wellnhofer
776d15d383 Don't check for standard C89 headers
Don't check for

- ctype.h
- errno.h
- float.h
- limits.h
- math.h
- signal.h
- stdarg.h
- stdlib.h
- string.h
- time.h

Stop including non-standard headers

- malloc.h
- strings.h
2022-03-02 00:43:54 +01:00
Nick Wellnhofer
2489c1d024 Remove useless __CYGWIN__ checks
From what I can tell, some really early Cygwin versions from around
1998-2000 used to erroneously define _WIN32. This was eventually fixed,
but these days, the `defined(_WIN32) && !defined(__CYGWIN__)` idiom is
unnecessary.

Now, we only check for __CYGWIN__ in xmlexports.h when deciding whether
to use __declspec.
2022-02-28 22:58:35 +01:00
Nick Wellnhofer
346c3a930c Remove elfgcchack.h
The same optimization can be enabled with -fno-semantic-interposition
since GCC 5. clang has always used this option by default.
2022-02-20 21:49:04 +01:00
Nick Wellnhofer
20c60886e4 Fix typos
Resolves #133.
2020-03-08 17:41:53 +01:00
Jared Yanovich
2a350ee9b4 Large batch of typo fixes
Closes #109.
2019-09-30 18:04:38 +02:00
Nick Wellnhofer
cb5541c9f3 Fix libz and liblzma detection
If libz or liblzma are detected with pkg-config, AC_CHECK_HEADERS must
not be run because the correct CPPFLAGS aren't set. It is actually not
required have separate checks for LIBXML_ZLIB_ENABLED and HAVE_ZLIB_H.
Only check for LIBXML_ZLIB_ENABLED and remove HAVE_ZLIB_H macro.

Fixes bug 764657, bug 787041.
2017-11-27 14:33:37 +01:00
J. Peter Mugaas
a4864c2f98 Fix pointer comparison warnings on 64-bit Windows 2017-10-21 14:01:10 +02:00
Nick Wellnhofer
ecbdfa9eb3 Fix unused variable warnings in nanohttp.c
Some variables are only used if certain macros are set. Move the
declarations around.
2017-10-09 14:35:55 +02:00
Nick Wellnhofer
e3890546d7 Fix the Windows header mess
Don't include windows.h and wsockcompat.h from config.h but only when
needed.

Don't define _WINSOCKAPI_ manually. This was apparently done to stop
windows.h from including winsock.h which is a problem if winsock2.h
wasn't included first. But on MinGW, this causes compiler warnings.
Define WIN32_LEAN_AND_MEAN instead which has the same effect.

Always use the compiler-defined _WIN32 macro instead of WIN32.
2017-10-09 14:35:40 +02:00
Nick Wellnhofer
45b0ebdc8d socklen_t is always int on Windows
Define XML_SOCKLEN_T as `int` unconditionally in wsockcompat.h. Fixes
compiler warnings and removes some duplicated code.
2017-10-09 13:57:42 +02:00
Nick Wellnhofer
5b2324b6e0 Don't redefine socket error codes on Windows
Translate WSA error codes instead of blindly redefining POSIX error
codes on Windows. The redefinitions caused warnings in modern Windows
environments, but simply ifdef'ing out the redefinitions seems like
the wrong approach.
2017-10-09 13:49:36 +02:00
Nick Wellnhofer
2cdaaab11c Change preprocessor OS tests to __linux__
"linux" without leading underscores is deprecated and less reliable.
2017-09-14 21:30:51 +02:00
Nick Wellnhofer
629e47e7a2 Fix empty-body warning in nanohttp.c 2017-06-17 14:56:53 +02:00
Daniel Veillard
5dca9eea1b Increase buffer space for port in HTTP redirect support
For https://bugzilla.gnome.org/show_bug.cgi?id=780690

nanohttp.c: the code wrongly assumed a short int port value.
2017-04-07 17:13:28 +02:00
Gaurav Gupta
1811add768 Fix various Missing Null checks
For https://bugzilla.gnome.org/show_bug.cgi?id=732823
2014-07-14 17:50:27 +08:00
Patrick Monnerat
437f4f5977 Use specific macros for portability to OS/400
Some of the entry points for POSIX networking calls in OS/400
differs slightly due to not using const arguments
2013-12-12 15:23:09 +08:00
Denis Pauk
283c83e0d3 run close socket on Solaris, same as we do on other platforms
https://bugzilla.gnome.org/show_bug.cgi?id=705188
2013-09-30 10:51:42 +08:00
Steve Wolf
19d785b5c7 xmlCtxtReadFile doesn't work with literal IPv6 URLs
https://bugzilla.gnome.org/show_bug.cgi?id=694185

RedHat Bug 624626 discusses the new behavior of libxml regarding brackets
around IPv6 addresses.  In earlier versions such as 2.6.27, uri.c stripped the
brackets (e.g. uri->server == "fdf2:1e39:73d1:934e::119"); in the current
version it returns IPv6 addresses with brackets intact (e.g. uri->server
== "[fdf2:1e39:73d1:934e::119]").

Thus in 2.9.0, xmlCtxtReadFile() has a problem when it is passed a URL
containing a literal IPv6 address.  xmlCtxReadFile() and its subroutines pass
uri->server unchanged to getaddrinfo(), which doesn't recognize a bracketed
IPv6 address, so the read fails.

This strips the [ and ] from IPv6 addresses allowing getaddrinfo()
to work properly with such URIs.
2013-02-28 18:22:46 +08:00
Daniel Veillard
f8e3db0445 Big space and tab cleanup
Remove all space before tabs and space and tabs at end of lines.
2012-09-11 13:26:36 +08:00
Daniel Veillard
399aaba14b Remove redundant and ungarded include of resolv.h
For https://bugzilla.gnome.org/show_bug.cgi?id=617053
This broke the build on Interix-6.0
2012-05-11 10:09:32 +08:00
Daniel Veillard
d95b689fd9 Fix portability failure if netdb.h lacks NO_ADDRESS 2012-04-02 17:48:53 +08:00
Daniel Veillard
ac17e5939c Remove two references to u_short 2012-04-02 15:45:13 +08:00
Stefan Kost
dff8d0f726 various: handle return values of write calls 2011-05-21 21:56:50 +03:00
Ozkan Sezer
f99d222316 614087 Fix Socket API usage to allow Windows64 compilation
In Windows 64 a socket is no more represented by an int,
this breaks the nanoftp API and nanoftp/nanohttp, the patch
changes this and fix the API for Win64
Regenerated the XML and documentation as a result too.
2010-11-04 12:08:08 +01:00
spadix
d29a5c8a5c 598785 Fix nanohttp on Windows
* nanohttp.c: the check for socket comparing to FD_SETSIZE introduced in
  bug fix for 559501 breaks on WinSockAPI
2009-10-19 14:03:25 +02:00
Daniel Veillard
594e5dfb48 Chasing dead assignments reported by clang-scan
* SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c
  relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c
  xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations,
  but this led to a few real bugs and some part not yet understood
  (relaxng/interleave)
2009-09-07 14:58:47 +02:00
Daniel Veillard
13cee4e37b Fix a bunch of scan 'dead increments' and cleanup
* HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c
  testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c:
  fix unused variables, or unneeded increments as well as a couple
  of space issues
* runtest.c: check for NULL before calling unlink()
2009-09-05 14:52:55 +02:00
Raphael Prevost
48b60c3c4d 559501 avoid select and use poll for nanohttp
* config.h.in configure.in: detect availability of poll() and poll.h
* nanohttp.c: switch to use poll instead of select() when possible to
  avoid out of fd set memory errors on very large fds
2009-08-23 13:11:01 +02:00
Daniel Veillard
cba68396ac a couple more fixes patch from Andreas Färber to compile on Haiku
* parser.c: a couple more fixes
* nanohttp.c nanoftp.c: patch from Andreas Färber  to compile on Haiku
* doc/examples/*: regenerated
daniel

svn path=/trunk/; revision=3784
2008-08-29 12:43:40 +00:00
William M. Brack
ead3583b47 added space for port number (when not 80) in xmlNanoHTTPMethodRedir, plus
* nanohttp.c: added space for port number (when not 80) in
  xmlNanoHTTPMethodRedir, plus a few more comments. Should
  fix #514521.

svn path=/trunk/; revision=3685
2008-02-06 04:12:46 +00:00
William M. Brack
ec72008ba7 Enhanced to include port number (if not == 80) on the "Header:" URL (bug
* nanohttp.c: Enhanced to include port number (if not == 80) on the
  "Header:" URL (bug #469681).
* xmlregexp.c: Fixed a typo causing a warning message.

svn path=/trunk/; revision=3657
2007-08-24 02:57:38 +00:00
Daniel Veillard
cd2ebab7d9 fix an open() call with creation without 3rd argument hopefully that
* nanohttp.c: fix an open() call with creation without 3rd argument
  hopefully that interface is never used.
Daniel

svn path=/trunk/; revision=3656
2007-08-23 20:47:33 +00:00
William M. Brack
e882765aa4 small enhancement to last fix, pointed out by Alex Cornejo
* nanohttp.c: small enhancement to last fix, pointed out
  by Alex Cornejo

svn path=/trunk/; revision=3617
2007-05-16 05:19:13 +00:00
William M. Brack
d2f682a495 fixed problem on gzip streams (bug #438045) fixed minor spot of redundant
* nanohttp.c: fixed problem on gzip streams (bug #438045)
* xpath.c: fixed minor spot of redundant code - no logic change.

svn path=/trunk/; revision=3616
2007-05-15 19:42:08 +00:00
Daniel Veillard
59d3ed8fe0 applied patch from Andreas Stricke to ease the compilation on Windows CE
* catalog.c libxml.h win32/wince/wincecompat.h win32/wince/wincecompat.c
  xmlIO.c nanohttp.c nanoftp.c trio.c triostr.c triostr.h: applied 
  patch from Andreas Stricke to ease the compilation on Windows CE
Daniel

svn path=/trunk/; revision=3600
2007-04-17 12:44:58 +00:00
Daniel Veillard
9a2724d847 applied patch from Gary Coady to accept gzipped http resources. Daniel
* nanohttp.c: applied patch from Gary Coady to accept gzipped
  http resources.
Daniel
2005-12-15 11:12:26 +00:00
Rob Richards
cb418de04d applied patch from Kolja Nowak to use getaddrinfo() if supported in
* nanohttp.c include/wsockcompat.h: applied patch from Kolja Nowak
  to use getaddrinfo() if supported in Windows build (bug# 317431).
2005-10-13 23:12:42 +00:00
Daniel Veillard
9e2110bbff applied patch from Marcus Boerger to remove warnings on Windows. Daniel
* nanoftp.c nanohttp.c xmlschemastypes.c: applied patch from
  Marcus Boerger to remove warnings on Windows.
Daniel
2005-08-08 20:33:54 +00:00
Daniel Veillard
336a8e13bf get rid of the dependancy on a locally installed DTD try to cleanup the
* test/relaxng/docbook_0.xml: get rid of the dependancy on a locally
  installed DTD
* uri.c include/libxml/uri.h xmlIO.c nanoftp.c nanohttp.c: try to
  cleanup the Path/URI conversion mess, needed fixing in various
  layers and a new API to the uri module which also fixes #306861
* runtest.c: integrated a regression test specific to check the
  URI conversions done before calling the I/O handlers.
Daniel
2005-08-07 10:46:19 +00:00
Daniel Veillard
744acfffe5 fixed bug #310105 with http_proxy environments with patch provided by
* nanohttp.c: fixed bug #310105 with http_proxy environments with
  patch provided by Peter Breitenlohner
Daniel
2005-07-12 15:09:53 +00:00
Daniel Veillard
351f2d6e1a applied patch from Aron Stansvik for bug #172525 about HTTP query string
* nanohttp.c: applied patch from Aron Stansvik for bug #172525
  about HTTP query string parameter being lost
Daniel
2005-04-13 02:55:12 +00:00
Daniel Veillard
5d4644ef6e revamped the elfgcchack.h format to cope with gcc4 change of aliasing
* doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
  format to cope with gcc4 change of aliasing allowed scopes, had
  to add extra informations to doc/libxml2-api.xml to separate
  the header from the c module source.
* *.c: updated all c library files to add a #define bottom_xxx
  and reimport elfgcchack.h thereafter, and a bit of cleanups.
* doc//* testapi.c: regenerated when rebuilding the API
Daniel
2005-04-01 13:11:58 +00:00
Daniel Veillard
c284c64ff9 use XML_SOCKLEN_T instead of SOCKLEN_T since apparently IBM can't avoid
* config.h.in configure.in nanoftp.c nanohttp.c xmllint.c
  macos/src/config-mac.h: use XML_SOCKLEN_T instead of SOCKLEN_T
  since apparently IBM can't avoid breaking common defines #166922
Daniel
2005-03-31 10:24:24 +00:00
William M. Brack
015ccb2c74 This change started out as a simple desire to speed up the
execution time of testapi.c, which was being delayed by
nameserver requests for non-existent URL's.  From there it
just sort of grew, and grew....
* nanohttp.c, nanoftp.c: changed the processing of URL's
  to use the uri.c routines instead of custom code.
* include/libxml/xmlerror.h: added code XML_FTP_URL_SYNTAX
* uri.c: added accepting ipV6 addresses, in accordance with
  RFC's 2732 and 2373 (TODO: allow ipV4 within ipV6)
* gentest.py, testapi.c: fixed a few problems with the
  testing of the nanoftp and nanohttp routines.
* include/libxml/xmlversion.h: minor change to fix a
  warning on the docs generation
* regenerated the docs
2005-02-13 08:18:52 +00:00
Daniel Veillard
8e2c9792e9 second part of the security fix for xmlNanoFTPConnect() and
* nanoftp.c nanohttp.c: second part of the security fix for
  xmlNanoFTPConnect() and xmlNanoHTTPConnectHost().
Daniel
2004-10-27 09:39:50 +00:00
William M. Brack
13dfa87e91 added the routine xmlNanoHTTPContentLength to the external API
* nanohttp.c, include/libxml/nanohttp.h: added the routine
  xmlNanoHTTPContentLength to the external API (bug151968).
* parser.c: fixed unnecessary internal error message (bug152060);
  also changed call to strncmp over to xmlStrncmp.
* encoding.c: fixed compilation warning (bug152307).
* tree.c: fixed segfault in xmlCopyPropList (bug152368); fixed
  a couple of compilation warnings.
* HTMLtree.c, debugXML.c, xmlmemory.c: fixed a few compilation
  warnings; no change to logic.
2004-09-18 04:52:08 +00:00
Daniel Veillard
29b1748205 small typo pointed out by Mike Hommey slightly improved the --c14n
* xmlIO.c: small typo pointed out by Mike Hommey
* doc/xmllint.xml, xmllint.html, xmllint.1: slightly improved
  the --c14n description, c.f. #144675 .
* nanohttp.c nanoftp.c: applied a first simple patch from
  Mike Hommey for $no_proxy, c.f. #133470
* parserInternals.c include/libxml/parserInternals.h
  include/libxml/xmlerror.h: cleanup to avoid 'error' identifier
  in includes #
* parser.c SAX2.c debugXML.c include/libxml/parser.h:
  first version of the inplementation of parsing within
  the context of a node in the tree #142359, new function
  xmlParseInNodeContext(), added support at the xmllint --shell
  level as the "set" function
* test/scripts/set* result/scripts/* Makefile.am: extended
  the script based regression tests to instrument the new function.
Daniel
2004-08-16 00:39:03 +00:00
Daniel Veillard
a2351322c8 hack based on Arjan van de Ven suggestion to reduce ELF footprint and
* elfgcchack.h doc/elfgcchack.xsl libxml.h: hack based on Arjan van de
  Ven suggestion to reduce ELF footprint and generated code. Based on
  aliasing of libraries function to generate direct call instead of
  indirect ones
* doc/libxml2-api.xml doc/Makefile.am doc/apibuild.py: added automatic
  generation of elfgcchack.h based on the API description, extended
  the API description to show the conditionals configuration flags
  required for symbols.
* nanohttp.c parser.c xmlsave.c include/libxml/*.h: lot of cleanup
* doc/*: regenerated the docs.
Daniel
2004-06-27 12:08:10 +00:00
William M. Brack
7e29c0a457 implemented fix for M$ IIS redirect provided by Ian Hummel fixed problem
* nanohttp.c: implemented fix for M$ IIS redirect provided
  by Ian Hummel
* relaxng.c: fixed problem with notAllowed compilation
  (bug 138793)
2004-04-02 09:07:22 +00:00
William M. Brack
20d823614e added a close for the local file descriptor (bug 137474)
* nanohttp.c: added a close for the local file descriptor
  (bug 137474)
2004-03-17 08:44:46 +00:00