PolarSSL v1.3.9
version.c
Go to the documentation of this file.
1 /*
2  * Version information
3  *
4  * Copyright (C) 2006-2014, Brainspark B.V.
5  *
6  * This file is part of PolarSSL (http://www.polarssl.org)
7  * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
8  *
9  * All rights reserved.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #if !defined(POLARSSL_CONFIG_FILE)
27 #include "polarssl/config.h"
28 #else
29 #include POLARSSL_CONFIG_FILE
30 #endif
31 
32 #if defined(POLARSSL_VERSION_C)
33 
34 #include "polarssl/version.h"
35 #include <string.h>
36 
37 const char version[] = POLARSSL_VERSION_STRING;
38 
39 unsigned int version_get_number()
40 {
41  return( POLARSSL_VERSION_NUMBER );
42 }
43 
44 void version_get_string( char *string )
45 {
46  memcpy( string, POLARSSL_VERSION_STRING,
47  sizeof( POLARSSL_VERSION_STRING ) );
48 }
49 
50 void version_get_string_full( char *string )
51 {
52  memcpy( string, POLARSSL_VERSION_STRING_FULL,
53  sizeof( POLARSSL_VERSION_STRING_FULL ) );
54 }
55 
56 #endif /* POLARSSL_VERSION_C */
#define POLARSSL_VERSION_STRING
Definition: version.h:54
Configuration options (set of defines)
#define POLARSSL_VERSION_NUMBER
The single version number has the following structure: MMNNPP00 Major version | Minor version | Patch...
Definition: version.h:53
#define POLARSSL_VERSION_STRING_FULL
Definition: version.h:55
unsigned int version_get_number(void)
Get the version number.
Run-time version information.
void version_get_string(char *string)
Get the version string (&quot;x.y.z&quot;).
void version_get_string_full(char *string)
Get the full version string (&quot;PolarSSL x.y.z&quot;).