1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00
Viktor Szakats e8e6bc2c50 build: improve building in ISO and C89 modes, test in CI
Note: On Linux with glibc, ISO mode also requires setting
the `_DEFAULT_SOURCE` macro to enable necessary POSIX features when
building tests (for `popen()`, `pclose()` and examples (for `fileno()`,
`tcsetattr()`). On other platforms and environments it may require
something else.

- replace `strdup()` with local implementation.
- replace `getline()` with C89 `fgets()`.
- replace `u_char`, `u_int` with C89 types.
- fix type mismatches in chacha-poly1305 code.
- silence `-Wno-format-nonliteral` locally. The global method was not
  effective (like because it was overridden by `-Wformat=2`) and caused
  these warnings when building in C89 mode.
- GHA: test ISO C89 in zlib-enabled Linux jobs with all crypto backends.
- fix formatting nits along the way.
- configure, cmake: silence silly `-Wno-comma` warnings with clang in
  C89 mode.
- examples: include `select.h` again, where `select()` is used. As its
  canonical header. Seen required on Linux glibc non-GNU/ISO builds.
  Follow-up to a683133dfe #999

Assisted-by: Raul Tambre
Ref: #1674

Closes #1688
2026-04-08 15:30:16 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-06-07 08:18:55 +02:00
2023-08-18 11:20:58 +00:00
2011-04-04 13:31:33 +02:00
2023-08-18 11:20:58 +00:00

libssh2 - SSH2 library

libssh2 is a library implementing the SSH2 protocol, available under the revised BSD license.

Web site

Mailing list

BSD Licensed

Web site source code

Installation instructions:

Description
libssh2 - это библиотека, реализующая протокол SSH2, доступная по пересмотренной лицензии BSD
Readme 26 MiB
Languages
C 84.2%
CMake 3.7%
Perl 3.2%
M4 2.7%
Shell 2.3%
Other 3.7%