libssh2

Форк
0
/
libssh2_version.3 
42 строки · 1.3 Кб
1
.\" Copyright (C) The libssh2 project and its contributors.
2
.\" SPDX-License-Identifier: BSD-3-Clause
3
.TH libssh2_version 3 "23 Feb 2009" "libssh2" "libssh2"
4
.SH NAME
5
libssh2_version - return the libssh2 version number
6
.SH SYNOPSIS
7
.nf
8
#include <libssh2.h>
9

10
const char *
11
libssh2_version(int required_version);
12
.fi
13
.SH DESCRIPTION
14
If \fIrequired_version\fP is lower than or equal to the version number of the
15
libssh2 in use, the version number of libssh2 is returned as a pointer to a
16
zero terminated string.
17

18
The \fIrequired_version\fP should be the version number as constructed by the
19
LIBSSH2_VERSION_NUM define in the libssh2.h public header file, which is a 24
20
bit number in the 0xMMmmpp format. MM for major, mm for minor and pp for patch
21
number.
22
.SH RETURN VALUE
23
The version number of libssh2 is returned as a pointer to a zero terminated
24
string or NULL if the \fIrequired_version\fP is not fulfilled.
25
.SH EXAMPLE
26
To make sure you run with the correct libssh2 version:
27

28
.nf
29
if(!libssh2_version(LIBSSH2_VERSION_NUM)) {
30
  fprintf(stderr, \&"Runtime libssh2 version too old.\&");
31
  exit(1);
32
}
33
.fi
34

35
Unconditionally get the version number:
36

37
.nf
38
printf(\&"libssh2 version: %s\&", libssh2_version(0));
39
.fi
40
.SH AVAILABILITY
41
This function was added in libssh2 1.1, in previous versions there way no way
42
to extract this info in run-time.
43

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.