Skip to content

Commit

Permalink
fix-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnimuc committed Apr 29, 2021
1 parent bd35310 commit 1bbc089
Show file tree
Hide file tree
Showing 14 changed files with 187 additions and 185 deletions.
8 changes: 5 additions & 3 deletions src/LibCURL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,27 @@ elseif Sys.iswindows() && Sys.ARCH === :x86_64
include("wrappers/x86_64-w64-mingw32.jl")
end

# curl_easy_getinfo, curl_easy_setopt, and curl_multi_setopt are vararg C functions
# curl_share_setopt, curl_easy_getinfo, curl_easy_setopt, and curl_multi_setopt are vararg C functions
curl_share_setopt(handle, opt, param) = ccall((:curl_share_setopt, libcurl), CURLSHcode, (Ptr{CURLSH}, CURLSHoption, Any...), handle, opt, param)

curl_easy_setopt(handle, opt, ptrval::Array{T}) where T = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{T}...), handle, opt, ptrval)
curl_easy_setopt(handle, opt, ptrval::Integer) = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Clong...), handle, opt, ptrval)
curl_easy_setopt(handle, opt, ptrval::Ptr{T}) where {T} = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{T}...), handle, opt, ptrval)
curl_easy_setopt(handle, opt, ptrval::AbstractString) = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{UInt8}...), handle, opt, ptrval)
curl_easy_setopt(handle, opt, param) = ccall((:curl_easy_setopt, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Any...), handle, opt, param)

curl_multi_setopt(handle, opt, ptrval::Array{T}) where T = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Ptr{T}...), handle, opt, ptrval)
curl_multi_setopt(handle, opt, ptrval::Integer) = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Clong...), handle, opt, ptrval)
curl_multi_setopt(handle, opt, ptrval::Ptr{T}) where {T} = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Ptr{T}...), handle, opt, ptrval)
curl_multi_setopt(handle, opt, ptrval::AbstractString) = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Ptr{UInt8}...), handle, opt, ptrval)
curl_multi_setopt(multi_handle, opt, param) = ccall((:curl_multi_setopt, libcurl), CURLMcode, (Ptr{CURLM}, CURLMoption, Any...), multi_handle, opt, param)

curl_easy_getinfo(handle, opt, ptrval::Array{T}) where T = ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{T}...), handle, opt, ptrval)
curl_easy_getinfo(handle, opt, ptrval::AbstractString) = ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLoption, Ptr{UInt8}...), handle, opt, ptrval)
curl_easy_getinfo(handle, info, arg) = ccall((:curl_easy_getinfo, libcurl), CURLcode, (Ptr{CURL}, CURLINFO, Any...), handle, info, arg)

include("Mime_ext.jl")



# exports
const PREFIXES = ["curl_", "CURLOPT_", "CURLFORM_", "CURLE_", "CURLINFO_", "CURLSSH_", "CURLAUTH_", "CURLM", "CURL"]
foreach(names(@__MODULE__; all=true)) do s
Expand Down
28 changes: 14 additions & 14 deletions src/wrappers/aarch64-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ const CURL_FORMAT_CURL_OFF_TU = "lu"

const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t

# Skipping MacroDefinition: CURL_SOCKET_BAD - 1
const CURL_SOCKET_BAD = -1

const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL

Expand Down Expand Up @@ -1697,33 +1697,33 @@ const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40

const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72

# Skipping MacroDefinition: CURLAUTH_NONE ( ( unsigned long ) 0 )
const CURLAUTH_NONE = Culong(0)

# Skipping MacroDefinition: CURLAUTH_BASIC ( ( ( unsigned long ) 1 ) << 0 )
const CURLAUTH_BASIC = Culong(1) << 0

# Skipping MacroDefinition: CURLAUTH_DIGEST ( ( ( unsigned long ) 1 ) << 1 )
const CURLAUTH_DIGEST = Culong(1) << 1

# Skipping MacroDefinition: CURLAUTH_NEGOTIATE ( ( ( unsigned long ) 1 ) << 2 )
const CURLAUTH_NEGOTIATE = Culong(1) << 2

const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE

const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE

# Skipping MacroDefinition: CURLAUTH_NTLM ( ( ( unsigned long ) 1 ) << 3 )
const CURLAUTH_NTLM = Culong(1) << 3

# Skipping MacroDefinition: CURLAUTH_DIGEST_IE ( ( ( unsigned long ) 1 ) << 4 )
const CURLAUTH_DIGEST_IE = Culong(1) << 4

# Skipping MacroDefinition: CURLAUTH_NTLM_WB ( ( ( unsigned long ) 1 ) << 5 )
const CURLAUTH_NTLM_WB = Culong(1) << 5

# Skipping MacroDefinition: CURLAUTH_BEARER ( ( ( unsigned long ) 1 ) << 6 )
const CURLAUTH_BEARER = Culong(1) << 6

# Skipping MacroDefinition: CURLAUTH_ONLY ( ( ( unsigned long ) 1 ) << 31 )
const CURLAUTH_ONLY = Culong(1) << 31

# Skipping MacroDefinition: CURLAUTH_ANY ( ~ CURLAUTH_DIGEST_IE )
const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE

# Skipping MacroDefinition: CURLAUTH_ANYSAFE ( ~ ( CURLAUTH_BASIC | CURLAUTH_DIGEST_IE ) )
const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)

# Skipping MacroDefinition: CURLSSH_AUTH_ANY ~ 0
const CURLSSH_AUTH_ANY = ~0

const CURLSSH_AUTH_NONE = 0

Expand Down Expand Up @@ -1847,7 +1847,7 @@ const CURLPROTO_SMBS = 1 << 27

const CURLPROTO_MQTT = 1 << 28

# Skipping MacroDefinition: CURLPROTO_ALL ( ~ 0 )
const CURLPROTO_ALL = ~0

const CURLOPTTYPE_LONG = 0

Expand Down
28 changes: 14 additions & 14 deletions src/wrappers/aarch64-linux-musl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ const CURL_FORMAT_CURL_OFF_TU = "lu"

const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t

# Skipping MacroDefinition: CURL_SOCKET_BAD - 1
const CURL_SOCKET_BAD = -1

const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL

Expand Down Expand Up @@ -1691,33 +1691,33 @@ const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40

const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72

# Skipping MacroDefinition: CURLAUTH_NONE ( ( unsigned long ) 0 )
const CURLAUTH_NONE = Culong(0)

# Skipping MacroDefinition: CURLAUTH_BASIC ( ( ( unsigned long ) 1 ) << 0 )
const CURLAUTH_BASIC = Culong(1) << 0

# Skipping MacroDefinition: CURLAUTH_DIGEST ( ( ( unsigned long ) 1 ) << 1 )
const CURLAUTH_DIGEST = Culong(1) << 1

# Skipping MacroDefinition: CURLAUTH_NEGOTIATE ( ( ( unsigned long ) 1 ) << 2 )
const CURLAUTH_NEGOTIATE = Culong(1) << 2

const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE

const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE

# Skipping MacroDefinition: CURLAUTH_NTLM ( ( ( unsigned long ) 1 ) << 3 )
const CURLAUTH_NTLM = Culong(1) << 3

# Skipping MacroDefinition: CURLAUTH_DIGEST_IE ( ( ( unsigned long ) 1 ) << 4 )
const CURLAUTH_DIGEST_IE = Culong(1) << 4

# Skipping MacroDefinition: CURLAUTH_NTLM_WB ( ( ( unsigned long ) 1 ) << 5 )
const CURLAUTH_NTLM_WB = Culong(1) << 5

# Skipping MacroDefinition: CURLAUTH_BEARER ( ( ( unsigned long ) 1 ) << 6 )
const CURLAUTH_BEARER = Culong(1) << 6

# Skipping MacroDefinition: CURLAUTH_ONLY ( ( ( unsigned long ) 1 ) << 31 )
const CURLAUTH_ONLY = Culong(1) << 31

# Skipping MacroDefinition: CURLAUTH_ANY ( ~ CURLAUTH_DIGEST_IE )
const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE

# Skipping MacroDefinition: CURLAUTH_ANYSAFE ( ~ ( CURLAUTH_BASIC | CURLAUTH_DIGEST_IE ) )
const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)

# Skipping MacroDefinition: CURLSSH_AUTH_ANY ~ 0
const CURLSSH_AUTH_ANY = ~0

const CURLSSH_AUTH_NONE = 0

Expand Down Expand Up @@ -1841,7 +1841,7 @@ const CURLPROTO_SMBS = 1 << 27

const CURLPROTO_MQTT = 1 << 28

# Skipping MacroDefinition: CURLPROTO_ALL ( ~ 0 )
const CURLPROTO_ALL = ~0

const CURLOPTTYPE_LONG = 0

Expand Down
28 changes: 14 additions & 14 deletions src/wrappers/armv7l-linux-gnueabihf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ const CURL_FORMAT_CURL_OFF_TU = "llu"

const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t

# Skipping MacroDefinition: CURL_SOCKET_BAD - 1
const CURL_SOCKET_BAD = -1

const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL

Expand Down Expand Up @@ -1697,33 +1697,33 @@ const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40

const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72

# Skipping MacroDefinition: CURLAUTH_NONE ( ( unsigned long ) 0 )
const CURLAUTH_NONE = Culong(0)

# Skipping MacroDefinition: CURLAUTH_BASIC ( ( ( unsigned long ) 1 ) << 0 )
const CURLAUTH_BASIC = Culong(1) << 0

# Skipping MacroDefinition: CURLAUTH_DIGEST ( ( ( unsigned long ) 1 ) << 1 )
const CURLAUTH_DIGEST = Culong(1) << 1

# Skipping MacroDefinition: CURLAUTH_NEGOTIATE ( ( ( unsigned long ) 1 ) << 2 )
const CURLAUTH_NEGOTIATE = Culong(1) << 2

const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE

const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE

# Skipping MacroDefinition: CURLAUTH_NTLM ( ( ( unsigned long ) 1 ) << 3 )
const CURLAUTH_NTLM = Culong(1) << 3

# Skipping MacroDefinition: CURLAUTH_DIGEST_IE ( ( ( unsigned long ) 1 ) << 4 )
const CURLAUTH_DIGEST_IE = Culong(1) << 4

# Skipping MacroDefinition: CURLAUTH_NTLM_WB ( ( ( unsigned long ) 1 ) << 5 )
const CURLAUTH_NTLM_WB = Culong(1) << 5

# Skipping MacroDefinition: CURLAUTH_BEARER ( ( ( unsigned long ) 1 ) << 6 )
const CURLAUTH_BEARER = Culong(1) << 6

# Skipping MacroDefinition: CURLAUTH_ONLY ( ( ( unsigned long ) 1 ) << 31 )
const CURLAUTH_ONLY = Culong(1) << 31

# Skipping MacroDefinition: CURLAUTH_ANY ( ~ CURLAUTH_DIGEST_IE )
const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE

# Skipping MacroDefinition: CURLAUTH_ANYSAFE ( ~ ( CURLAUTH_BASIC | CURLAUTH_DIGEST_IE ) )
const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)

# Skipping MacroDefinition: CURLSSH_AUTH_ANY ~ 0
const CURLSSH_AUTH_ANY = ~0

const CURLSSH_AUTH_NONE = 0

Expand Down Expand Up @@ -1847,7 +1847,7 @@ const CURLPROTO_SMBS = 1 << 27

const CURLPROTO_MQTT = 1 << 28

# Skipping MacroDefinition: CURLPROTO_ALL ( ~ 0 )
const CURLPROTO_ALL = ~0

const CURLOPTTYPE_LONG = 0

Expand Down
28 changes: 14 additions & 14 deletions src/wrappers/armv7l-linux-musleabihf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ const CURL_FORMAT_CURL_OFF_TU = "llu"

const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t

# Skipping MacroDefinition: CURL_SOCKET_BAD - 1
const CURL_SOCKET_BAD = -1

const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL

Expand Down Expand Up @@ -1691,33 +1691,33 @@ const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40

const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72

# Skipping MacroDefinition: CURLAUTH_NONE ( ( unsigned long ) 0 )
const CURLAUTH_NONE = Culong(0)

# Skipping MacroDefinition: CURLAUTH_BASIC ( ( ( unsigned long ) 1 ) << 0 )
const CURLAUTH_BASIC = Culong(1) << 0

# Skipping MacroDefinition: CURLAUTH_DIGEST ( ( ( unsigned long ) 1 ) << 1 )
const CURLAUTH_DIGEST = Culong(1) << 1

# Skipping MacroDefinition: CURLAUTH_NEGOTIATE ( ( ( unsigned long ) 1 ) << 2 )
const CURLAUTH_NEGOTIATE = Culong(1) << 2

const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE

const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE

# Skipping MacroDefinition: CURLAUTH_NTLM ( ( ( unsigned long ) 1 ) << 3 )
const CURLAUTH_NTLM = Culong(1) << 3

# Skipping MacroDefinition: CURLAUTH_DIGEST_IE ( ( ( unsigned long ) 1 ) << 4 )
const CURLAUTH_DIGEST_IE = Culong(1) << 4

# Skipping MacroDefinition: CURLAUTH_NTLM_WB ( ( ( unsigned long ) 1 ) << 5 )
const CURLAUTH_NTLM_WB = Culong(1) << 5

# Skipping MacroDefinition: CURLAUTH_BEARER ( ( ( unsigned long ) 1 ) << 6 )
const CURLAUTH_BEARER = Culong(1) << 6

# Skipping MacroDefinition: CURLAUTH_ONLY ( ( ( unsigned long ) 1 ) << 31 )
const CURLAUTH_ONLY = Culong(1) << 31

# Skipping MacroDefinition: CURLAUTH_ANY ( ~ CURLAUTH_DIGEST_IE )
const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE

# Skipping MacroDefinition: CURLAUTH_ANYSAFE ( ~ ( CURLAUTH_BASIC | CURLAUTH_DIGEST_IE ) )
const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)

# Skipping MacroDefinition: CURLSSH_AUTH_ANY ~ 0
const CURLSSH_AUTH_ANY = ~0

const CURLSSH_AUTH_NONE = 0

Expand Down Expand Up @@ -1841,7 +1841,7 @@ const CURLPROTO_SMBS = 1 << 27

const CURLPROTO_MQTT = 1 << 28

# Skipping MacroDefinition: CURLPROTO_ALL ( ~ 0 )
const CURLPROTO_ALL = ~0

const CURLOPTTYPE_LONG = 0

Expand Down
28 changes: 14 additions & 14 deletions src/wrappers/i686-linux-gnu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ const CURL_FORMAT_CURL_OFF_TU = "llu"

const CURL_TYPEOF_CURL_SOCKLEN_T = socklen_t

# Skipping MacroDefinition: CURL_SOCKET_BAD - 1
const CURL_SOCKET_BAD = -1

const CURLSSLBACKEND_LIBRESSL = CURLSSLBACKEND_OPENSSL

Expand Down Expand Up @@ -1697,33 +1697,33 @@ const CURLOPT_WRITEINFO = CURLOPT_OBSOLETE40

const CURLOPT_CLOSEPOLICY = CURLOPT_OBSOLETE72

# Skipping MacroDefinition: CURLAUTH_NONE ( ( unsigned long ) 0 )
const CURLAUTH_NONE = Culong(0)

# Skipping MacroDefinition: CURLAUTH_BASIC ( ( ( unsigned long ) 1 ) << 0 )
const CURLAUTH_BASIC = Culong(1) << 0

# Skipping MacroDefinition: CURLAUTH_DIGEST ( ( ( unsigned long ) 1 ) << 1 )
const CURLAUTH_DIGEST = Culong(1) << 1

# Skipping MacroDefinition: CURLAUTH_NEGOTIATE ( ( ( unsigned long ) 1 ) << 2 )
const CURLAUTH_NEGOTIATE = Culong(1) << 2

const CURLAUTH_GSSNEGOTIATE = CURLAUTH_NEGOTIATE

const CURLAUTH_GSSAPI = CURLAUTH_NEGOTIATE

# Skipping MacroDefinition: CURLAUTH_NTLM ( ( ( unsigned long ) 1 ) << 3 )
const CURLAUTH_NTLM = Culong(1) << 3

# Skipping MacroDefinition: CURLAUTH_DIGEST_IE ( ( ( unsigned long ) 1 ) << 4 )
const CURLAUTH_DIGEST_IE = Culong(1) << 4

# Skipping MacroDefinition: CURLAUTH_NTLM_WB ( ( ( unsigned long ) 1 ) << 5 )
const CURLAUTH_NTLM_WB = Culong(1) << 5

# Skipping MacroDefinition: CURLAUTH_BEARER ( ( ( unsigned long ) 1 ) << 6 )
const CURLAUTH_BEARER = Culong(1) << 6

# Skipping MacroDefinition: CURLAUTH_ONLY ( ( ( unsigned long ) 1 ) << 31 )
const CURLAUTH_ONLY = Culong(1) << 31

# Skipping MacroDefinition: CURLAUTH_ANY ( ~ CURLAUTH_DIGEST_IE )
const CURLAUTH_ANY = ~CURLAUTH_DIGEST_IE

# Skipping MacroDefinition: CURLAUTH_ANYSAFE ( ~ ( CURLAUTH_BASIC | CURLAUTH_DIGEST_IE ) )
const CURLAUTH_ANYSAFE = ~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE)

# Skipping MacroDefinition: CURLSSH_AUTH_ANY ~ 0
const CURLSSH_AUTH_ANY = ~0

const CURLSSH_AUTH_NONE = 0

Expand Down Expand Up @@ -1847,7 +1847,7 @@ const CURLPROTO_SMBS = 1 << 27

const CURLPROTO_MQTT = 1 << 28

# Skipping MacroDefinition: CURLPROTO_ALL ( ~ 0 )
const CURLPROTO_ALL = ~0

const CURLOPTTYPE_LONG = 0

Expand Down
Loading

0 comments on commit 1bbc089

Please sign in to comment.