blob: 099e82ad2da09e8a20cbfc5c8bce92487e35ab85 [file] [log] [blame]
Paul Bakker0f90d7d2014-04-30 11:49:44 +02001/*
2 * Version feature 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#include "polarssl/config.h"
27
28#if defined(POLARSSL_VERSION_C)
29
30#include "polarssl/version.h"
31
32#include <string.h>
33
34#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
35 !defined(EFI32)
36#define snprintf _snprintf
37#endif
38
39const char *features[] = {
40FEATURE_DEFINES
41 NULL
42};
43
44int version_check_feature( const char *feature )
45{
46 const char **idx = features;
47
48 if( feature == NULL )
49 return( -1 );
50
51 while( *idx != NULL )
52 {
53 if( !strcasecmp( *idx, feature ) )
54 return( 0 );
55 idx++;
56 }
57 return( -1 );
58}
59
60#endif /* POLARSSL_VERSION_C */