mirror of
https://github.com/curl/curl.git
synced 2026-01-18 17:21:26 +01:00
curlx: add and use curlx_freopen()
To complement the existing `curlx_fopen()` internal API.
It's used by the curl's `--stderr` option.
`curlx_freopen()` adds two features to the bare `freopen()`:
- tracing for debug-enabled builds.
- Unicode and long-filename support for Windows builds.
In effect this adds long-filename and enables Unicode support for
the `--stderr <filename>` curl command-line option on Windows.
Also add to checksrc.
Follow-up to 2f17a9b654 #10673
Closes #19598
This commit is contained in:
@@ -106,6 +106,7 @@ my %banfunc = (
|
||||
"fclose" => 1,
|
||||
"fdopen" => 1,
|
||||
"fopen" => 1,
|
||||
"freopen" => 1,
|
||||
"open" => 1,
|
||||
"stat" => 1,
|
||||
);
|
||||
@@ -961,7 +962,7 @@ sub scanfile {
|
||||
}
|
||||
|
||||
# scan for use of non-binary fopen without the macro
|
||||
if($l =~ /^(.*\W)(curlx_fopen|CURLX_FOPEN_LOW)\s*\([^,]*, *\"([^"]*)/) {
|
||||
if($l =~ /^(.*\W)(curlx_fopen|CURLX_FOPEN_LOW|curlx_freopen|CURLX_FREOPEN_LOW)\s*\([^,]*, *\"([^"]*)/) {
|
||||
my $mode = $3;
|
||||
if($mode !~ /b/) {
|
||||
checkwarn("FOPENMODE",
|
||||
|
||||
Reference in New Issue
Block a user