Skip to content
Permalink
Browse files
8269131: Update libxml2 to version 2.9.12
Backport-of: 52c076c50f3cab17628db4dd2b1b37cb2d6ce92a
  • Loading branch information
kevinrushforth committed Aug 18, 2021
1 parent 49ff8f6 commit f930bc53384abf051be073ded8ac470859129abd
Showing with 2,772 additions and 2,552 deletions.
  1. +20 −1 modules/javafx.web/src/main/legal/libxml2.md
  2. +0 −6 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/README.javafx
  3. +51 −0 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/UPDATING.txt
  4. +9 −4 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/linux/config.h
  5. +6 −6 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/linux/include/libxml/xmlversion.h
  6. +8 −2 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/mac/config.h
  7. +6 −6 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/mac/include/libxml/xmlversion.h
  8. +108 −108 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/ChangeLog
  9. +604 −507 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/HTMLparser.c
  10. +217 −278 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/HTMLtree.c
  11. +12 −8 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/Makefile.am
  12. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/README
  13. +73 −101 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/SAX2.c
  14. +4 −4 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/TODO
  15. +2 −2 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/buf.c
  16. +6 −0 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/config.h.in
  17. +29 −13 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/configure.ac
  18. +2 −2 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/dict.c
  19. +79 −19 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/encoding.c
  20. +55 −3 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/entities.c
  21. +13 −13 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/error.c
  22. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/globals.c
  23. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/hash.c
  24. +6 −4 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/c14n.h
  25. +9 −7 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/parser.h
  26. +3 −3 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/tree.h
  27. +2 −0 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/xmlIO.h
  28. +39 −115 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/xmlexports.h
  29. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/xmlschemas.h
  30. +2 −2 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/xmlversion.h.in
  31. +1 −3 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/include/libxml/xpath.h
  32. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/libxml.h
  33. +9 −5 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/libxml.m4
  34. +86 −21 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/libxml2-config.cmake.in
  35. +3 −3 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/libxml2.spec
  36. +7 −0 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/libxml2.syms
  37. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/list.c
  38. +3 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/macos/src/XMLTestPrefix.h
  39. +3 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/macos/src/XMLTestPrefix2.h
  40. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/macos/src/libxml2_GUSIConfig.cp
  41. +17 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/macos/src/macos_main.c
  42. +13 −14 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/nanoftp.c
  43. +7 −7 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/nanohttp.c
  44. +336 −390 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/parser.c
  45. +8 −9 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/parserInternals.c
  46. +3 −2 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/threads.c
  47. +52 −22 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/tree.c
  48. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/triodef.h
  49. +3 −3 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/trionan.c
  50. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/trionan.h
  51. +17 −10 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/uri.c
  52. +46 −47 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/valid.c
  53. +5 −0 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/win32/Makefile.msvc
  54. +2 −2 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/win32/Readme.txt
  55. +15 −17 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/win32/configure.js
  56. +42 −27 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/xmlIO.c
  57. +1 −1 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/xmlmemory.c
  58. +28 −33 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/xmlreader.c
  59. +543 −588 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/xmlsave.c
  60. +12 −9 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/xmlstring.c
  61. +130 −107 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/xpath.c
  62. +6 −6 modules/javafx.web/src/main/native/Source/ThirdParty/libxml/win32/include/libxml/xmlversion.h
@@ -1,4 +1,4 @@
## xmlsoft.org: libxml2 v2.9.10
## xmlsoft.org: libxml2 v2.9.12

### libxml2 License
```
@@ -27,4 +27,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=== copyright notices for hash.c, list.c, and the trio files ===
hash.c:
* Copyright (C) 2000,2012 Bjorn Reese and Daniel Veillard.
list.c:
* Copyright (C) 2000 Gary Pennington and Daniel Veillard.
the trio files:
* Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
=== license text for hash.c, list.c, and the trio files ===
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
*
```

This file was deleted.

@@ -0,0 +1,51 @@
Updating libxml in OpenJFX:

1. Download respective libxml source tarball from here: http://xmlsoft.org/sources.
Alternatively we can also clone the libxml repo from github. (url- https://gitlab.gnome.org/GNOME/libxml2.git)

2. Extract contents into `modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src` directory.

3. We do not have any local changes in the libxml source but libxml source needs to be configured before integrating into JavaFX. Below are platform wise steps to configure.

- For windows
4. Configure libxml.
> cd modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src/win32
> cscript configure.js compiler=msvc catalog=no xml_debug=no docb=no ftp=no http=no iconv=no legacy=no mem_debug=no modules=no regexps=no run_debug=no schemas=no schematron=no valid=no xinclude=no xptr=no zlib=no

- Above command generates a header file `libxml\src\include\libxml\xmlversion.h` and may update the `src/config.h` file. (on all platforms)
4.1 Copy `libxml\src\include\libxml\xmlversion.h` to `libxml\win32\include\libxml\xmlversion.h'. xmlversion.h file defines several macros to control libxml features. We do not require all of the features to be enabled. Compare the generated `libxml\src\include\libxml\xmlversion.h` with existing `libxml\win32\include\libxml\xmlversion.h' and retain macro definitions from the later.

4.2 Copy `libxml\src\config.h` to `libxml\win32\config.h`

5. Remove files & directories which are not relevant to JavaFX WebKit.

- For Mac
6. Configure libxml.
> cd modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src
> ./configure

6.1 Copy `libxml\src\include\libxml\xmlversion.h` to `libxml\mac\include\libxml\xmlversion.h` and follow same guidelines as Windows to retain changes from our repo.

6.2 Copy libxml\src\config.h to libxml\mac\config.h

- For Linux
7. Configure libxml.
> cd modules/javafx.web/src/main/native/Source/ThirdParty/libxml/src
> ./configure

7.1 Copy `libxml\src\include\libxml\xmlversion.h` to `libxml\linux\include\libxml\xmlversion.h` and follow same guidelines as Windows to retain changes from our repo.

7.2 Copy libxml\src\config.h to libxml\linux\config.h

8. Helper commands for removing tabs and trailing whitespaces from source files(.h and .c).

8.1 > cd modules/javafx.web/src/main/native/Source/ThirdParty/libxml

8.2 Remove tabs from source files:
> sudo apt install moreutils
> find src/ -name "*.c" -type f -exec bash -c 'expand -t 4 "$0" | sponge "$0"' {} \;
> find src/ -name "*.h" -type f -exec bash -c 'expand -t 4 "$0" | sponge "$0"' {} \;

8.3 Remove trailing whitespaces from source files:
> find src/ -name “*.c” -type f -exec sed --in-place 's/[[:space:]]\+$//' {} \+
> find src/ -name “*.h” -type f -exec sed --in-place 's/[[:space:]]\+$//' {} \+
@@ -1,6 +1,9 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */

/* A form that will not confuse apibuild.py */
#define ATTRIBUTE_DESTRUCTOR __attribute__((destructor))

/* Type cast for the gethostbyname() argument */
#define GETHOSTBYNAME_ARG_CAST /**/

@@ -10,6 +13,9 @@
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#define HAVE_ARPA_NAMESER_H 1

/* Define if __attribute__((destructor)) is accepted */
#define HAVE_ATTRIBUTE_DESTRUCTOR 1

/* Whether struct sockaddr::__ss_family exists */
/* #undef HAVE_BROKEN_SS_FAMILY */

@@ -124,7 +130,7 @@
#define HAVE_RAND 1

/* Define to 1 if you have the `rand_r' function. */

/* #undef HAVE_RAND_R 1 */

/* Define to 1 if you have the <resolv.h> header file. */
#define HAVE_RESOLV_H 1
@@ -230,8 +236,7 @@
/* Define as const if the declaration of iconv() needs const. */
/* #undef ICONV_CONST */

/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"

/* Name of package */
@@ -268,7 +273,7 @@
#define VA_LIST_IS_ARRAY 1

/* Version number of package */
#define VERSION "2.9.10"
#define VERSION "2.9.12"

/* Determine what socket length (socklen_t) data type is */
#define XML_SOCKLEN_T socklen_t
@@ -1,6 +1,6 @@
/*
* Summary: compile-time version informations
* Description: compile-time version informations for the XML library
* Summary: compile-time version information
* Description: compile-time version information for the XML library
*
* Copy: See Copyright for the status of this software.
*
@@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.9.10"
#define LIBXML_DOTTED_VERSION "2.9.12"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 20910
#define LIBXML_VERSION 20912

/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "20910"
#define LIBXML_VERSION_STRING "20912"

/**
* LIBXML_VERSION_EXTRA:
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(20910);
#define LIBXML_TEST_VERSION xmlCheckVersion(20912);

#ifndef VMS
#if 0
@@ -1,6 +1,9 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */

/* A form that will not confuse apibuild.py */
#define ATTRIBUTE_DESTRUCTOR __attribute__((destructor))

/* Type cast for the gethostbyname() argument */
#define GETHOSTBYNAME_ARG_CAST /**/

@@ -10,6 +13,9 @@
/* Define to 1 if you have the <arpa/nameser.h> header file. */
#define HAVE_ARPA_NAMESER_H 1

/* Define if __attribute__((destructor)) is accepted */
#define HAVE_ATTRIBUTE_DESTRUCTOR 1

/* Whether struct sockaddr::__ss_family exists */
/* #undef HAVE_BROKEN_SS_FAMILY */

@@ -124,7 +130,7 @@
#define HAVE_RAND 1

/* Define to 1 if you have the `rand_r' function. */

/* #undef HAVE_RAND_R 1 */

/* Define to 1 if you have the <resolv.h> header file. */
#define HAVE_RESOLV_H 1
@@ -267,7 +273,7 @@
#define VA_LIST_IS_ARRAY 1

/* Version number of package */
#define VERSION "2.9.10"
#define VERSION "2.9.12"

/* Determine what socket length (socklen_t) data type is */
#define XML_SOCKLEN_T socklen_t
@@ -1,6 +1,6 @@
/*
* Summary: compile-time version informations
* Description: compile-time version informations for the XML library
* Summary: compile-time version information
* Description: compile-time version information for the XML library
*
* Copy: See Copyright for the status of this software.
*
@@ -29,21 +29,21 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.9.10"
#define LIBXML_DOTTED_VERSION "2.9.12"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 20910
#define LIBXML_VERSION 20912

/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "20910"
#define LIBXML_VERSION_STRING "20912"

/**
* LIBXML_VERSION_EXTRA:
@@ -58,7 +58,7 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(20910);
#define LIBXML_TEST_VERSION xmlCheckVersion(20912);

#ifndef VMS
#if 0
Loading

1 comment on commit f930bc5

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on f930bc5 Aug 18, 2021

Please sign in to comment.