libreoffice-online/wasm/poco-no-special-expat-sauce.diff

55 lines
1.4 KiB
Diff
Raw Normal View History

--- /tmp/poco-poco-1.12.4-release/XML/src/xmlparse.cpp 2022-10-31 19:41:19.000000000 +0200
+++ XML/src/xmlparse.c 2022-12-14 12:50:31.845361409 +0200
@@ -84,10 +84,7 @@
#define EXPAT_POCO 1
-#if defined(EXPAT_POCO)
-# include "Poco/RandomStream.h"
-# include "Poco/BinaryReader.h"
-#elif defined(_WIN32)
+#ifdef _WIN32
# define getpid GetCurrentProcessId
#else
# include <sys/time.h> /* gettimeofday() */
@@ -746,8 +743,6 @@
'\0'};
-#if ! defined(EXPAT_POCO)
-
/* To avoid warnings about unused functions: */
#if ! defined(HAVE_ARC4RANDOM_BUF) && ! defined(HAVE_ARC4RANDOM)
@@ -901,8 +896,6 @@
#endif /* ! defined(HAVE_ARC4RANDOM_BUF) && ! defined(HAVE_ARC4RANDOM) */
-#endif /* ! defined(EXPAT_POCO) */
-
static unsigned long
ENTROPY_DEBUG(const char *label, unsigned long entropy) {
if (getDebugLevel("EXPAT_ENTROPY_DEBUG", 0) >= 1u) {
@@ -916,12 +909,7 @@
generate_hash_secret_salt(XML_Parser parser) {
unsigned long entropy;
(void)parser;
-#if defined(EXPAT_POCO)
- Poco::RandomInputStream rstr;
- Poco::BinaryReader rrdr(rstr);
- rrdr >> entropy;
- return ENTROPY_DEBUG("RandomInputStream", entropy);
-#else
+
/* "Failproof" high quality providers: */
#if defined(HAVE_ARC4RANDOM_BUF)
arc4random_buf(&entropy, sizeof(entropy));
@@ -958,7 +946,6 @@
entropy * (unsigned long)2305843009213693951ULL);
}
#endif
-#endif /* defined(EXPAT_POCO) */
}
static unsigned long