freerasp-react-native 5.3.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +82 -0
- package/README.md +2 -0
- package/android/build.gradle +3 -3
- package/android/proguard-rules.pro +3 -3
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/FreeraspReactNativeModule.kt +177 -17
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/FreeraspReactNativePackage.kt +1 -1
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/PluginThreatHandler.kt +20 -7
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/ScreenProtector.kt +1 -1
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/dispatchers/ExecutionStateDispatcher.kt +3 -3
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/dispatchers/ThreatDispatcher.kt +23 -3
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/events/BaseRaspEvent.kt +1 -1
- package/android/src/main/java/app/talsec/rasp/reactnative/events/RaspExecutionStateEvent.kt +22 -0
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/events/ThreatEvent.kt +6 -3
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/exceptions/TalsecException.kt +1 -1
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/interfaces/PluginExecutionStateListener.kt +2 -2
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/interfaces/PluginThreatListener.kt +4 -2
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/models/RNSuspiciousAppInfo.kt +1 -1
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/utils/Extensions.kt +4 -4
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/utils/RandomGenerator.kt +1 -1
- package/android/src/main/java/{com/freeraspreactnative → app/talsec/rasp/reactnative}/utils/Utils.kt +1 -1
- package/ios/FreeraspReactNative.swift +17 -8
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeDirectory +0 -0
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeResources +88 -88
- package/ios/TalsecRuntime.xcframework/_CodeSignature/CodeSignature +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +2 -2
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curl.h +292 -265
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/curlver.h +10 -11
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/easy.h +4 -6
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/header.h +9 -9
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/multi.h +147 -112
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/options.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/system.h +14 -23
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/typecheck-gcc.h +420 -403
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/urlapi.h +29 -28
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/websockets.h +10 -10
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.abi.json +563 -312
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.private.swiftinterface +10 -3
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios.swiftinterface +10 -3
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/_CodeSignature/CodeResources +35 -35
- package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/cacert.pem +483 -1088
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/CurlWrapper.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/TalsecRuntime-Swift.h +4 -4
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curl.h +292 -265
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/curlver.h +10 -11
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/easy.h +4 -6
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/header.h +9 -9
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/multi.h +147 -112
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/options.h +1 -1
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/system.h +14 -23
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/typecheck-gcc.h +420 -403
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/urlapi.h +29 -28
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Headers/websockets.h +10 -10
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Info.plist +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.abi.json +548 -297
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +10 -3
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/arm64-apple-ios-simulator.swiftinterface +10 -3
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.abi.json +548 -297
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +10 -3
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/Modules/TalsecRuntime.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +10 -3
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/TalsecRuntime +0 -0
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/_CodeSignature/CodeResources +43 -43
- package/ios/TalsecRuntime.xcframework/ios-arm64_x86_64-simulator/TalsecRuntime.framework/cacert.pem +483 -1088
- package/ios/TalsecRuntimePackage/Package.swift +2 -2
- package/ios/dispatchers/ExecutionStateDispatcher.swift +4 -3
- package/ios/models/RaspExecutionStates.swift +10 -3
- package/ios/utils/EventIdentifiers.swift +2 -2
- package/lib/commonjs/api/listeners/raspExecutionState.js +13 -7
- package/lib/commonjs/api/listeners/raspExecutionState.js.map +1 -1
- package/lib/commonjs/api/listeners/threat.js +19 -8
- package/lib/commonjs/api/listeners/threat.js.map +1 -1
- package/lib/commonjs/api/methods/internal.js +20 -0
- package/lib/commonjs/api/methods/internal.js.map +1 -0
- package/lib/commonjs/api/methods/native.js +113 -21
- package/lib/commonjs/api/methods/native.js.map +1 -1
- package/lib/commonjs/api/methods/reactNative.js +38 -10
- package/lib/commonjs/api/methods/reactNative.js.map +1 -1
- package/lib/commonjs/channels/raspExecutionState.js +3 -3
- package/lib/commonjs/channels/raspExecutionState.js.map +1 -1
- package/lib/commonjs/channels/threat.js +4 -4
- package/lib/commonjs/channels/threat.js.map +1 -1
- package/lib/commonjs/index.js +23 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/models/raspExecutionState.js +4 -2
- package/lib/commonjs/models/raspExecutionState.js.map +1 -1
- package/lib/commonjs/models/threat.js +2 -1
- package/lib/commonjs/models/threat.js.map +1 -1
- package/lib/commonjs/types/errors.js +50 -0
- package/lib/commonjs/types/errors.js.map +1 -0
- package/lib/commonjs/types/types.js +4 -0
- package/lib/module/api/listeners/raspExecutionState.js +10 -4
- package/lib/module/api/listeners/raspExecutionState.js.map +1 -1
- package/lib/module/api/listeners/threat.js +16 -5
- package/lib/module/api/listeners/threat.js.map +1 -1
- package/lib/module/api/methods/internal.js +13 -0
- package/lib/module/api/methods/internal.js.map +1 -0
- package/lib/module/api/methods/native.js +106 -17
- package/lib/module/api/methods/native.js.map +1 -1
- package/lib/module/api/methods/reactNative.js +39 -12
- package/lib/module/api/methods/reactNative.js.map +1 -1
- package/lib/module/channels/raspExecutionState.js +1 -1
- package/lib/module/channels/raspExecutionState.js.map +1 -1
- package/lib/module/channels/threat.js +2 -2
- package/lib/module/channels/threat.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/models/raspExecutionState.js +4 -2
- package/lib/module/models/raspExecutionState.js.map +1 -1
- package/lib/module/models/threat.js +2 -1
- package/lib/module/models/threat.js.map +1 -1
- package/lib/module/types/errors.js +41 -0
- package/lib/module/types/errors.js.map +1 -0
- package/lib/module/types/types.js +1 -1
- package/lib/typescript/src/api/listeners/raspExecutionState.d.ts.map +1 -1
- package/lib/typescript/src/api/listeners/threat.d.ts.map +1 -1
- package/lib/typescript/src/api/methods/internal.d.ts +7 -0
- package/lib/typescript/src/api/methods/internal.d.ts.map +1 -0
- package/lib/typescript/src/api/methods/native.d.ts +56 -7
- package/lib/typescript/src/api/methods/native.d.ts.map +1 -1
- package/lib/typescript/src/api/methods/reactNative.d.ts +11 -2
- package/lib/typescript/src/api/methods/reactNative.d.ts.map +1 -1
- package/lib/typescript/src/channels/threat.d.ts +1 -0
- package/lib/typescript/src/channels/threat.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/models/raspExecutionState.d.ts +3 -1
- package/lib/typescript/src/models/raspExecutionState.d.ts.map +1 -1
- package/lib/typescript/src/models/threat.d.ts +1 -0
- package/lib/typescript/src/models/threat.d.ts.map +1 -1
- package/lib/typescript/src/types/errors.d.ts +26 -0
- package/lib/typescript/src/types/errors.d.ts.map +1 -0
- package/lib/typescript/src/types/types.d.ts +61 -26
- package/lib/typescript/src/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/listeners/raspExecutionState.ts +9 -3
- package/src/api/listeners/threat.ts +29 -5
- package/src/api/methods/internal.ts +13 -0
- package/src/api/methods/native.ts +125 -21
- package/src/api/methods/reactNative.ts +46 -16
- package/src/channels/raspExecutionState.ts +1 -1
- package/src/channels/threat.ts +3 -3
- package/src/index.tsx +2 -0
- package/src/models/raspExecutionState.ts +8 -2
- package/src/models/threat.ts +2 -0
- package/src/types/errors.ts +57 -0
- package/src/types/types.ts +66 -26
- package/android/src/main/java/com/freeraspreactnative/events/RaspExecutionStateEvent.kt +0 -18
package/ios/TalsecRuntime.xcframework/ios-arm64/TalsecRuntime.framework/Headers/typecheck-gcc.h
CHANGED
|
@@ -24,207 +24,211 @@
|
|
|
24
24
|
*
|
|
25
25
|
***************************************************************************/
|
|
26
26
|
|
|
27
|
-
/* wraps curl_easy_setopt() with
|
|
27
|
+
/* wraps curl_easy_setopt() with type checking */
|
|
28
28
|
|
|
29
29
|
/* To add a new kind of warning, add an
|
|
30
30
|
* if(curlcheck_sometype_option(_curl_opt))
|
|
31
31
|
* if(!curlcheck_sometype(value))
|
|
32
|
-
*
|
|
32
|
+
* Wcurl_easy_setopt_err_sometype();
|
|
33
33
|
* block and define curlcheck_sometype_option, curlcheck_sometype and
|
|
34
|
-
*
|
|
34
|
+
* Wcurl_easy_setopt_err_sometype below
|
|
35
35
|
*
|
|
36
36
|
* NOTE: We use two nested 'if' statements here instead of the && operator, in
|
|
37
37
|
* order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x
|
|
38
38
|
* when compiling with -Wlogical-op.
|
|
39
39
|
*
|
|
40
|
-
* To add an option that uses the same type as an existing option, you
|
|
41
|
-
*
|
|
40
|
+
* To add an option that uses the same type as an existing option, you need
|
|
41
|
+
* to extend the appropriate _curl_*_option macro
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
44
|
#define curl_easy_setopt(handle, option, value) \
|
|
45
45
|
__extension__({ \
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if(curlcheck_long_option(option)) \
|
|
49
|
-
if(!curlcheck_long(value)) \
|
|
50
|
-
_curl_easy_setopt_err_long(); \
|
|
51
|
-
if(curlcheck_off_t_option(option)) \
|
|
52
|
-
if(!curlcheck_off_t(value)) \
|
|
53
|
-
_curl_easy_setopt_err_curl_off_t(); \
|
|
54
|
-
if(curlcheck_string_option(option)) \
|
|
55
|
-
if(!curlcheck_string(value)) \
|
|
56
|
-
_curl_easy_setopt_err_string(); \
|
|
57
|
-
if((option) == CURLOPT_PRIVATE) { } \
|
|
58
|
-
if(curlcheck_write_cb_option(option)) \
|
|
59
|
-
if(!curlcheck_write_cb(value)) \
|
|
60
|
-
_curl_easy_setopt_err_write_callback(); \
|
|
61
|
-
if(curlcheck_curl_option(option)) \
|
|
62
|
-
if(!curlcheck_curl(value)) \
|
|
63
|
-
_curl_easy_setopt_err_curl(); \
|
|
64
|
-
if((option) == CURLOPT_RESOLVER_START_FUNCTION) \
|
|
65
|
-
if(!curlcheck_resolver_start_callback(value)) \
|
|
66
|
-
_curl_easy_setopt_err_resolver_start_callback(); \
|
|
67
|
-
if((option) == CURLOPT_READFUNCTION) \
|
|
68
|
-
if(!curlcheck_read_cb(value)) \
|
|
69
|
-
_curl_easy_setopt_err_read_cb(); \
|
|
70
|
-
if((option) == CURLOPT_IOCTLFUNCTION) \
|
|
71
|
-
if(!curlcheck_ioctl_cb(value)) \
|
|
72
|
-
_curl_easy_setopt_err_ioctl_cb(); \
|
|
73
|
-
if((option) == CURLOPT_SOCKOPTFUNCTION) \
|
|
74
|
-
if(!curlcheck_sockopt_cb(value)) \
|
|
75
|
-
_curl_easy_setopt_err_sockopt_cb(); \
|
|
76
|
-
if((option) == CURLOPT_OPENSOCKETFUNCTION) \
|
|
77
|
-
if(!curlcheck_opensocket_cb(value)) \
|
|
78
|
-
_curl_easy_setopt_err_opensocket_cb(); \
|
|
79
|
-
if((option) == CURLOPT_PROGRESSFUNCTION) \
|
|
80
|
-
if(!curlcheck_progress_cb(value)) \
|
|
81
|
-
_curl_easy_setopt_err_progress_cb(); \
|
|
82
|
-
if((option) == CURLOPT_XFERINFOFUNCTION) \
|
|
83
|
-
if(!curlcheck_xferinfo_cb(value)) \
|
|
84
|
-
_curl_easy_setopt_err_xferinfo_cb(); \
|
|
85
|
-
if((option) == CURLOPT_DEBUGFUNCTION) \
|
|
86
|
-
if(!curlcheck_debug_cb(value)) \
|
|
87
|
-
_curl_easy_setopt_err_debug_cb(); \
|
|
88
|
-
if((option) == CURLOPT_SSL_CTX_FUNCTION) \
|
|
89
|
-
if(!curlcheck_ssl_ctx_cb(value)) \
|
|
90
|
-
_curl_easy_setopt_err_ssl_ctx_cb(); \
|
|
91
|
-
if(curlcheck_conv_cb_option(option)) \
|
|
92
|
-
if(!curlcheck_conv_cb(value)) \
|
|
93
|
-
_curl_easy_setopt_err_conv_cb(); \
|
|
94
|
-
if((option) == CURLOPT_SEEKFUNCTION) \
|
|
95
|
-
if(!curlcheck_seek_cb(value)) \
|
|
96
|
-
_curl_easy_setopt_err_seek_cb(); \
|
|
97
|
-
if((option) == CURLOPT_CHUNK_BGN_FUNCTION) \
|
|
98
|
-
if(!curlcheck_chunk_bgn_cb(value)) \
|
|
99
|
-
_curl_easy_setopt_err_chunk_bgn_cb(); \
|
|
100
|
-
if((option) == CURLOPT_CHUNK_END_FUNCTION) \
|
|
101
|
-
if(!curlcheck_chunk_end_cb(value)) \
|
|
102
|
-
_curl_easy_setopt_err_chunk_end_cb(); \
|
|
103
|
-
if((option) == CURLOPT_CLOSESOCKETFUNCTION) \
|
|
104
|
-
if(!curlcheck_close_socket_cb(value)) \
|
|
105
|
-
_curl_easy_setopt_err_close_socket_cb(); \
|
|
106
|
-
if((option) == CURLOPT_FNMATCH_FUNCTION) \
|
|
107
|
-
if(!curlcheck_fnmatch_cb(value)) \
|
|
108
|
-
_curl_easy_setopt_err_fnmatch_cb(); \
|
|
109
|
-
if((option) == CURLOPT_HSTSREADFUNCTION) \
|
|
110
|
-
if(!curlcheck_hstsread_cb(value)) \
|
|
111
|
-
_curl_easy_setopt_err_hstsread_cb(); \
|
|
112
|
-
if((option) == CURLOPT_HSTSWRITEFUNCTION) \
|
|
113
|
-
if(!curlcheck_hstswrite_cb(value)) \
|
|
114
|
-
_curl_easy_setopt_err_hstswrite_cb(); \
|
|
115
|
-
if((option) == CURLOPT_SSH_HOSTKEYFUNCTION) \
|
|
116
|
-
if(!curlcheck_ssh_hostkey_cb(value)) \
|
|
117
|
-
_curl_easy_setopt_err_ssh_hostkey_cb(); \
|
|
118
|
-
if((option) == CURLOPT_SSH_KEYFUNCTION) \
|
|
119
|
-
if(!curlcheck_ssh_key_cb(value)) \
|
|
120
|
-
_curl_easy_setopt_err_ssh_key_cb(); \
|
|
121
|
-
if((option) == CURLOPT_INTERLEAVEFUNCTION) \
|
|
122
|
-
if(!curlcheck_interleave_cb(value)) \
|
|
123
|
-
_curl_easy_setopt_err_interleave_cb(); \
|
|
124
|
-
if((option) == CURLOPT_PREREQFUNCTION) \
|
|
125
|
-
if(!curlcheck_prereq_cb(value)) \
|
|
126
|
-
_curl_easy_setopt_err_prereq_cb(); \
|
|
127
|
-
if((option) == CURLOPT_TRAILERFUNCTION) \
|
|
128
|
-
if(!curlcheck_trailer_cb(value)) \
|
|
129
|
-
_curl_easy_setopt_err_trailer_cb(); \
|
|
130
|
-
if(curlcheck_cb_data_option(option)) \
|
|
131
|
-
if(!curlcheck_cb_data(value)) \
|
|
132
|
-
_curl_easy_setopt_err_cb_data(); \
|
|
133
|
-
if((option) == CURLOPT_ERRORBUFFER) \
|
|
134
|
-
if(!curlcheck_error_buffer(value)) \
|
|
135
|
-
_curl_easy_setopt_err_error_buffer(); \
|
|
136
|
-
if((option) == CURLOPT_CURLU) \
|
|
137
|
-
if(!curlcheck_ptr((value), CURLU)) \
|
|
138
|
-
_curl_easy_setopt_err_curlu(); \
|
|
139
|
-
if((option) == CURLOPT_STDERR) \
|
|
140
|
-
if(!curlcheck_FILE(value)) \
|
|
141
|
-
_curl_easy_setopt_err_FILE(); \
|
|
142
|
-
if(curlcheck_postfields_option(option)) \
|
|
143
|
-
if(!curlcheck_postfields(value)) \
|
|
144
|
-
_curl_easy_setopt_err_postfields(); \
|
|
145
|
-
if((option) == CURLOPT_HTTPPOST) \
|
|
146
|
-
if(!curlcheck_arr((value), struct curl_httppost)) \
|
|
147
|
-
_curl_easy_setopt_err_curl_httpost(); \
|
|
148
|
-
if((option) == CURLOPT_MIMEPOST) \
|
|
149
|
-
if(!curlcheck_ptr((value), curl_mime)) \
|
|
150
|
-
_curl_easy_setopt_err_curl_mimepost(); \
|
|
151
|
-
if(curlcheck_slist_option(option)) \
|
|
152
|
-
if(!curlcheck_arr((value), struct curl_slist)) \
|
|
153
|
-
_curl_easy_setopt_err_curl_slist(); \
|
|
154
|
-
if((option) == CURLOPT_SHARE) \
|
|
155
|
-
if(!curlcheck_ptr((value), CURLSH)) \
|
|
156
|
-
_curl_easy_setopt_err_CURLSH(); \
|
|
157
|
-
) \
|
|
158
|
-
} \
|
|
159
|
-
curl_easy_setopt(handle, option, value); \
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
/* wraps curl_easy_getinfo() with typechecking */
|
|
163
|
-
#define curl_easy_getinfo(handle, info, arg) \
|
|
164
|
-
__extension__({ \
|
|
165
|
-
if(__builtin_constant_p(info)) { \
|
|
166
|
-
CURL_IGNORE_DEPRECATION( \
|
|
167
|
-
if(curlcheck_string_info(info)) \
|
|
168
|
-
if(!curlcheck_arr((arg), char *)) \
|
|
169
|
-
_curl_easy_getinfo_err_string(); \
|
|
170
|
-
if(curlcheck_long_info(info)) \
|
|
171
|
-
if(!curlcheck_arr((arg), long)) \
|
|
172
|
-
_curl_easy_getinfo_err_long(); \
|
|
173
|
-
if(curlcheck_double_info(info)) \
|
|
174
|
-
if(!curlcheck_arr((arg), double)) \
|
|
175
|
-
_curl_easy_getinfo_err_double(); \
|
|
176
|
-
if(curlcheck_slist_info(info)) \
|
|
177
|
-
if(!curlcheck_arr((arg), struct curl_slist *)) \
|
|
178
|
-
_curl_easy_getinfo_err_curl_slist(); \
|
|
179
|
-
if(curlcheck_tlssessioninfo_info(info)) \
|
|
180
|
-
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
|
|
181
|
-
_curl_easy_getinfo_err_curl_tlssessioninfo(); \
|
|
182
|
-
if(curlcheck_certinfo_info(info)) \
|
|
183
|
-
if(!curlcheck_arr((arg), struct curl_certinfo *)) \
|
|
184
|
-
_curl_easy_getinfo_err_curl_certinfo(); \
|
|
185
|
-
if(curlcheck_socket_info(info)) \
|
|
186
|
-
if(!curlcheck_arr((arg), curl_socket_t)) \
|
|
187
|
-
_curl_easy_getinfo_err_curl_socket(); \
|
|
188
|
-
if(curlcheck_off_t_info(info)) \
|
|
189
|
-
if(!curlcheck_arr((arg), curl_off_t)) \
|
|
190
|
-
_curl_easy_getinfo_err_curl_off_t(); \
|
|
191
|
-
) \
|
|
192
|
-
} \
|
|
193
|
-
curl_easy_getinfo(handle, info, arg); \
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
#define curl_multi_setopt(handle, option, value) \
|
|
197
|
-
__extension__({ \
|
|
198
|
-
if(__builtin_constant_p(option)) { \
|
|
46
|
+
if(__builtin_constant_p(option)) { \
|
|
47
|
+
CURL_IGNORE_DEPRECATION( \
|
|
199
48
|
if(curlcheck_long_option(option)) \
|
|
200
49
|
if(!curlcheck_long(value)) \
|
|
201
|
-
|
|
50
|
+
Wcurl_easy_setopt_err_long(); \
|
|
202
51
|
if(curlcheck_off_t_option(option)) \
|
|
203
52
|
if(!curlcheck_off_t(value)) \
|
|
204
|
-
|
|
205
|
-
if(
|
|
53
|
+
Wcurl_easy_setopt_err_curl_off_t(); \
|
|
54
|
+
if(curlcheck_string_option(option)) \
|
|
55
|
+
if(!curlcheck_string(value)) \
|
|
56
|
+
Wcurl_easy_setopt_err_string(); \
|
|
57
|
+
if((option) == CURLOPT_PRIVATE) { } \
|
|
58
|
+
if(curlcheck_write_cb_option(option)) \
|
|
59
|
+
if(!curlcheck_write_cb(value)) \
|
|
60
|
+
Wcurl_easy_setopt_err_write_callback(); \
|
|
61
|
+
if(curlcheck_curl_option(option)) \
|
|
62
|
+
if(!curlcheck_curl(value)) \
|
|
63
|
+
Wcurl_easy_setopt_err_curl(); \
|
|
64
|
+
if((option) == CURLOPT_RESOLVER_START_FUNCTION) \
|
|
65
|
+
if(!curlcheck_resolver_start_callback(value)) \
|
|
66
|
+
Wcurl_easy_setopt_err_resolver_start_callback(); \
|
|
67
|
+
if((option) == CURLOPT_READFUNCTION) \
|
|
68
|
+
if(!curlcheck_read_cb(value)) \
|
|
69
|
+
Wcurl_easy_setopt_err_read_cb(); \
|
|
70
|
+
if((option) == CURLOPT_IOCTLFUNCTION) \
|
|
71
|
+
if(!curlcheck_ioctl_cb(value)) \
|
|
72
|
+
Wcurl_easy_setopt_err_ioctl_cb(); \
|
|
73
|
+
if((option) == CURLOPT_SOCKOPTFUNCTION) \
|
|
74
|
+
if(!curlcheck_sockopt_cb(value)) \
|
|
75
|
+
Wcurl_easy_setopt_err_sockopt_cb(); \
|
|
76
|
+
if((option) == CURLOPT_OPENSOCKETFUNCTION) \
|
|
77
|
+
if(!curlcheck_opensocket_cb(value)) \
|
|
78
|
+
Wcurl_easy_setopt_err_opensocket_cb(); \
|
|
79
|
+
if((option) == CURLOPT_PROGRESSFUNCTION) \
|
|
80
|
+
if(!curlcheck_progress_cb(value)) \
|
|
81
|
+
Wcurl_easy_setopt_err_progress_cb(); \
|
|
82
|
+
if((option) == CURLOPT_XFERINFOFUNCTION) \
|
|
83
|
+
if(!curlcheck_xferinfo_cb(value)) \
|
|
84
|
+
Wcurl_easy_setopt_err_xferinfo_cb(); \
|
|
85
|
+
if((option) == CURLOPT_DEBUGFUNCTION) \
|
|
86
|
+
if(!curlcheck_debug_cb(value)) \
|
|
87
|
+
Wcurl_easy_setopt_err_debug_cb(); \
|
|
88
|
+
if((option) == CURLOPT_SSL_CTX_FUNCTION) \
|
|
89
|
+
if(!curlcheck_ssl_ctx_cb(value)) \
|
|
90
|
+
Wcurl_easy_setopt_err_ssl_ctx_cb(); \
|
|
91
|
+
if(curlcheck_conv_cb_option(option)) \
|
|
92
|
+
if(!curlcheck_conv_cb(value)) \
|
|
93
|
+
Wcurl_easy_setopt_err_conv_cb(); \
|
|
94
|
+
if((option) == CURLOPT_SEEKFUNCTION) \
|
|
95
|
+
if(!curlcheck_seek_cb(value)) \
|
|
96
|
+
Wcurl_easy_setopt_err_seek_cb(); \
|
|
97
|
+
if((option) == CURLOPT_CHUNK_BGN_FUNCTION) \
|
|
98
|
+
if(!curlcheck_chunk_bgn_cb(value)) \
|
|
99
|
+
Wcurl_easy_setopt_err_chunk_bgn_cb(); \
|
|
100
|
+
if((option) == CURLOPT_CHUNK_END_FUNCTION) \
|
|
101
|
+
if(!curlcheck_chunk_end_cb(value)) \
|
|
102
|
+
Wcurl_easy_setopt_err_chunk_end_cb(); \
|
|
103
|
+
if((option) == CURLOPT_CLOSESOCKETFUNCTION) \
|
|
104
|
+
if(!curlcheck_close_socket_cb(value)) \
|
|
105
|
+
Wcurl_easy_setopt_err_close_socket_cb(); \
|
|
106
|
+
if((option) == CURLOPT_FNMATCH_FUNCTION) \
|
|
107
|
+
if(!curlcheck_fnmatch_cb(value)) \
|
|
108
|
+
Wcurl_easy_setopt_err_fnmatch_cb(); \
|
|
109
|
+
if((option) == CURLOPT_HSTSREADFUNCTION) \
|
|
110
|
+
if(!curlcheck_hstsread_cb(value)) \
|
|
111
|
+
Wcurl_easy_setopt_err_hstsread_cb(); \
|
|
112
|
+
if((option) == CURLOPT_HSTSWRITEFUNCTION) \
|
|
113
|
+
if(!curlcheck_hstswrite_cb(value)) \
|
|
114
|
+
Wcurl_easy_setopt_err_hstswrite_cb(); \
|
|
115
|
+
if((option) == CURLOPT_SSH_HOSTKEYFUNCTION) \
|
|
116
|
+
if(!curlcheck_ssh_hostkey_cb(value)) \
|
|
117
|
+
Wcurl_easy_setopt_err_ssh_hostkey_cb(); \
|
|
118
|
+
if((option) == CURLOPT_SSH_KEYFUNCTION) \
|
|
119
|
+
if(!curlcheck_ssh_key_cb(value)) \
|
|
120
|
+
Wcurl_easy_setopt_err_ssh_key_cb(); \
|
|
121
|
+
if((option) == CURLOPT_INTERLEAVEFUNCTION) \
|
|
122
|
+
if(!curlcheck_interleave_cb(value)) \
|
|
123
|
+
Wcurl_easy_setopt_err_interleave_cb(); \
|
|
124
|
+
if((option) == CURLOPT_PREREQFUNCTION) \
|
|
125
|
+
if(!curlcheck_prereq_cb(value)) \
|
|
126
|
+
Wcurl_easy_setopt_err_prereq_cb(); \
|
|
127
|
+
if((option) == CURLOPT_TRAILERFUNCTION) \
|
|
128
|
+
if(!curlcheck_trailer_cb(value)) \
|
|
129
|
+
Wcurl_easy_setopt_err_trailer_cb(); \
|
|
130
|
+
if(curlcheck_cb_data_option(option)) \
|
|
206
131
|
if(!curlcheck_cb_data(value)) \
|
|
207
|
-
|
|
208
|
-
if(
|
|
209
|
-
if(!
|
|
210
|
-
|
|
211
|
-
if((option) ==
|
|
212
|
-
if(!
|
|
213
|
-
|
|
214
|
-
if((option) ==
|
|
215
|
-
if(!
|
|
216
|
-
|
|
217
|
-
if((option)
|
|
218
|
-
if(!
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
132
|
+
Wcurl_easy_setopt_err_cb_data(); \
|
|
133
|
+
if((option) == CURLOPT_ERRORBUFFER) \
|
|
134
|
+
if(!curlcheck_error_buffer(value)) \
|
|
135
|
+
Wcurl_easy_setopt_err_error_buffer(); \
|
|
136
|
+
if((option) == CURLOPT_CURLU) \
|
|
137
|
+
if(!curlcheck_ptr((value), CURLU)) \
|
|
138
|
+
Wcurl_easy_setopt_err_curlu(); \
|
|
139
|
+
if((option) == CURLOPT_STDERR) \
|
|
140
|
+
if(!curlcheck_FILE(value)) \
|
|
141
|
+
Wcurl_easy_setopt_err_FILE(); \
|
|
142
|
+
if(curlcheck_postfields_option(option)) \
|
|
143
|
+
if(!curlcheck_postfields(value)) \
|
|
144
|
+
Wcurl_easy_setopt_err_postfields(); \
|
|
145
|
+
if((option) == CURLOPT_HTTPPOST) \
|
|
146
|
+
if(!curlcheck_arr((value), struct curl_httppost)) \
|
|
147
|
+
Wcurl_easy_setopt_err_curl_httpost(); \
|
|
148
|
+
if((option) == CURLOPT_MIMEPOST) \
|
|
149
|
+
if(!curlcheck_ptr((value), curl_mime)) \
|
|
150
|
+
Wcurl_easy_setopt_err_curl_mimepost(); \
|
|
151
|
+
if(curlcheck_slist_option(option)) \
|
|
152
|
+
if(!curlcheck_arr((value), struct curl_slist)) \
|
|
153
|
+
Wcurl_easy_setopt_err_curl_slist(); \
|
|
154
|
+
if((option) == CURLOPT_SHARE) \
|
|
155
|
+
if(!curlcheck_ptr((value), CURLSH)) \
|
|
156
|
+
Wcurl_easy_setopt_err_CURLSH(); \
|
|
157
|
+
) \
|
|
158
|
+
} \
|
|
159
|
+
(curl_easy_setopt)(handle, option, value); \
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
/* wraps curl_easy_getinfo() with type checking */
|
|
163
|
+
#define curl_easy_getinfo(handle, info, arg) \
|
|
164
|
+
__extension__({ \
|
|
165
|
+
if(__builtin_constant_p(info)) { \
|
|
166
|
+
CURL_IGNORE_DEPRECATION( \
|
|
167
|
+
if(curlcheck_string_info(info)) \
|
|
168
|
+
if(!curlcheck_arr((arg), char *)) \
|
|
169
|
+
Wcurl_easy_getinfo_err_string(); \
|
|
170
|
+
if(curlcheck_long_info(info)) \
|
|
171
|
+
if(!curlcheck_arr((arg), long)) \
|
|
172
|
+
Wcurl_easy_getinfo_err_long(); \
|
|
173
|
+
if(curlcheck_double_info(info)) \
|
|
174
|
+
if(!curlcheck_arr((arg), double)) \
|
|
175
|
+
Wcurl_easy_getinfo_err_double(); \
|
|
176
|
+
if(curlcheck_slist_info(info)) \
|
|
177
|
+
if(!curlcheck_arr((arg), struct curl_slist *)) \
|
|
178
|
+
Wcurl_easy_getinfo_err_curl_slist(); \
|
|
179
|
+
if(curlcheck_tlssessioninfo_info(info)) \
|
|
180
|
+
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
|
|
181
|
+
Wcurl_easy_getinfo_err_curl_tlssessioninfo(); \
|
|
182
|
+
if(curlcheck_certinfo_info(info)) \
|
|
183
|
+
if(!curlcheck_arr((arg), struct curl_certinfo *)) \
|
|
184
|
+
Wcurl_easy_getinfo_err_curl_certinfo(); \
|
|
185
|
+
if(curlcheck_socket_info(info)) \
|
|
186
|
+
if(!curlcheck_arr((arg), curl_socket_t)) \
|
|
187
|
+
Wcurl_easy_getinfo_err_curl_socket(); \
|
|
188
|
+
if(curlcheck_off_t_info(info)) \
|
|
189
|
+
if(!curlcheck_arr((arg), curl_off_t)) \
|
|
190
|
+
Wcurl_easy_getinfo_err_curl_off_t(); \
|
|
191
|
+
) \
|
|
192
|
+
} \
|
|
193
|
+
(curl_easy_getinfo)(handle, info, arg); \
|
|
194
|
+
})
|
|
195
|
+
|
|
196
|
+
#define curl_multi_setopt(handle, option, value) \
|
|
197
|
+
__extension__({ \
|
|
198
|
+
if(__builtin_constant_p(option)) { \
|
|
199
|
+
if(curlcheck_long_option(option)) \
|
|
200
|
+
if(!curlcheck_long(value)) \
|
|
201
|
+
Wcurl_multi_setopt_err_long(); \
|
|
202
|
+
if(curlcheck_off_t_option(option)) \
|
|
203
|
+
if(!curlcheck_off_t(value)) \
|
|
204
|
+
Wcurl_multi_setopt_err_curl_off_t(); \
|
|
205
|
+
if(curlcheck_multicb_data_option(option)) \
|
|
206
|
+
if(!curlcheck_cb_data(value)) \
|
|
207
|
+
Wcurl_multi_setopt_err_cb_data(); \
|
|
208
|
+
if(curlcheck_charpp_option(option)) \
|
|
209
|
+
if(!curlcheck_ptrptr(value, char)) \
|
|
210
|
+
Wcurl_multi_setopt_err_charpp(); \
|
|
211
|
+
if((option) == CURLMOPT_NOTIFYFUNCTION) \
|
|
212
|
+
if(!curlcheck_multinotify_cb(value)) \
|
|
213
|
+
Wcurl_multi_setopt_err_notifycb(); \
|
|
214
|
+
if((option) == CURLMOPT_PUSHFUNCTION) \
|
|
215
|
+
if(!curlcheck_multipush_cb(value)) \
|
|
216
|
+
Wcurl_multi_setopt_err_pushcb(); \
|
|
217
|
+
if((option) == CURLMOPT_SOCKETFUNCTION) \
|
|
218
|
+
if(!curlcheck_multisocket_cb(value)) \
|
|
219
|
+
Wcurl_multi_setopt_err_socketcb(); \
|
|
220
|
+
if((option) == CURLMOPT_TIMERFUNCTION) \
|
|
221
|
+
if(!curlcheck_multitimer_cb(value)) \
|
|
222
|
+
Wcurl_multi_setopt_err_timercb(); \
|
|
223
|
+
} \
|
|
224
|
+
(curl_multi_setopt)(handle, option, value); \
|
|
225
|
+
})
|
|
223
226
|
|
|
224
227
|
/* evaluates to true if the option takes a data argument to pass to a
|
|
225
228
|
callback */
|
|
226
229
|
#define curlcheck_multicb_data_option(option) \
|
|
227
|
-
((option) ==
|
|
230
|
+
((option) == CURLMOPT_NOTIFYDATA || \
|
|
231
|
+
(option) == CURLMOPT_PUSHDATA || \
|
|
228
232
|
(option) == CURLMOPT_SOCKETDATA || \
|
|
229
233
|
(option) == CURLMOPT_TIMERDATA || \
|
|
230
234
|
0)
|
|
@@ -246,17 +250,22 @@
|
|
|
246
250
|
curlcheck_cb_compatible((expr), curl_socket_callback))
|
|
247
251
|
|
|
248
252
|
/* evaluates to true if expr is of type curl_push_callback */
|
|
249
|
-
#define curlcheck_multipush_cb(expr)
|
|
250
|
-
(curlcheck_NULL(expr) ||
|
|
253
|
+
#define curlcheck_multipush_cb(expr) \
|
|
254
|
+
(curlcheck_NULL(expr) || \
|
|
251
255
|
curlcheck_cb_compatible((expr), curl_push_callback))
|
|
252
256
|
|
|
257
|
+
/* evaluates to true if expr is of type curl_push_callback */
|
|
258
|
+
#define curlcheck_multinotify_cb(expr) \
|
|
259
|
+
(curlcheck_NULL(expr) || \
|
|
260
|
+
curlcheck_cb_compatible((expr), curl_notify_callback))
|
|
261
|
+
|
|
253
262
|
/*
|
|
254
|
-
*
|
|
263
|
+
* Make sure that the functions are called with three arguments
|
|
255
264
|
*/
|
|
256
|
-
#define curl_share_setopt(share,opt,param)
|
|
265
|
+
#define curl_share_setopt(share, opt, param) \
|
|
266
|
+
(curl_share_setopt)(share, opt, param)
|
|
257
267
|
|
|
258
|
-
|
|
259
|
-
/* the actual warnings, triggered by calling the _curl_easy_setopt_err*
|
|
268
|
+
/* the actual warnings, triggered by calling the Wcurl_easy_setopt_err*
|
|
260
269
|
* functions */
|
|
261
270
|
|
|
262
271
|
/* To define a new warning, use _CURL_WARNING(identifier, "message") */
|
|
@@ -265,132 +274,134 @@
|
|
|
265
274
|
__attribute__((__unused__)) __attribute__((__noinline__)) \
|
|
266
275
|
id(void) { __asm__(""); }
|
|
267
276
|
|
|
268
|
-
CURLWARNING(
|
|
277
|
+
CURLWARNING(Wcurl_multi_setopt_err_long,
|
|
269
278
|
"curl_multi_setopt expects a long argument")
|
|
270
|
-
CURLWARNING(
|
|
279
|
+
CURLWARNING(Wcurl_multi_setopt_err_curl_off_t,
|
|
271
280
|
"curl_multi_setopt expects a curl_off_t argument")
|
|
272
|
-
CURLWARNING(
|
|
281
|
+
CURLWARNING(Wcurl_multi_setopt_err_cb_data,
|
|
273
282
|
"curl_multi_setopt expects a 'void *' argument")
|
|
274
|
-
CURLWARNING(
|
|
283
|
+
CURLWARNING(Wcurl_multi_setopt_err_charpp,
|
|
275
284
|
"curl_multi_setopt expects a 'char **' argument")
|
|
276
|
-
CURLWARNING(
|
|
285
|
+
CURLWARNING(Wcurl_multi_setopt_err_pushcb,
|
|
277
286
|
"curl_multi_setopt expects a curl_push_callback argument")
|
|
278
|
-
CURLWARNING(
|
|
287
|
+
CURLWARNING(Wcurl_multi_setopt_err_notifycb,
|
|
288
|
+
"curl_multi_setopt expects a curl_notify_callback argument")
|
|
289
|
+
CURLWARNING(Wcurl_multi_setopt_err_socketcb,
|
|
279
290
|
"curl_multi_setopt expects a curl_socket_callback argument")
|
|
280
|
-
CURLWARNING(
|
|
291
|
+
CURLWARNING(Wcurl_multi_setopt_err_timercb,
|
|
281
292
|
"curl_multi_setopt expects a curl_multi_timer_callback argument")
|
|
282
293
|
|
|
283
|
-
CURLWARNING(
|
|
294
|
+
CURLWARNING(Wcurl_easy_setopt_err_long,
|
|
284
295
|
"curl_easy_setopt expects a long argument")
|
|
285
|
-
CURLWARNING(
|
|
296
|
+
CURLWARNING(Wcurl_easy_setopt_err_curl_off_t,
|
|
286
297
|
"curl_easy_setopt expects a curl_off_t argument")
|
|
287
|
-
CURLWARNING(
|
|
298
|
+
CURLWARNING(Wcurl_easy_setopt_err_string,
|
|
288
299
|
"curl_easy_setopt expects a "
|
|
289
300
|
"string ('char *' or char[]) argument")
|
|
290
|
-
CURLWARNING(
|
|
301
|
+
CURLWARNING(Wcurl_easy_setopt_err_write_callback,
|
|
291
302
|
"curl_easy_setopt expects a curl_write_callback argument")
|
|
292
|
-
CURLWARNING(
|
|
303
|
+
CURLWARNING(Wcurl_easy_setopt_err_resolver_start_callback,
|
|
293
304
|
"curl_easy_setopt expects a "
|
|
294
305
|
"curl_resolver_start_callback argument")
|
|
295
|
-
CURLWARNING(
|
|
306
|
+
CURLWARNING(Wcurl_easy_setopt_err_read_cb,
|
|
296
307
|
"curl_easy_setopt expects a curl_read_callback argument")
|
|
297
|
-
CURLWARNING(
|
|
308
|
+
CURLWARNING(Wcurl_easy_setopt_err_ioctl_cb,
|
|
298
309
|
"curl_easy_setopt expects a curl_ioctl_callback argument")
|
|
299
|
-
CURLWARNING(
|
|
310
|
+
CURLWARNING(Wcurl_easy_setopt_err_sockopt_cb,
|
|
300
311
|
"curl_easy_setopt expects a curl_sockopt_callback argument")
|
|
301
|
-
CURLWARNING(
|
|
312
|
+
CURLWARNING(Wcurl_easy_setopt_err_opensocket_cb,
|
|
302
313
|
"curl_easy_setopt expects a "
|
|
303
314
|
"curl_opensocket_callback argument")
|
|
304
|
-
CURLWARNING(
|
|
315
|
+
CURLWARNING(Wcurl_easy_setopt_err_progress_cb,
|
|
305
316
|
"curl_easy_setopt expects a curl_progress_callback argument")
|
|
306
|
-
CURLWARNING(
|
|
317
|
+
CURLWARNING(Wcurl_easy_setopt_err_xferinfo_cb,
|
|
307
318
|
"curl_easy_setopt expects a curl_xferinfo_callback argument")
|
|
308
|
-
CURLWARNING(
|
|
319
|
+
CURLWARNING(Wcurl_easy_setopt_err_debug_cb,
|
|
309
320
|
"curl_easy_setopt expects a curl_debug_callback argument")
|
|
310
|
-
CURLWARNING(
|
|
321
|
+
CURLWARNING(Wcurl_easy_setopt_err_ssl_ctx_cb,
|
|
311
322
|
"curl_easy_setopt expects a curl_ssl_ctx_callback argument")
|
|
312
|
-
CURLWARNING(
|
|
323
|
+
CURLWARNING(Wcurl_easy_setopt_err_conv_cb,
|
|
313
324
|
"curl_easy_setopt expects a curl_conv_callback argument")
|
|
314
|
-
CURLWARNING(
|
|
325
|
+
CURLWARNING(Wcurl_easy_setopt_err_seek_cb,
|
|
315
326
|
"curl_easy_setopt expects a curl_seek_callback argument")
|
|
316
|
-
CURLWARNING(
|
|
327
|
+
CURLWARNING(Wcurl_easy_setopt_err_cb_data,
|
|
317
328
|
"curl_easy_setopt expects a "
|
|
318
329
|
"private data pointer as argument")
|
|
319
|
-
CURLWARNING(
|
|
330
|
+
CURLWARNING(Wcurl_easy_setopt_err_chunk_bgn_cb,
|
|
320
331
|
"curl_easy_setopt expects a curl_chunk_bgn_callback argument")
|
|
321
|
-
CURLWARNING(
|
|
332
|
+
CURLWARNING(Wcurl_easy_setopt_err_chunk_end_cb,
|
|
322
333
|
"curl_easy_setopt expects a curl_chunk_end_callback argument")
|
|
323
|
-
CURLWARNING(
|
|
334
|
+
CURLWARNING(Wcurl_easy_setopt_err_close_socket_cb,
|
|
324
335
|
"curl_easy_setopt expects a curl_closesocket_callback argument")
|
|
325
|
-
CURLWARNING(
|
|
336
|
+
CURLWARNING(Wcurl_easy_setopt_err_fnmatch_cb,
|
|
326
337
|
"curl_easy_setopt expects a curl_fnmatch_callback argument")
|
|
327
|
-
CURLWARNING(
|
|
338
|
+
CURLWARNING(Wcurl_easy_setopt_err_hstsread_cb,
|
|
328
339
|
"curl_easy_setopt expects a curl_hstsread_callback argument")
|
|
329
|
-
CURLWARNING(
|
|
340
|
+
CURLWARNING(Wcurl_easy_setopt_err_hstswrite_cb,
|
|
330
341
|
"curl_easy_setopt expects a curl_hstswrite_callback argument")
|
|
331
|
-
CURLWARNING(
|
|
342
|
+
CURLWARNING(Wcurl_easy_setopt_err_ssh_key_cb,
|
|
332
343
|
"curl_easy_setopt expects a curl_sshkeycallback argument")
|
|
333
|
-
CURLWARNING(
|
|
344
|
+
CURLWARNING(Wcurl_easy_setopt_err_ssh_hostkey_cb,
|
|
334
345
|
"curl_easy_setopt expects a curl_sshhostkeycallback argument")
|
|
335
|
-
CURLWARNING(
|
|
346
|
+
CURLWARNING(Wcurl_easy_setopt_err_interleave_cb,
|
|
336
347
|
"curl_easy_setopt expects a curl_interleave_callback argument")
|
|
337
|
-
CURLWARNING(
|
|
348
|
+
CURLWARNING(Wcurl_easy_setopt_err_prereq_cb,
|
|
338
349
|
"curl_easy_setopt expects a curl_prereq_callback argument")
|
|
339
|
-
CURLWARNING(
|
|
350
|
+
CURLWARNING(Wcurl_easy_setopt_err_trailer_cb,
|
|
340
351
|
"curl_easy_setopt expects a curl_trailerfunc_ok argument")
|
|
341
|
-
CURLWARNING(
|
|
352
|
+
CURLWARNING(Wcurl_easy_setopt_err_error_buffer,
|
|
342
353
|
"curl_easy_setopt expects a "
|
|
343
354
|
"char buffer of CURL_ERROR_SIZE as argument")
|
|
344
|
-
CURLWARNING(
|
|
355
|
+
CURLWARNING(Wcurl_easy_setopt_err_curlu,
|
|
345
356
|
"curl_easy_setopt expects a 'CURLU *' argument")
|
|
346
|
-
CURLWARNING(
|
|
357
|
+
CURLWARNING(Wcurl_easy_setopt_err_curl,
|
|
347
358
|
"curl_easy_setopt expects a 'CURL *' argument")
|
|
348
|
-
CURLWARNING(
|
|
359
|
+
CURLWARNING(Wcurl_easy_setopt_err_FILE,
|
|
349
360
|
"curl_easy_setopt expects a 'FILE *' argument")
|
|
350
|
-
CURLWARNING(
|
|
361
|
+
CURLWARNING(Wcurl_easy_setopt_err_postfields,
|
|
351
362
|
"curl_easy_setopt expects a 'void *' or 'char *' argument")
|
|
352
|
-
CURLWARNING(
|
|
363
|
+
CURLWARNING(Wcurl_easy_setopt_err_curl_httpost,
|
|
353
364
|
"curl_easy_setopt expects a 'struct curl_httppost *' "
|
|
354
365
|
"argument")
|
|
355
|
-
CURLWARNING(
|
|
366
|
+
CURLWARNING(Wcurl_easy_setopt_err_curl_mimepost,
|
|
356
367
|
"curl_easy_setopt expects a 'curl_mime *' "
|
|
357
368
|
"argument")
|
|
358
|
-
CURLWARNING(
|
|
369
|
+
CURLWARNING(Wcurl_easy_setopt_err_curl_slist,
|
|
359
370
|
"curl_easy_setopt expects a 'struct curl_slist *' argument")
|
|
360
|
-
CURLWARNING(
|
|
371
|
+
CURLWARNING(Wcurl_easy_setopt_err_CURLSH,
|
|
361
372
|
"curl_easy_setopt expects a CURLSH* argument")
|
|
362
|
-
CURLWARNING(
|
|
373
|
+
CURLWARNING(Wcurl_easy_getinfo_err_string,
|
|
363
374
|
"curl_easy_getinfo expects a pointer to 'char *'")
|
|
364
|
-
CURLWARNING(
|
|
375
|
+
CURLWARNING(Wcurl_easy_getinfo_err_long,
|
|
365
376
|
"curl_easy_getinfo expects a pointer to long")
|
|
366
|
-
CURLWARNING(
|
|
377
|
+
CURLWARNING(Wcurl_easy_getinfo_err_double,
|
|
367
378
|
"curl_easy_getinfo expects a pointer to double")
|
|
368
|
-
CURLWARNING(
|
|
379
|
+
CURLWARNING(Wcurl_easy_getinfo_err_curl_slist,
|
|
369
380
|
"curl_easy_getinfo expects a pointer to 'struct curl_slist *'")
|
|
370
|
-
CURLWARNING(
|
|
381
|
+
CURLWARNING(Wcurl_easy_getinfo_err_curl_tlssessioninfo,
|
|
371
382
|
"curl_easy_getinfo expects a pointer to "
|
|
372
383
|
"'struct curl_tlssessioninfo *'")
|
|
373
|
-
CURLWARNING(
|
|
384
|
+
CURLWARNING(Wcurl_easy_getinfo_err_curl_certinfo,
|
|
374
385
|
"curl_easy_getinfo expects a pointer to "
|
|
375
386
|
"'struct curl_certinfo *'")
|
|
376
|
-
CURLWARNING(
|
|
387
|
+
CURLWARNING(Wcurl_easy_getinfo_err_curl_socket,
|
|
377
388
|
"curl_easy_getinfo expects a pointer to curl_socket_t")
|
|
378
|
-
CURLWARNING(
|
|
389
|
+
CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
|
|
379
390
|
"curl_easy_getinfo expects a pointer to curl_off_t")
|
|
380
391
|
|
|
381
392
|
/* groups of curl_easy_setops options that take the same type of argument */
|
|
382
393
|
|
|
383
394
|
/* evaluates to true if option takes a long argument */
|
|
384
|
-
#define curlcheck_long_option(option)
|
|
395
|
+
#define curlcheck_long_option(option) \
|
|
385
396
|
(0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT)
|
|
386
397
|
|
|
387
398
|
#define curlcheck_off_t_option(option) \
|
|
388
399
|
(((option) > CURLOPTTYPE_OFF_T) && ((option) < CURLOPTTYPE_BLOB))
|
|
389
400
|
|
|
390
401
|
/* option takes a CURL * argument */
|
|
391
|
-
#define curlcheck_curl_option(option)
|
|
392
|
-
((option) == CURLOPT_STREAM_DEPENDS ||
|
|
393
|
-
(option) == CURLOPT_STREAM_DEPENDS_E ||
|
|
402
|
+
#define curlcheck_curl_option(option) \
|
|
403
|
+
((option) == CURLOPT_STREAM_DEPENDS || \
|
|
404
|
+
(option) == CURLOPT_STREAM_DEPENDS_E || \
|
|
394
405
|
0)
|
|
395
406
|
|
|
396
407
|
/* evaluates to true if option takes a char* argument */
|
|
@@ -485,6 +496,9 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
485
496
|
(option) == CURLOPT_USERAGENT || \
|
|
486
497
|
(option) == CURLOPT_USERNAME || \
|
|
487
498
|
(option) == CURLOPT_AWS_SIGV4 || \
|
|
499
|
+
(option) == CURLOPT_HTTPSIG_HEADERS || \
|
|
500
|
+
(option) == CURLOPT_HTTPSIG_KEY || \
|
|
501
|
+
(option) == CURLOPT_HTTPSIG_KEYID || \
|
|
488
502
|
(option) == CURLOPT_USERPWD || \
|
|
489
503
|
(option) == CURLOPT_XOAUTH2_BEARER || \
|
|
490
504
|
0)
|
|
@@ -501,86 +515,89 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
501
515
|
(option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)
|
|
502
516
|
|
|
503
517
|
/* evaluates to true if option takes a data argument to pass to a callback */
|
|
504
|
-
#define curlcheck_cb_data_option(option)
|
|
505
|
-
((option) == CURLOPT_CHUNK_DATA ||
|
|
506
|
-
(option) == CURLOPT_CLOSESOCKETDATA ||
|
|
507
|
-
(option) == CURLOPT_DEBUGDATA ||
|
|
508
|
-
(option) == CURLOPT_FNMATCH_DATA ||
|
|
509
|
-
(option) == CURLOPT_HEADERDATA ||
|
|
510
|
-
(option) == CURLOPT_HSTSREADDATA ||
|
|
511
|
-
(option) == CURLOPT_HSTSWRITEDATA ||
|
|
512
|
-
(option) == CURLOPT_INTERLEAVEDATA ||
|
|
513
|
-
(option) == CURLOPT_IOCTLDATA ||
|
|
514
|
-
(option) == CURLOPT_OPENSOCKETDATA ||
|
|
515
|
-
(option) == CURLOPT_PREREQDATA ||
|
|
516
|
-
(option) == CURLOPT_XFERINFODATA ||
|
|
517
|
-
(option) == CURLOPT_READDATA ||
|
|
518
|
-
(option) == CURLOPT_SEEKDATA ||
|
|
519
|
-
(option) == CURLOPT_SOCKOPTDATA ||
|
|
520
|
-
(option) == CURLOPT_SSH_KEYDATA ||
|
|
521
|
-
(option) == CURLOPT_SSL_CTX_DATA ||
|
|
522
|
-
(option) == CURLOPT_WRITEDATA ||
|
|
523
|
-
(option) == CURLOPT_RESOLVER_START_DATA ||
|
|
524
|
-
(option) == CURLOPT_TRAILERDATA ||
|
|
525
|
-
(option) == CURLOPT_SSH_HOSTKEYDATA ||
|
|
518
|
+
#define curlcheck_cb_data_option(option) \
|
|
519
|
+
((option) == CURLOPT_CHUNK_DATA || \
|
|
520
|
+
(option) == CURLOPT_CLOSESOCKETDATA || \
|
|
521
|
+
(option) == CURLOPT_DEBUGDATA || \
|
|
522
|
+
(option) == CURLOPT_FNMATCH_DATA || \
|
|
523
|
+
(option) == CURLOPT_HEADERDATA || \
|
|
524
|
+
(option) == CURLOPT_HSTSREADDATA || \
|
|
525
|
+
(option) == CURLOPT_HSTSWRITEDATA || \
|
|
526
|
+
(option) == CURLOPT_INTERLEAVEDATA || \
|
|
527
|
+
(option) == CURLOPT_IOCTLDATA || \
|
|
528
|
+
(option) == CURLOPT_OPENSOCKETDATA || \
|
|
529
|
+
(option) == CURLOPT_PREREQDATA || \
|
|
530
|
+
(option) == CURLOPT_XFERINFODATA || \
|
|
531
|
+
(option) == CURLOPT_READDATA || \
|
|
532
|
+
(option) == CURLOPT_SEEKDATA || \
|
|
533
|
+
(option) == CURLOPT_SOCKOPTDATA || \
|
|
534
|
+
(option) == CURLOPT_SSH_KEYDATA || \
|
|
535
|
+
(option) == CURLOPT_SSL_CTX_DATA || \
|
|
536
|
+
(option) == CURLOPT_WRITEDATA || \
|
|
537
|
+
(option) == CURLOPT_RESOLVER_START_DATA || \
|
|
538
|
+
(option) == CURLOPT_TRAILERDATA || \
|
|
539
|
+
(option) == CURLOPT_SSH_HOSTKEYDATA || \
|
|
526
540
|
0)
|
|
527
541
|
|
|
528
542
|
/* evaluates to true if option takes a POST data argument (void* or char*) */
|
|
529
|
-
#define curlcheck_postfields_option(option)
|
|
530
|
-
((option) == CURLOPT_POSTFIELDS ||
|
|
531
|
-
(option) == CURLOPT_COPYPOSTFIELDS ||
|
|
543
|
+
#define curlcheck_postfields_option(option) \
|
|
544
|
+
((option) == CURLOPT_POSTFIELDS || \
|
|
545
|
+
(option) == CURLOPT_COPYPOSTFIELDS || \
|
|
532
546
|
0)
|
|
533
547
|
|
|
534
548
|
/* evaluates to true if option takes a struct curl_slist * argument */
|
|
535
|
-
#define curlcheck_slist_option(option)
|
|
536
|
-
((option) == CURLOPT_HTTP200ALIASES ||
|
|
537
|
-
(option) == CURLOPT_HTTPHEADER ||
|
|
538
|
-
(option) == CURLOPT_MAIL_RCPT ||
|
|
539
|
-
(option) == CURLOPT_POSTQUOTE ||
|
|
540
|
-
(option) == CURLOPT_PREQUOTE ||
|
|
541
|
-
(option) == CURLOPT_PROXYHEADER ||
|
|
542
|
-
(option) == CURLOPT_QUOTE ||
|
|
543
|
-
(option) == CURLOPT_RESOLVE ||
|
|
544
|
-
(option) == CURLOPT_TELNETOPTIONS ||
|
|
545
|
-
(option) == CURLOPT_CONNECT_TO ||
|
|
549
|
+
#define curlcheck_slist_option(option) \
|
|
550
|
+
((option) == CURLOPT_HTTP200ALIASES || \
|
|
551
|
+
(option) == CURLOPT_HTTPHEADER || \
|
|
552
|
+
(option) == CURLOPT_MAIL_RCPT || \
|
|
553
|
+
(option) == CURLOPT_POSTQUOTE || \
|
|
554
|
+
(option) == CURLOPT_PREQUOTE || \
|
|
555
|
+
(option) == CURLOPT_PROXYHEADER || \
|
|
556
|
+
(option) == CURLOPT_QUOTE || \
|
|
557
|
+
(option) == CURLOPT_RESOLVE || \
|
|
558
|
+
(option) == CURLOPT_TELNETOPTIONS || \
|
|
559
|
+
(option) == CURLOPT_CONNECT_TO || \
|
|
546
560
|
0)
|
|
547
561
|
|
|
548
562
|
/* groups of curl_easy_getinfo infos that take the same type of argument */
|
|
549
563
|
|
|
550
564
|
/* evaluates to true if info expects a pointer to char * argument */
|
|
551
|
-
#define curlcheck_string_info(info)
|
|
552
|
-
(CURLINFO_STRING < (info) && (info) < CURLINFO_LONG &&
|
|
565
|
+
#define curlcheck_string_info(info) \
|
|
566
|
+
(CURLINFO_STRING < (info) && (info) < CURLINFO_LONG && \
|
|
553
567
|
(info) != CURLINFO_PRIVATE)
|
|
554
568
|
|
|
555
569
|
/* evaluates to true if info expects a pointer to long argument */
|
|
556
|
-
#define curlcheck_long_info(info)
|
|
570
|
+
#define curlcheck_long_info(info) \
|
|
557
571
|
(CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)
|
|
558
572
|
|
|
559
573
|
/* evaluates to true if info expects a pointer to double argument */
|
|
560
|
-
#define curlcheck_double_info(info)
|
|
574
|
+
#define curlcheck_double_info(info) \
|
|
561
575
|
(CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)
|
|
562
576
|
|
|
563
577
|
/* true if info expects a pointer to struct curl_slist * argument */
|
|
564
578
|
#define curlcheck_slist_info(info) \
|
|
565
|
-
(((info) == CURLINFO_SSL_ENGINES) ||
|
|
579
|
+
(((info) == CURLINFO_SSL_ENGINES) || \
|
|
580
|
+
((info) == CURLINFO_COOKIELIST))
|
|
566
581
|
|
|
567
582
|
/* true if info expects a pointer to struct curl_tlssessioninfo * argument */
|
|
568
|
-
#define curlcheck_tlssessioninfo_info(info)
|
|
569
|
-
(((info) == CURLINFO_TLS_SSL_PTR) ||
|
|
583
|
+
#define curlcheck_tlssessioninfo_info(info) \
|
|
584
|
+
(((info) == CURLINFO_TLS_SSL_PTR) || \
|
|
585
|
+
((info) == CURLINFO_TLS_SESSION))
|
|
570
586
|
|
|
571
587
|
/* true if info expects a pointer to struct curl_certinfo * argument */
|
|
572
588
|
#define curlcheck_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
|
|
573
589
|
|
|
574
590
|
/* true if info expects a pointer to struct curl_socket_t argument */
|
|
575
|
-
#define curlcheck_socket_info(info)
|
|
591
|
+
#define curlcheck_socket_info(info) \
|
|
576
592
|
(CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T)
|
|
577
593
|
|
|
578
594
|
/* true if info expects a pointer to curl_off_t argument */
|
|
579
|
-
#define curlcheck_off_t_info(info)
|
|
595
|
+
#define curlcheck_off_t_info(info) \
|
|
580
596
|
(CURLINFO_OFF_T < (info))
|
|
581
597
|
|
|
582
|
-
|
|
583
|
-
|
|
598
|
+
/*
|
|
599
|
+
* typecheck helpers -- check whether given expression has requested type
|
|
600
|
+
*/
|
|
584
601
|
|
|
585
602
|
/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros,
|
|
586
603
|
* otherwise define a new macro. Search for __builtin_types_compatible_p
|
|
@@ -591,9 +608,10 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
591
608
|
* == or whatsoever.
|
|
592
609
|
*/
|
|
593
610
|
|
|
594
|
-
/* XXX: should evaluate to true if expr is a pointer */
|
|
595
|
-
#define curlcheck_any_ptr(expr)
|
|
596
|
-
(sizeof(expr) == sizeof(void *)
|
|
611
|
+
/* XXX: should evaluate to true if expr is a pointer or a char[] array */
|
|
612
|
+
#define curlcheck_any_ptr(expr) \
|
|
613
|
+
(sizeof(expr) == sizeof(void *) || \
|
|
614
|
+
__builtin_types_compatible_p(__typeof__(expr), char[]))
|
|
597
615
|
|
|
598
616
|
/* evaluates to true if expr is NULL */
|
|
599
617
|
/* XXX: must not evaluate expr, so this check is not accurate */
|
|
@@ -630,7 +648,6 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
630
648
|
(curlcheck_NULL(expr) || \
|
|
631
649
|
__builtin_types_compatible_p(__typeof__(expr), CURL *))
|
|
632
650
|
|
|
633
|
-
|
|
634
651
|
/* evaluates to true if expr is a long (no matter the signedness)
|
|
635
652
|
* XXX: for now, int is also accepted (and therefore short and char, which
|
|
636
653
|
* are promoted to int when passed to a variadic function) */
|
|
@@ -657,11 +674,11 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
657
674
|
)
|
|
658
675
|
|
|
659
676
|
/* evaluates to true if expr is of type curl_off_t */
|
|
660
|
-
#define curlcheck_off_t(expr)
|
|
677
|
+
#define curlcheck_off_t(expr) \
|
|
661
678
|
(__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
|
|
662
679
|
|
|
663
680
|
/* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
|
|
664
|
-
/* XXX: also check size of
|
|
681
|
+
/* XXX: also check size of a char[] array? */
|
|
665
682
|
#define curlcheck_error_buffer(expr) \
|
|
666
683
|
(curlcheck_NULL(expr) || \
|
|
667
684
|
__builtin_types_compatible_p(__typeof__(expr), char *) || \
|
|
@@ -673,7 +690,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
673
690
|
(curlcheck_ptr((expr), void) || \
|
|
674
691
|
curlcheck_ptr((expr), FILE))
|
|
675
692
|
#else /* be less strict */
|
|
676
|
-
#define curlcheck_cb_data(expr)
|
|
693
|
+
#define curlcheck_cb_data(expr) \
|
|
677
694
|
curlcheck_any_ptr(expr)
|
|
678
695
|
#endif
|
|
679
696
|
|
|
@@ -695,8 +712,8 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
695
712
|
__builtin_types_compatible_p(__typeof__(func) *, type))
|
|
696
713
|
|
|
697
714
|
/* evaluates to true if expr is of type curl_resolver_start_callback */
|
|
698
|
-
#define curlcheck_resolver_start_callback(expr)
|
|
699
|
-
(curlcheck_NULL(expr) ||
|
|
715
|
+
#define curlcheck_resolver_start_callback(expr) \
|
|
716
|
+
(curlcheck_NULL(expr) || \
|
|
700
717
|
curlcheck_cb_compatible((expr), curl_resolver_start_callback))
|
|
701
718
|
|
|
702
719
|
/* evaluates to true if expr is of type curl_read_callback or "similar" */
|
|
@@ -704,89 +721,89 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
|
|
|
704
721
|
(curlcheck_NULL(expr) || \
|
|
705
722
|
curlcheck_cb_compatible((expr), __typeof__(fread) *) || \
|
|
706
723
|
curlcheck_cb_compatible((expr), curl_read_callback) || \
|
|
707
|
-
curlcheck_cb_compatible((expr),
|
|
708
|
-
curlcheck_cb_compatible((expr),
|
|
709
|
-
curlcheck_cb_compatible((expr),
|
|
710
|
-
curlcheck_cb_compatible((expr),
|
|
711
|
-
curlcheck_cb_compatible((expr),
|
|
712
|
-
curlcheck_cb_compatible((expr),
|
|
713
|
-
typedef size_t (*
|
|
714
|
-
typedef size_t (*
|
|
715
|
-
typedef size_t (*
|
|
716
|
-
typedef size_t (*
|
|
717
|
-
typedef size_t (*
|
|
718
|
-
typedef size_t (*
|
|
724
|
+
curlcheck_cb_compatible((expr), Wcurl_read_callback1) || \
|
|
725
|
+
curlcheck_cb_compatible((expr), Wcurl_read_callback2) || \
|
|
726
|
+
curlcheck_cb_compatible((expr), Wcurl_read_callback3) || \
|
|
727
|
+
curlcheck_cb_compatible((expr), Wcurl_read_callback4) || \
|
|
728
|
+
curlcheck_cb_compatible((expr), Wcurl_read_callback5) || \
|
|
729
|
+
curlcheck_cb_compatible((expr), Wcurl_read_callback6))
|
|
730
|
+
typedef size_t (*Wcurl_read_callback1)(char *, size_t, size_t, void *);
|
|
731
|
+
typedef size_t (*Wcurl_read_callback2)(char *, size_t, size_t, const void *);
|
|
732
|
+
typedef size_t (*Wcurl_read_callback3)(char *, size_t, size_t, FILE *);
|
|
733
|
+
typedef size_t (*Wcurl_read_callback4)(void *, size_t, size_t, void *);
|
|
734
|
+
typedef size_t (*Wcurl_read_callback5)(void *, size_t, size_t, const void *);
|
|
735
|
+
typedef size_t (*Wcurl_read_callback6)(void *, size_t, size_t, FILE *);
|
|
719
736
|
|
|
720
737
|
/* evaluates to true if expr is of type curl_write_callback or "similar" */
|
|
721
738
|
#define curlcheck_write_cb(expr) \
|
|
722
739
|
(curlcheck_read_cb(expr) || \
|
|
723
740
|
curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \
|
|
724
741
|
curlcheck_cb_compatible((expr), curl_write_callback) || \
|
|
725
|
-
curlcheck_cb_compatible((expr),
|
|
726
|
-
curlcheck_cb_compatible((expr),
|
|
727
|
-
curlcheck_cb_compatible((expr),
|
|
728
|
-
curlcheck_cb_compatible((expr),
|
|
729
|
-
curlcheck_cb_compatible((expr),
|
|
730
|
-
curlcheck_cb_compatible((expr),
|
|
731
|
-
typedef size_t (*
|
|
732
|
-
typedef size_t (*
|
|
733
|
-
|
|
734
|
-
typedef size_t (*
|
|
735
|
-
typedef size_t (*
|
|
736
|
-
typedef size_t (*
|
|
737
|
-
|
|
738
|
-
typedef size_t (*
|
|
742
|
+
curlcheck_cb_compatible((expr), Wcurl_write_callback1) || \
|
|
743
|
+
curlcheck_cb_compatible((expr), Wcurl_write_callback2) || \
|
|
744
|
+
curlcheck_cb_compatible((expr), Wcurl_write_callback3) || \
|
|
745
|
+
curlcheck_cb_compatible((expr), Wcurl_write_callback4) || \
|
|
746
|
+
curlcheck_cb_compatible((expr), Wcurl_write_callback5) || \
|
|
747
|
+
curlcheck_cb_compatible((expr), Wcurl_write_callback6))
|
|
748
|
+
typedef size_t (*Wcurl_write_callback1)(const char *, size_t, size_t, void *);
|
|
749
|
+
typedef size_t (*Wcurl_write_callback2)(const char *, size_t, size_t,
|
|
750
|
+
const void *);
|
|
751
|
+
typedef size_t (*Wcurl_write_callback3)(const char *, size_t, size_t, FILE *);
|
|
752
|
+
typedef size_t (*Wcurl_write_callback4)(const void *, size_t, size_t, void *);
|
|
753
|
+
typedef size_t (*Wcurl_write_callback5)(const void *, size_t, size_t,
|
|
754
|
+
const void *);
|
|
755
|
+
typedef size_t (*Wcurl_write_callback6)(const void *, size_t, size_t, FILE *);
|
|
739
756
|
|
|
740
757
|
/* evaluates to true if expr is of type curl_ioctl_callback or "similar" */
|
|
741
758
|
#define curlcheck_ioctl_cb(expr) \
|
|
742
759
|
(curlcheck_NULL(expr) || \
|
|
743
760
|
curlcheck_cb_compatible((expr), curl_ioctl_callback) || \
|
|
744
|
-
curlcheck_cb_compatible((expr),
|
|
745
|
-
curlcheck_cb_compatible((expr),
|
|
746
|
-
curlcheck_cb_compatible((expr),
|
|
747
|
-
curlcheck_cb_compatible((expr),
|
|
748
|
-
typedef curlioerr (*
|
|
749
|
-
typedef curlioerr (*
|
|
750
|
-
typedef curlioerr (*
|
|
751
|
-
typedef curlioerr (*
|
|
761
|
+
curlcheck_cb_compatible((expr), Wcurl_ioctl_callback1) || \
|
|
762
|
+
curlcheck_cb_compatible((expr), Wcurl_ioctl_callback2) || \
|
|
763
|
+
curlcheck_cb_compatible((expr), Wcurl_ioctl_callback3) || \
|
|
764
|
+
curlcheck_cb_compatible((expr), Wcurl_ioctl_callback4))
|
|
765
|
+
typedef curlioerr (*Wcurl_ioctl_callback1)(CURL *, int, void *);
|
|
766
|
+
typedef curlioerr (*Wcurl_ioctl_callback2)(CURL *, int, const void *);
|
|
767
|
+
typedef curlioerr (*Wcurl_ioctl_callback3)(CURL *, curliocmd, void *);
|
|
768
|
+
typedef curlioerr (*Wcurl_ioctl_callback4)(CURL *, curliocmd, const void *);
|
|
752
769
|
|
|
753
770
|
/* evaluates to true if expr is of type curl_sockopt_callback or "similar" */
|
|
754
771
|
#define curlcheck_sockopt_cb(expr) \
|
|
755
772
|
(curlcheck_NULL(expr) || \
|
|
756
773
|
curlcheck_cb_compatible((expr), curl_sockopt_callback) || \
|
|
757
|
-
curlcheck_cb_compatible((expr),
|
|
758
|
-
curlcheck_cb_compatible((expr),
|
|
759
|
-
typedef int (*
|
|
760
|
-
typedef int (*
|
|
761
|
-
|
|
774
|
+
curlcheck_cb_compatible((expr), Wcurl_sockopt_callback1) || \
|
|
775
|
+
curlcheck_cb_compatible((expr), Wcurl_sockopt_callback2))
|
|
776
|
+
typedef int (*Wcurl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
|
|
777
|
+
typedef int (*Wcurl_sockopt_callback2)(const void *, curl_socket_t,
|
|
778
|
+
curlsocktype);
|
|
762
779
|
|
|
763
780
|
/* evaluates to true if expr is of type curl_opensocket_callback or
|
|
764
781
|
"similar" */
|
|
765
782
|
#define curlcheck_opensocket_cb(expr) \
|
|
766
783
|
(curlcheck_NULL(expr) || \
|
|
767
784
|
curlcheck_cb_compatible((expr), curl_opensocket_callback) || \
|
|
768
|
-
curlcheck_cb_compatible((expr),
|
|
769
|
-
curlcheck_cb_compatible((expr),
|
|
770
|
-
curlcheck_cb_compatible((expr),
|
|
771
|
-
curlcheck_cb_compatible((expr),
|
|
772
|
-
typedef curl_socket_t (*
|
|
785
|
+
curlcheck_cb_compatible((expr), Wcurl_opensocket_callback1) || \
|
|
786
|
+
curlcheck_cb_compatible((expr), Wcurl_opensocket_callback2) || \
|
|
787
|
+
curlcheck_cb_compatible((expr), Wcurl_opensocket_callback3) || \
|
|
788
|
+
curlcheck_cb_compatible((expr), Wcurl_opensocket_callback4))
|
|
789
|
+
typedef curl_socket_t (*Wcurl_opensocket_callback1)
|
|
773
790
|
(void *, curlsocktype, struct curl_sockaddr *);
|
|
774
|
-
typedef curl_socket_t (*
|
|
791
|
+
typedef curl_socket_t (*Wcurl_opensocket_callback2)
|
|
775
792
|
(void *, curlsocktype, const struct curl_sockaddr *);
|
|
776
|
-
typedef curl_socket_t (*
|
|
793
|
+
typedef curl_socket_t (*Wcurl_opensocket_callback3)
|
|
777
794
|
(const void *, curlsocktype, struct curl_sockaddr *);
|
|
778
|
-
typedef curl_socket_t (*
|
|
795
|
+
typedef curl_socket_t (*Wcurl_opensocket_callback4)
|
|
779
796
|
(const void *, curlsocktype, const struct curl_sockaddr *);
|
|
780
797
|
|
|
781
798
|
/* evaluates to true if expr is of type curl_progress_callback or "similar" */
|
|
782
799
|
#define curlcheck_progress_cb(expr) \
|
|
783
800
|
(curlcheck_NULL(expr) || \
|
|
784
801
|
curlcheck_cb_compatible((expr), curl_progress_callback) || \
|
|
785
|
-
curlcheck_cb_compatible((expr),
|
|
786
|
-
curlcheck_cb_compatible((expr),
|
|
787
|
-
typedef int (*
|
|
802
|
+
curlcheck_cb_compatible((expr), Wcurl_progress_callback1) || \
|
|
803
|
+
curlcheck_cb_compatible((expr), Wcurl_progress_callback2))
|
|
804
|
+
typedef int (*Wcurl_progress_callback1)(void *,
|
|
788
805
|
double, double, double, double);
|
|
789
|
-
typedef int (*
|
|
806
|
+
typedef int (*Wcurl_progress_callback2)(const void *,
|
|
790
807
|
double, double, double, double);
|
|
791
808
|
|
|
792
809
|
/* evaluates to true if expr is of type curl_xferinfo_callback */
|
|
@@ -798,29 +815,29 @@ typedef int (*_curl_progress_callback2)(const void *,
|
|
|
798
815
|
#define curlcheck_debug_cb(expr) \
|
|
799
816
|
(curlcheck_NULL(expr) || \
|
|
800
817
|
curlcheck_cb_compatible((expr), curl_debug_callback) || \
|
|
801
|
-
curlcheck_cb_compatible((expr),
|
|
802
|
-
curlcheck_cb_compatible((expr),
|
|
803
|
-
curlcheck_cb_compatible((expr),
|
|
804
|
-
curlcheck_cb_compatible((expr),
|
|
805
|
-
curlcheck_cb_compatible((expr),
|
|
806
|
-
curlcheck_cb_compatible((expr),
|
|
807
|
-
curlcheck_cb_compatible((expr),
|
|
808
|
-
curlcheck_cb_compatible((expr),
|
|
809
|
-
typedef int (*
|
|
818
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback1) || \
|
|
819
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback2) || \
|
|
820
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback3) || \
|
|
821
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback4) || \
|
|
822
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback5) || \
|
|
823
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback6) || \
|
|
824
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback7) || \
|
|
825
|
+
curlcheck_cb_compatible((expr), Wcurl_debug_callback8))
|
|
826
|
+
typedef int (*Wcurl_debug_callback1)(CURL *,
|
|
810
827
|
curl_infotype, char *, size_t, void *);
|
|
811
|
-
typedef int (*
|
|
828
|
+
typedef int (*Wcurl_debug_callback2)(CURL *,
|
|
812
829
|
curl_infotype, char *, size_t, const void *);
|
|
813
|
-
typedef int (*
|
|
830
|
+
typedef int (*Wcurl_debug_callback3)(CURL *,
|
|
814
831
|
curl_infotype, const char *, size_t, void *);
|
|
815
|
-
typedef int (*
|
|
832
|
+
typedef int (*Wcurl_debug_callback4)(CURL *,
|
|
816
833
|
curl_infotype, const char *, size_t, const void *);
|
|
817
|
-
typedef int (*
|
|
834
|
+
typedef int (*Wcurl_debug_callback5)(CURL *,
|
|
818
835
|
curl_infotype, unsigned char *, size_t, void *);
|
|
819
|
-
typedef int (*
|
|
836
|
+
typedef int (*Wcurl_debug_callback6)(CURL *,
|
|
820
837
|
curl_infotype, unsigned char *, size_t, const void *);
|
|
821
|
-
typedef int (*
|
|
838
|
+
typedef int (*Wcurl_debug_callback7)(CURL *,
|
|
822
839
|
curl_infotype, const unsigned char *, size_t, void *);
|
|
823
|
-
typedef int (*
|
|
840
|
+
typedef int (*Wcurl_debug_callback8)(CURL *,
|
|
824
841
|
curl_infotype, const unsigned char *, size_t, const void *);
|
|
825
842
|
|
|
826
843
|
/* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
|
|
@@ -828,66 +845,66 @@ typedef int (*_curl_debug_callback8) (CURL *,
|
|
|
828
845
|
#define curlcheck_ssl_ctx_cb(expr) \
|
|
829
846
|
(curlcheck_NULL(expr) || \
|
|
830
847
|
curlcheck_cb_compatible((expr), curl_ssl_ctx_callback) || \
|
|
831
|
-
curlcheck_cb_compatible((expr),
|
|
832
|
-
curlcheck_cb_compatible((expr),
|
|
833
|
-
curlcheck_cb_compatible((expr),
|
|
834
|
-
curlcheck_cb_compatible((expr),
|
|
835
|
-
curlcheck_cb_compatible((expr),
|
|
836
|
-
curlcheck_cb_compatible((expr),
|
|
837
|
-
curlcheck_cb_compatible((expr),
|
|
838
|
-
curlcheck_cb_compatible((expr),
|
|
839
|
-
typedef CURLcode (*
|
|
840
|
-
typedef CURLcode (*
|
|
841
|
-
typedef CURLcode (*
|
|
842
|
-
typedef CURLcode (*
|
|
848
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback1) || \
|
|
849
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback2) || \
|
|
850
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback3) || \
|
|
851
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback4) || \
|
|
852
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback5) || \
|
|
853
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback6) || \
|
|
854
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback7) || \
|
|
855
|
+
curlcheck_cb_compatible((expr), Wcurl_ssl_ctx_callback8))
|
|
856
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback1)(CURL *, void *, void *);
|
|
857
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback2)(CURL *, void *, const void *);
|
|
858
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback3)(CURL *, const void *, void *);
|
|
859
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback4)(CURL *, const void *,
|
|
843
860
|
const void *);
|
|
844
861
|
#ifdef HEADER_SSL_H
|
|
845
862
|
/* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX
|
|
846
|
-
* this
|
|
863
|
+
* this of course breaks if we are included before OpenSSL headers...
|
|
847
864
|
*/
|
|
848
|
-
typedef CURLcode (*
|
|
849
|
-
typedef CURLcode (*
|
|
850
|
-
typedef CURLcode (*
|
|
851
|
-
typedef CURLcode (*
|
|
865
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback5)(CURL *, SSL_CTX *, void *);
|
|
866
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback6)(CURL *, SSL_CTX *, const void *);
|
|
867
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback7)(CURL *, const SSL_CTX *, void *);
|
|
868
|
+
typedef CURLcode (*Wcurl_ssl_ctx_callback8)(CURL *, const SSL_CTX *,
|
|
852
869
|
const void *);
|
|
853
870
|
#else
|
|
854
|
-
typedef
|
|
855
|
-
typedef
|
|
856
|
-
typedef
|
|
857
|
-
typedef
|
|
871
|
+
typedef Wcurl_ssl_ctx_callback1 Wcurl_ssl_ctx_callback5;
|
|
872
|
+
typedef Wcurl_ssl_ctx_callback1 Wcurl_ssl_ctx_callback6;
|
|
873
|
+
typedef Wcurl_ssl_ctx_callback1 Wcurl_ssl_ctx_callback7;
|
|
874
|
+
typedef Wcurl_ssl_ctx_callback1 Wcurl_ssl_ctx_callback8;
|
|
858
875
|
#endif
|
|
859
876
|
|
|
860
877
|
/* evaluates to true if expr is of type curl_conv_callback or "similar" */
|
|
861
878
|
#define curlcheck_conv_cb(expr) \
|
|
862
879
|
(curlcheck_NULL(expr) || \
|
|
863
880
|
curlcheck_cb_compatible((expr), curl_conv_callback) || \
|
|
864
|
-
curlcheck_cb_compatible((expr),
|
|
865
|
-
curlcheck_cb_compatible((expr),
|
|
866
|
-
curlcheck_cb_compatible((expr),
|
|
867
|
-
curlcheck_cb_compatible((expr),
|
|
868
|
-
typedef CURLcode (*
|
|
869
|
-
typedef CURLcode (*
|
|
870
|
-
typedef CURLcode (*
|
|
871
|
-
typedef CURLcode (*
|
|
881
|
+
curlcheck_cb_compatible((expr), Wcurl_conv_callback1) || \
|
|
882
|
+
curlcheck_cb_compatible((expr), Wcurl_conv_callback2) || \
|
|
883
|
+
curlcheck_cb_compatible((expr), Wcurl_conv_callback3) || \
|
|
884
|
+
curlcheck_cb_compatible((expr), Wcurl_conv_callback4))
|
|
885
|
+
typedef CURLcode (*Wcurl_conv_callback1)(char *, size_t length);
|
|
886
|
+
typedef CURLcode (*Wcurl_conv_callback2)(const char *, size_t length);
|
|
887
|
+
typedef CURLcode (*Wcurl_conv_callback3)(void *, size_t length);
|
|
888
|
+
typedef CURLcode (*Wcurl_conv_callback4)(const void *, size_t length);
|
|
872
889
|
|
|
873
890
|
/* evaluates to true if expr is of type curl_seek_callback or "similar" */
|
|
874
891
|
#define curlcheck_seek_cb(expr) \
|
|
875
892
|
(curlcheck_NULL(expr) || \
|
|
876
893
|
curlcheck_cb_compatible((expr), curl_seek_callback) || \
|
|
877
|
-
curlcheck_cb_compatible((expr),
|
|
878
|
-
curlcheck_cb_compatible((expr),
|
|
879
|
-
typedef CURLcode (*
|
|
880
|
-
typedef CURLcode (*
|
|
894
|
+
curlcheck_cb_compatible((expr), Wcurl_seek_callback1) || \
|
|
895
|
+
curlcheck_cb_compatible((expr), Wcurl_seek_callback2))
|
|
896
|
+
typedef CURLcode (*Wcurl_seek_callback1)(void *, curl_off_t, int);
|
|
897
|
+
typedef CURLcode (*Wcurl_seek_callback2)(const void *, curl_off_t, int);
|
|
881
898
|
|
|
882
899
|
/* evaluates to true if expr is of type curl_chunk_bgn_callback */
|
|
883
900
|
#define curlcheck_chunk_bgn_cb(expr) \
|
|
884
901
|
(curlcheck_NULL(expr) || \
|
|
885
902
|
curlcheck_cb_compatible((expr), curl_chunk_bgn_callback) || \
|
|
886
|
-
curlcheck_cb_compatible((expr),
|
|
887
|
-
curlcheck_cb_compatible((expr),
|
|
888
|
-
typedef long (*
|
|
903
|
+
curlcheck_cb_compatible((expr), Wcurl_chunk_bgn_callback1) || \
|
|
904
|
+
curlcheck_cb_compatible((expr), Wcurl_chunk_bgn_callback2))
|
|
905
|
+
typedef long (*Wcurl_chunk_bgn_callback1)(struct curl_fileinfo *,
|
|
889
906
|
void *, int);
|
|
890
|
-
typedef long (*
|
|
907
|
+
typedef long (*Wcurl_chunk_bgn_callback2)(void *, void *, int);
|
|
891
908
|
|
|
892
909
|
/* evaluates to true if expr is of type curl_chunk_end_callback */
|
|
893
910
|
#define curlcheck_chunk_end_cb(expr) \
|
|
@@ -927,11 +944,11 @@ typedef long (*_curl_chunk_bgn_callback2)(void *, void *, int);
|
|
|
927
944
|
/* evaluates to true if expr is of type curl_interleave_callback */
|
|
928
945
|
#define curlcheck_interleave_cb(expr) \
|
|
929
946
|
(curlcheck_NULL(expr) || \
|
|
930
|
-
curlcheck_cb_compatible((expr),
|
|
931
|
-
curlcheck_cb_compatible((expr),
|
|
932
|
-
typedef size_t (*
|
|
947
|
+
curlcheck_cb_compatible((expr), Wcurl_interleave_callback1) || \
|
|
948
|
+
curlcheck_cb_compatible((expr), Wcurl_interleave_callback2))
|
|
949
|
+
typedef size_t (*Wcurl_interleave_callback1)(void *p, size_t s,
|
|
933
950
|
size_t n, void *u);
|
|
934
|
-
typedef size_t (*
|
|
951
|
+
typedef size_t (*Wcurl_interleave_callback2)(char *p, size_t s,
|
|
935
952
|
size_t n, void *u);
|
|
936
953
|
|
|
937
954
|
/* evaluates to true if expr is of type curl_prereq_callback */
|