32 Commits

Author SHA1 Message Date
Przemysław Czerpak
d677cbb1e9 2025-09-16 13:16 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! pacified warning
2025-09-16 13:16:11 +02:00
Przemysław Czerpak
81be99f647 2025-03-25 13:54 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! pacified warnings

  * contrib/hbssl/ssl.c
  * contrib/hbssl/sslctx.c
    ! use 64-bit integers in SSL_[CTX]_[s|g]et_options() for OpenSSL >= 3.0
2025-03-25 13:54:05 +01:00
Aleksander Czajczynski
1a4c4e6b43 2025-02-21 11:16 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/hbcurl.hbp
    + added Windows architecture specific libcurl names:
      libcurl-x64.dll, libcurl-arm64.dll as suggested
      by @carles9000 in #382
2025-02-21 11:16:08 +01:00
FiveTech Software
e44996d076 required explicit cast 2025-02-11 04:18:39 +01:00
Aleksander Czajczynski
f39adf0370 2025-02-03 10:50 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/core.c
    * formatting, use HB_IT_EVALITEM instead ( HB_IT_BLOCK | HB_IT_SYMBOL )
2025-02-03 10:50:33 +01:00
Aleksander Czajczynski
af085af261 2025-02-03 10:18 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/core.c
    ! reverted static keyword

  * ChangeLog.txt
    ! formatting
2025-02-03 10:17:58 +01:00
Antonio Linares
a6567d2061 HB_CURLOPT_WRITEFUNCTION implemented support 2025-02-03 09:10:08 +01:00
Przemysław Czerpak
06d4e4c6ae 2025-01-30 16:19 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! casting

  * include/hbcompdf.h
    * removed unnecassary parenthesies and indenting

  * src/rtl/errint.c
    * added
         #pragma GCC diagnostic ignored "-Wnull-dereference"

  * src/vm/dlmalloc.c
    - removed
         #pragma GCC diagnostic ignored "-Wnull-dereference"

  * src/vm/fm.c
    + added
         #pragma clang diagnostic ignored "-Wgnu-null-pointer-arithmetic"
         #pragma GCC diagnostic ignored "-Warray-bounds"
         #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
         #pragma GCC diagnostic ignored "-Walloc-size"
2025-01-30 16:19:59 +01:00
Przemysław Czerpak
c114c98743 2025-01-25 12:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! fixed curl_easy_getinfo( <curl>, CURLINFO_CERTINFO, <arg> ) call. The
      argument should be 'struct curl_certinfo **' not 'struct curl_slist **'
2025-01-25 12:08:20 +01:00
Przemysław Czerpak
d59d6d69db 2025-01-25 11:14 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! declare buffer for CURLOPT_ERRORBUFFER as 'char *' instead of
      'unsigned char *', the exact buffer type is chcked in typecheck-gcc.h
      and 'unsigned char *' does not pass this test
    ; QUESTION:
      Why curl_easy_setopt( <pCurl>, HB_CURLOPT_ER_BUFF_SETUP, [<nBufSize>] )
      accepts <nBufSize> parameter?
      Buffer smaller then CURL_ERROR_SIZE means GPF and larger waste of memory.
      The only acceptable value for <nBufSize> is CURL_ERROR_SIZE.
      The allocate buffer should be initialized with '\0' otherwise we will
      have other GPF trap when user call curl_easy_er_buff_get() before any
      error is set. This bug was fixed in CURL 7.60.0.
2025-01-25 11:14:38 +01:00
Aleksander Czajczynski
4a4691653b 2025-01-23 11:47 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/core.c
  * contrib/hbcurl/hbcurl.ch
  * contrib/hbcurl/hbcurl.hbx
    * applied more cleanups, following Viktor Szakats guidance in hisrepo:
      6127603217
      - add `HB_CURLM_ERROR` to indicate error in hbcurl wrapper.
      - replace use of `HB_CURLM_INTERNAL_ERROR` with `HB_CURLM_ERROR`.
      - sync Harbour variable integer sizes with curl ones.
      - tidy up a variable scopes.
      - drop unused variable.
      - omit `hb_ret()` (it's a no-op).
      - formatting.
      - add functions to `hbcurl.hbx`.

    + add curl_ws_send()/curl_ws_recv() - WebSocket connectivity,
      borrowed from Viktor's fork, thanks again!
      2c71a5c940

  * src/rdd/dbcmd.c
    * note about C5.3 and Harbour extensions to
      DBAPPEND( [<lUnlockAll>=.t.] ), thanks Viktor

  * ChangeLog.txt
    ! typos
2025-01-23 11:48:57 +01:00
Przemysław Czerpak
9b70addc1e 2025-01-20 01:00 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/hbcurl.hbx
    ! added missing new functions: curl_easy_er_buff_get() and curl_multi_*()
2025-01-20 01:00:27 +01:00
DIEGO H FAZIO
b1ed85024c 2025-01-16 01:00 UTC+0100 Fazio Diego (diegohfazio gmail.com)
* contrib/hbcurl/hbcurl.ch
    + added HB_CURLOPT_ER_BUFF_SETUP
      curl_easy_setopt( curl, HB_CURLOPT_ER_BUFF_SETUP ) <- Initialize ERRORBUFFER
  * contrib/hbcurl/core.c
    + added PRG functions:
      read error from ERRORBUFFER
      see https://curl.se/libcurl/c/CURLOPT_ERRORBUFFER.html
      curl_easy_er_buff_get( curl ) -> cErrorBuffer
2025-01-17 12:19:53 +01:00
Aleksander Czajczynski
c2870ac7d8 2025-01-07 22:49 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/hbcurl.ch
    * updated HB_CURLOPT_SSL_OPTIONS: HB_CURLSSLOPT_*

    + added HB_CURLMSG_RESP_HANDLE, HB_CURLMSG_RESP_HPOS
      mappings of array elements returned by
      curl_multi_info_read( <hMulti>[, <aHandles> ]) -> <aResults>

  * contrib/hbcurl/core.c
    * adapted @emazv72 contribution from:
      https://github.com/vszakats/hb/pull/344
      Many thanks, it could be useful for managing multiple transfers,
      by extending some kind of Inkey() loop or in many other
      scenarios.

    + added curl lib version guards

    * minor code and code formattings

    + extended function
      curl_multi_info_read( <hMulti>[, <aHandles> ]) -> <aResults>
      with a possibility to return real GC pointer of specific
      transfer related to reported event. <aHandles> should be
      specified if this is expected.

  + contrib/hbcurl/tests/multi.prg
    + demo of the additions
2025-01-07 22:49:07 +01:00
Emanuele Zavallone
60663791e1 2025-01-07 21:43 UTC+0100 Emanuele Zavallone (emanuele.zavallone gmail.com)
* contrib/hbcurl/easy.c
  * contrib/hbcurl/hbcurl.ch
    + added multi interface implementation
2025-01-07 22:47:43 +01:00
Przemysław Czerpak
455484766f 2024-02-10 11:27 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! fixed bad copy & past typo
2024-02-10 11:27:58 +01:00
Przemysław Czerpak
7eec5d2672 2024-02-09 20:56 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
  * contrib/hbcurl/hbcurl.ch
    + added HB_CURLOPT_XFERINFODATA and HB_CURLOPT_XFERINFOFUNCTION
    ! use CURLOPT_XFERINFO* instead of depreciated CURLOPT_PROGRESS*
      to implement HB_CURLOPT_PROGRESSBLOCK
    ! do not use depreciated CURLOPT_RANDOM_FILE and CURLOPT_EGDSOCKET,
      they serve no purpose anymore
    + added macros for new protocols
    + added HB_CURLOPT_PROTOCOLS_STR and HB_CURLOPT_REDIR_PROTOCOLS_STR
    ! use CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR instead
      of depreciated CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS
    * emulate CURLOPT_PROTOCOLS and CURLOPT_REDIR_PROTOCOLS using
      CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR in new curl
      versions
    + added support for HB_CURLOPT_MIMEPOST
    ! use CURLOPT_MIMEPOST to emulate depreciated in new curl versions
      CURLOPT_HTTPPOST
    + added support for HB_CURLOPT_PROXY_SERVICE_NAME
    ! use CURLOPT_PROXY_SERVICE_NAME to emulate depreciated in new curl
      versions CURLOPT_SOCKS5_GSSAPI_SERVICE
    + added HB_CURLINFO_ACTIVESOCKET
    ! use CURLINFO_ACTIVESOCKET instead of depreciated CURLINFO_LASTSOCKET
    + added HB_CURLINFO_SIZE_UPLOAD_T, HB_CURLINFO_SIZE_DOWNLOAD_T,
      HB_CURLINFO_SPEED_DOWNLOAD_T, HB_CURLINFO_SPEED_UPLOAD_T,
      HB_CURLINFO_CONTENT_LENGTH_DOWNLOAD_T and
      HB_CURLINFO_CONTENT_LENGTH_UPLOAD_T
    ! use CURLINFO_*_T actions instead of depreciated ones which operate
      double as file offset and emulate old actions using new ones in
      new curl versions

  * contrib/hbssl/evp.c
    ! Do no use EVP_cleanup() in OpenSSL 1.1.0 and newer.
      It no longer has any effect.

  * contrib/hbssl/hbssl.h
    * set OPENSSL_API_COMPAT to 1.2.0 to pacify OpenSSL 3.0 API.
      It hides OpenSSL 3.0 warnings but we should update the code to use
      new suggested API.

  * contrib/hbwin/olecore.c
    ! invoke assign methods with DISPATCH_PROPERTYPUTREF instead of
      DISPATCH_PROPERTYPUT if assigned value is OLE object. If such
      functionality is not implemented by the object (some OLE
      implementations do not support it and returns DISP_E_MEMBERNOTFOUND)
      then call it again but in previous form with DISPATCH_PROPERTYPUT

  * include/hbapirdd.h
  * src/rdd/dbcmd.c
    ! fixed error codes set by DbSetRelations() to be Cl*pper compatible

  * src/rdd/dbcmd.c
    + accept symbol items in Select() and DbSelectArea() just like in
      ( <alias> ) -> <exp>

  * include/hbcompdf.h
  * include/hbexprb.c
  * src/common/funcid.c
    + added compile time optimization for Select() function without parameters
    + added compile time optimization DbSelectArea( <nNum> | <sSym> )
    + added support for hb_PIsByRef( @localVarName ) -> <lPassedByRef>
      When the parameter is passed by reference Harbour verifies if it's
      existing local variable and change it to its index in parameter list
      so effectively it works like hb_IsByRef( @localVarName ) in xHarbour

  * contrib/xhb/hbcompat.ch
    + added translations for
      hb_PIsByRef( @<localVar> ) <=> hb_IsByRef( @<localVar> )
2024-02-09 20:56:36 +01:00
Lailton Fernando Mariano
8cce53b389 2023-01-17 13:00 UTC-0300 Lailton Fernando Mariano (lailton/at/paysoft.com.br)
* contrib/hbcurl/hbcurl.hbm
  * contrib/hbssl/hbssl.hbm
    * updated system include path for new Linux distributions
2023-01-17 13:01:36 -03:00
Przemysław Czerpak
2b405dd35b 2022-11-11 21:15 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! use hb_vmPushString() instead of hb_vmPushStringPcode()
      hb_vmPushStringPcode() is only for static buffer which cannot be freed.
      Variables passed to PRG debug functions can be stored by PRG code in
      other variables which lives longer then passed buffer and later cause
      GPF when curls structure is freed.
    ! indenting
2022-11-11 21:16:00 +01:00
Aleksander Czajczynski
9796e3a16e 2022-11-07 09:24 UTC+0100 Aleksander Czajczynski (hb fki.pl)
* contrib/hbcurl/core.c
    ! CURLOPT_MAXLIFETIME_CONN is available in curl 7.80.0,
      fix older builds by adding a version check

  * ChangeLog.txt
    * entry for previous merge was "old" (i wouldn't touch
      it alone), but it also had paths with backslashes
      in place of slashes
2022-11-07 09:25:04 +01:00
Antonino Perricone
ea5f8f72ac 2022-05-03 08:45 UTC+0200 Antonino Perricone
* contrib\hbcurl\hbcurl.ch
  * contrib\hbcurl\core.c
    + added HB_CURLOPT_MAXLIFETIME_CONN to setup max lifetime of connection
      see https://curl.se/libcurl/c/CURLOPT_MAXLIFETIME_CONN.html for more 
      information.

2022-05-02 08:38 UTC+0200 Antonino Perricone
  * contrib\hbcurl\core.c
    + added HB_CURLOPT_DEBUGBLOCK to setup a block for debug information
      It takes a callback in the form of {|type, msg| ... }
      see https://curl.se/libcurl/c/CURLOPT_DEBUGFUNCTION.html for more 
      information.
  * contrib\hbcurl\hbcurl.ch
    + added HB_CURLINFOTYPE_* macros for debug block
2022-10-25 05:07:01 +02:00
Przemysław Czerpak
d6635555e6 2022-10-17 20:13 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/hbcurl.hbm
    * updated system include path for new Linux distributions
2022-10-17 20:13:22 +02:00
Maurizio la Cecilia
039fb78b46 2018-12-29 19:36 UTC+0100 Maurizio la Cecilia (m.lacecilia/at/gmail.com)
* contrib/hbssl/hbssl.hbp
    * added import libraries to link with OpenSSL current version
  * contrib/hbcurl/hbcurl.hbp
    * added import libraries to link with cUrl current version
  * contrib/hbwin/wapi_winuser_1.c
  * contrib/hbwin/hbwin.hbx
    * added wapi_ShowWindow() wrapper
2018-12-29 19:36:53 +01:00
Viktor Szakats
d55bdd18b7 2017-09-07 08:38 UTC Viktor Szakats (vszakats users.noreply.github.com)
* contrib/hbct/charsprd.c
  * contrib/hbct/dattime3.c
  * contrib/hbct/expand.c
  * contrib/hbct/misc2.c
  * contrib/hbct/screen2.c
  * contrib/hbcurl/core.c
  * contrib/hbfship/strpeek.c
  * contrib/hbnetio/netiocli.c
  * contrib/hbwin/olecore.c
  * contrib/rddads/adsx.c
  * contrib/rddads/rddads.h
  * contrib/rddsql/sqlmix.c
  * contrib/sddmy/core.c
  * contrib/sddpg/core.c
  * contrib/xhb/hbcompat.h
  * contrib/xhb/hbxml.c
  * contrib/xhb/xhb.h
  * src/common/hbstr.c
  * src/compiler/harbour.y
  * src/compiler/harbour.yyc
  * src/compiler/hbcmplib.c
  * src/macro/macrolex.c
  * src/rdd/dbffpt/dbffpt1.c
  * src/rdd/hbsix/sxcompr.c
  * src/rdd/hbsix/sxcrypt.c
  * src/rdd/hbsix/sxtable.c
  * src/rdd/hsx/hsx.c
  * src/rtl/cdpapi.c
  * src/rtl/gtcrs/gtcrs.c
  * src/rtl/gtxwc/gtxwc.c
  * src/rtl/hbtoken.c
  * src/rtl/net.c
  * src/rtl/netusr.c
  * src/vm/hvm.c
    * update HB_SIZE variable name prefixes to use `n` instead of `ul`
    % adjust some variables
    % sync variables scopes and some other minor things with 3.4 fork
2017-09-07 08:39:50 +00:00
Viktor Szakats
9f16c2bf8e 2017-08-13 18:27 UTC Viktor Szakats (vszakats users.noreply.github.com)
* *
    * update copyright headers with new FSF postal address
    * COPYING.txt -> LICENSE.txt (rest of repo to be synced)
2017-08-13 18:38:59 +00:00
Viktor Szakats
58faf91453 2016-01-14 19:17 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* *
    % remove brandings and homepage [1] from copyright header. Pass 1 - using script.
      [1] nobody has access to it anymore AFAIK - and it's also just
          a redirect since long
    ! update url in copyright header
    ; this should make the diff between 3.4 and 3.2 easier to manage
2016-01-14 19:18:17 +01:00
Przemysław Czerpak
2dff2df00e 2014-09-23 13:18 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* contrib/hbcurl/core.c
    ! added protection against operation on NULL pointers borrowed from
      Viktor's branch.
2014-09-23 13:18:53 +02:00
Przemysław Czerpak
7349602fcb 2014-04-01 12:33 UTC+0200 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/filebuf.c
    ! unlock HVM stack before locking local mutex and calling hb_fs*()
      functions which also unlocks HVM. It fixes possible deadlock condition
      when hb_gcAll( .T. ) is executed.

  * include/hbapi.h
  * src/vm/garbage.c
    ! changed mark function semantic.
      Adding support for user defined mark function I created race condition
      in MT GC code. It happens because blocks marked as deleted were not
      scanned by GC mark code so their subitems where not accessible.
      To fix it we have to change mark function semantic. Now mark function
      can be executed also for blocks currently deleted. It means that GC
      block destructor should clean references to just removed items and
      subblocks. The best place to make it is clearing pointers to GC blocks
      just after hb_itemRelease() or hb_gcRefFree().
      It is save to clean the reference just before hb_itemRelease() or
      hb_gcRefFree() but only for the single block passed to these functions.
      It is not save to clear reference to more then one block and then
      execute above functions.
    + check reference count after destructor execution for all blocks
      not only arrays - warning it may exploit some wrong C code.
    - removed not longer used hb_gcRefCheck() function.

  * include/hbvm.h
  * src/vm/hvm.c
    + added new internal function hb_vmLockForce()
    ! fixed to mark GC blocks with active threads

  * src/vm/thread.c
  * include/hbthread.h
    % modified sync mutexes used by xBase++ signal class emulation
      to not use item array internally
    * updated mutex destructor to new GC mark semantic
    ! mark GT items if GT is bound with thread item
    ! fixed mutex notify/subscribe code to not change GC items
      when HVM stack is unlocked
    ! use hb_vmLockForce() to eliminate potential deadlock
    + added new C function hb_threadEnterCriticalSectionGC().
      It should be used instead of hb_threadEnterCriticalSection()
      in code which manipulates GC items inside critical section.
      It's slower but eliminates possible deadlock condition.
      Please remember that remember that both functions cannot
      be used for the same mutex. So if it's necessary to use
      hb_threadEnterCriticalSectionGC() in one place then it
      has to be used in all others when the same mutex is locked.

  * src/vm/arrays.c
  * src/vm/codebloc.c
  * src/vm/hashes.c
  * src/rtl/hbgtcore.c
  * contrib/hbcurl/core.c
  * contrib/hbexpat/core.c
    * updated destructors to new GC mark semantic

  * contrib/hbxpp/dllx.c
    ! fixed destructor for pointer item created by DllPrepareCall()
      Now it respects reference counter.
    ; added note about real behavior of library handle destructor,
      I haven't changed existing code behavior but maybe it should
      be done.

  * contrib/xhb/hbserv.c
  * src/debug/dbgentry.c
  * src/rdd/wacore.c
    ! fixed possible deadlocks by using hb_threadEnterCriticalSectionGC()
      instead of hb_threadEnterCriticalSection().

  * contrib/hbmemio/memio.c
    ! slightly modified hb_memfsDirectory() code to avoid race condition
      without using hb_threadEnterCriticalSectionGC()

  * src/vm/fm.c
    % reduce the lock range in HB_FM_STAT builds

  * src/rtl/hbsocket.c
    ! added missing HVM stack unlocking in hb_socketSelect() function

  * src/rtl/gtxwc/gtxwc.c
    ! added few missing locks for version compiled with HB_XWC_XLIB_NEEDLOCKS

  * src/rdd/dbtotal.prg
    * allow to use symbols instead of codeblocks
    * modified Harbour extension which uses ordKey() as default group
      signature to work also without index. In such case all records
      are summarized into single one.

  ; Most of above modifications were critical for stability of MT programs.
    They should allow to activate GC in any place.
2014-04-01 12:33:17 +02:00
Przemysław Czerpak
96ca3fe470 2014-01-21 20:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* Makefile
  * config/*
  * contrib/*
  * doc/*
  * extras/*
  * include/*
  * lib/*
  * package/*
  * src/*
  * tests/*
  * utils/*
    * removed empty lines left after removed '$' + 'Id' + '$' identifiers
2014-01-21 20:41:05 +01:00
Viktor Szakáts
6752936b57 use web url instead of obfuscated email 2013-10-09 20:08:24 +02:00
vszakats
9687850865 2013-03-16 02:10 UTC+0100 Viktor Szakats (harbour syenar.net)
* (all files)
    * stripped svn header
    * minor cleanups
    ; use following command to find out the history of files:
       git log
       git log --follow
       git blame
       git annotate
2013-03-16 02:11:42 +01:00
vszakats
a4a357a18b 2013-03-15 11:12 UTC+0100 Viktor Szakats (harbour syenar.net)
* /harbour/* -> /*
    * moved whole Harbour source tree one level up to
      avoid single 'harbour' top dir
2013-03-15 11:13:30 +01:00