mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-20 02:42:09 +03:00
tidy-up: C header use
- drop unused or duplicate C headers.
- add missing ones (that worked by chance).
(`string.h`, `stdlib.h`)
- mention the functions that need certain headers.
- move some headers from crypto header to crypto C source.
- reorder headers in some places.
- simplify the #if tree for `sys/select.h` in `libssh2_priv.h`.
- move scp-specific macros next to their header to `scp.c`
Follow-up to 5db836b2a8
Closes #999
This commit is contained in:
@@ -40,21 +40,18 @@
|
||||
#include "libssh2_priv.h"
|
||||
#include "misc.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef WIN32
|
||||
/* Force parameter type. */
|
||||
#define recv(s, b, l, f) recv((s), (b), (int)(l), (f))
|
||||
#define send(s, b, l, f) send((s), (b), (int)(l), (f))
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* snprintf not in Visual Studio CRT and _snprintf dangerously incompatible.
|
||||
We provide a safe wrapper if snprintf not found */
|
||||
#ifdef LIBSSH2_SNPRINTF
|
||||
|
||||
Reference in New Issue
Block a user