mirror of
https://github.com/curl/curl.git
synced 2026-06-04 23:34:18 +03:00
tidy-up: misc
- lib1531: fix to use `curl_off_t`. - src/tool_doswin: merge `_WIN32` guards. - src/tool_doswin: limit `S_ISCHR()` to MS-DOS. - src: dedupe `CURL_O_BINARY` macro into `tool_setup.h`. - CMake/CurlTests.c: cleanup/formatting `HAVE_FILE_OFFSET_BITS` test. - examples/httpput-postfields: delete unused include. - spelling: MultiSSL. - whitespace. Ref: #15652 Closes #15799
This commit is contained in:
parent
415741ef94
commit
7a70b46481
11 changed files with 29 additions and 39 deletions
|
|
@ -39,11 +39,6 @@
|
|||
|
||||
#include "memdebug.h" /* keep this as LAST include */
|
||||
|
||||
#ifdef O_BINARY
|
||||
#define CURL_O_BINARY O_BINARY
|
||||
#else
|
||||
#define CURL_O_BINARY 0
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#define OPENMODE S_IREAD | S_IWRITE
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -45,8 +45,16 @@
|
|||
#ifdef _WIN32
|
||||
# undef PATH_MAX
|
||||
# define PATH_MAX MAX_PATH
|
||||
|
||||
# define _use_lfn(f) (1) /* long filenames always available */
|
||||
#elif !defined(__DJGPP__) || (__DJGPP__ < 2) /* DJGPP 2.0 has _use_lfn() */
|
||||
# define _use_lfn(f) (0) /* long filenames never available */
|
||||
#elif defined(__DJGPP__)
|
||||
# include <fcntl.h> /* _use_lfn(f) prototype */
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
|
||||
#ifndef S_ISCHR
|
||||
# ifdef S_IFCHR
|
||||
# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
|
||||
|
|
@ -55,15 +63,6 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# define _use_lfn(f) (1) /* long filenames always available */
|
||||
#elif !defined(__DJGPP__) || (__DJGPP__ < 2) /* DJGPP 2.0 has _use_lfn() */
|
||||
# define _use_lfn(f) (0) /* long filenames never available */
|
||||
#elif defined(__DJGPP__)
|
||||
# include <fcntl.h> /* _use_lfn(f) prototype */
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
/* only used by msdosify() */
|
||||
static SANITIZEcode truncate_dryrun(const char *path,
|
||||
const size_t truncate_pos);
|
||||
|
|
|
|||
|
|
@ -111,14 +111,6 @@ extern const unsigned char curl_ca_embed[];
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* since O_BINARY is used in bitmasks, setting it to zero makes it usable in
|
||||
source code but yet it does not ruin anything */
|
||||
#ifdef O_BINARY
|
||||
#define CURL_O_BINARY O_BINARY
|
||||
#else
|
||||
#define CURL_O_BINARY 0
|
||||
#endif
|
||||
|
||||
#ifndef SOL_IP
|
||||
# define SOL_IP IPPROTO_IP
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -66,6 +66,14 @@ extern FILE *tool_stderr;
|
|||
# include "tool_strdup.h"
|
||||
#endif
|
||||
|
||||
/* since O_BINARY is used in bitmasks, setting it to zero makes it usable in
|
||||
source code but yet it does not ruin anything */
|
||||
#ifdef O_BINARY
|
||||
#define CURL_O_BINARY O_BINARY
|
||||
#else
|
||||
#define CURL_O_BINARY 0
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# define CURL_STRICMP(p1, p2) _stricmp(p1, p2)
|
||||
#elif defined(HAVE_STRCASECMP)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue