Hi Karl,
Not sure about create() and thread safety... since forever I
have been adding a -D_REENTRANT flag to ALL builds, unix & w32...
do I need to add/do anything else? ... have had no trouble
using pthreads in other projects... did just recently update
to ptw32 v.3.0.0... which required a minor CMakeLists.txt change, below...
But anyway did a fetch and rebase to your latest... 1 minor clash...
easily fixed... and the new EXE ran like hell was on fire... with
b www.nasa.gov... lots of downloads, it seems... until it reached
another exception... but different...
In append0(), after many times thru, lots of threads created,
Run-Time Check Failure #2 - Stack around the variable 'e' was corrupted.
This is a stack char e[40], and on inspection after the exception,
contains a string "l{a|000002CDF3254928,#document-fragment "...
The fact that at that moment the buffer ends in a space, 0x20, and
not a null, from sprintf(...) might indicate an overrun... inc'd to 80...
got to native_insbf, with same e[40]... bumped to 80... then
native_removeChild()...
and I got to the end of the load...
3055
Testing done -
=
191
,p
and got many lines, many of the form '* {...text...}'... some
text like 'h3 Latest NASA Information on Hurricane Dorian... etc...' ...
it looks good...
What to test next? but out of time tonight...
This is very good news, I think... will test more, and
report soonest...
Some other noted items -
1. In w32, using jsdb got an output like
download in background not available on Windows at this time.
Huh? Is that not what pthreads gives us... do not understand...
2. decided to build in ubuntu, but on trying to run ./edbrowse, got -
.ebrc: SSL certificate file /etc/ssl/certs/ComSign_CA.pem does not exist
or is not readable.
edbrowse ready
b www.nasa.gov
the curl library returned the following error message while performing
the requested operation: Problem with the SSL CA cert (path? access rights?)
Any help with that appreciated... How can I add what is missing?
3. In unix build, found I had to add pthreads, under unix...
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5457acd..c0fac06 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -165,9 +165,14 @@ if (WIN32)
message( FATAL_ERROR "*** Thread libray NOT FOUND!" )
endif()
else ()
- message( FATAL "*** Threads NOT FOUNDunable to proceed")
+ message( FATAL_ERROR "*** Threads NOT FOUND! Unable to proceed")
endif ()
endif ()
+if (UNIX)
+ find_package(Threads REQUIRED)
+ list(APPEND add_LIBS ${CMAKE_THREAD_LIBS_INIT})
+ message(STATUS "*** list(APPEND add_LIBS ${CMAKE_THREAD_LIBS_INIT})" )
+endif ()
if (BUILD_EDBR_ODBC) # if the user OPTION ON
# This module defines
4. Also a small Windows change for CMakeLists.txt, for pthreads update
to 3.0.0...
remove the kludge of defining HAVE_STRUCT_TIMESPEC, since the ptw32 now
take care
of that...
And of course the question why such small fixed buffers like e[40], in
jseng-duk.c.
Anything wrong with making this 80, or something... maybe snprintf
instead...
Regards, Geoff.