mirror of
https://github.com/libssh2/libssh2.git
synced 2025-10-29 00:54:50 +03:00
- in `win32/libssh2_config.h` replace `_CRT_SECURE_NO_DEPRECATE` with `_CRT_SECURE_NO_WARNINGS`, to use the official macro for this, like in CMake. Also, it's now safe to move it back under `_MSC_VER`. Suppressing: `warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead.` `warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead.` - move `_CRT_NONSTDC_NO_DEPRECATE` to `example` and `tests`. Not needed for `src`. Suppressing: `warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup.` `warning C4996: 'write': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _write.` - move `_WINSOCK_DEPRECATED_NO_WARNINGS` from source files to CMake files, in `example` and `tests`. Also limit this to MSVC. Suppressing: `warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead` TODO: try fixing these instead of suppressing. Closes #929
39 lines
702 B
C
39 lines
702 B
C
#ifndef LIBSSH2_CONFIG_H
|
|
#define LIBSSH2_CONFIG_H
|
|
|
|
#ifndef WIN32
|
|
#define WIN32
|
|
#endif
|
|
|
|
#define HAVE_IOCTLSOCKET
|
|
#define HAVE_SELECT
|
|
#define HAVE_SNPRINTF
|
|
|
|
#ifdef __MINGW32__
|
|
# define HAVE_UNISTD_H
|
|
# define HAVE_INTTYPES_H
|
|
# define HAVE_SYS_TIME_H
|
|
# define HAVE_GETTIMEOFDAY
|
|
# define HAVE_LONGLONG
|
|
# define HAVE_STRTOLL
|
|
#elif defined(_MSC_VER)
|
|
# ifndef _CRT_SECURE_NO_WARNINGS
|
|
# define _CRT_SECURE_NO_WARNINGS
|
|
# endif
|
|
# if _MSC_VER >= 1310
|
|
# define HAVE_LONGLONG
|
|
# endif
|
|
# if _MSC_VER >= 1800
|
|
# define HAVE_STRTOLL
|
|
# endif
|
|
# if _MSC_VER < 1900
|
|
# undef HAVE_SNPRINTF
|
|
# if _MSC_VER < 1500
|
|
# define vsnprintf _vsnprintf
|
|
# endif
|
|
# define strdup _strdup
|
|
# endif
|
|
#endif
|
|
|
|
#endif /* LIBSSH2_CONFIG_H */
|