2
* Copyright (C) 2000-2014 Free Software Foundation, Inc.
4
* This file is part of LIBTASN1.
6
* The LIBTASN1 library is free software; you can redistribute it
7
* and/or modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
11
* This library is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Lesser General Public License for more details.
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26
#include <string.h> /* for strverscmp */
32
* @req_version: Required version number, or %NULL.
34
* Check that the version of the library is at minimum the
35
* requested one and return the version string; return %NULL if the
36
* condition is not satisfied. If a %NULL is passed to this function,
37
* no check is done, but the version string is simply returned.
39
* See %ASN1_VERSION for a suitable @req_version string.
41
* Returns: Version string of run-time library, or %NULL if the
42
* run-time library does not meet the required version number.
45
asn1_check_version (const char *req_version)
47
if (!req_version || strverscmp (req_version, ASN1_VERSION) <= 0)