mirror of
https://github.com/curl/curl.git
synced 2026-08-24 12:33:37 +03:00
examples: make them compile with compatibility functions disabled (Windows)
For MinGW this is `-DNO_OLDNAMES`, with MSVC it is `-D_CRT_DECLARE_NONSTDC_NAMES=0`. There have been some support for this before this patch. After this patch this is extended to all examples. (And also the standalone http/client programs, if here.) Cherry-picked from #15652 Closes #15789
This commit is contained in:
parent
37fb50a858
commit
46093d9e0e
6 changed files with 30 additions and 4 deletions
|
|
@ -30,6 +30,11 @@
|
|||
#include <sys/stat.h>
|
||||
#include <curl/curl.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#undef stat
|
||||
#define stat _stat
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This example shows an HTTP PUT operation. PUTs a file given as a command
|
||||
* line argument to the URL also given on the command line.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue