Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/add support curl8 #90

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

matheusfillipe
Copy link

@matheusfillipe matheusfillipe commented Jan 31, 2025

CHANGES:

  1. Continues work from Bugfix/add support curl8 #89 and solves issue with OPT_IPRESOLVE not being defined.
  2. Fix codegen.py so that it takes the major version into account.
  3. Minor code quality additions to codegen.py
  4. Small fixes to examples/multi_and_select.go

Testing

Testing on a mac with libcurl 8.7.1

This now works:

  • go run ./examples/misc.go
DEBUG chdir=> (0x1009f8798,0x1400011a420)
init =>0x140001220a0 *curl.CURL
dup =>0x14000122140 *curl.CURL
global init =>(0x0,0x0)
version =>libcurl/8.7.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.63.0
XXXX debug setopt "curl: An unknown option was passed in to libcurl"
set timeout =>(0x0,0x0)
set user_agent =>true
set resolve =>true
set opt!
code -> curl: Couldn't connect to server
================================
pause =>(0x1009f86f8,0x100a87678)
escape =>http%3A%2F%2Fbaidu.com%2F
unescape =>http://baidu.com/--\
unescape lenght =>21
VersionInfo: Age: 10, Version:8.7.1, Host:x86_64-apple-darwin24.0, Features:1366229917, SslVer: (SecureTransport) LibreSSL/3.3.6, LibzV: 1.2.12, ssh:
Protocols:dict, file, ftp, ftps, gopher, gophers, http, https, imap, imaps, ldap, ldaps, mqtt, pop3, pop3s, rtsp, smb, smbs, smtp, smtps, telnet, tftp,
2011-10-02 07:05:58 +0000 UTC
================================
================================

This was erroing to me:

  • go run ./examples/multi_and_select.go
# command-line-arguments
examples/multi_and_select.go:33:5: could not determine kind of name for C._FD_SET
cgo:
cc errors for preamble:
examples/multi_and_select.go:9:21: error: expected identifier or '('
    9 | static void _FD_SET(int sysfd, void *set) {
      |                     ^
examples/multi_and_select.go:9:21: error: expected ')'
examples/multi_and_select.go:9:20: note: to match this '('
    9 | static void _FD_SET(int sysfd, void *set) {
      |                 

So I have made some changes to that example and now it works to me (go version go1.23.0 darwin/arm64)

I think some run but don't really test much because they are outdated. Here is the full output for all of them:
examples_output.txt

After Merge

fixes #84

Feedback and help are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

library not supporting curl version 8.0.X or higher
2 participants