Imported Upstream version 2.5.11
[libapache-mod-security.git] / apache2 / msc_release.c
1 /*
2  * ModSecurity for Apache 2.x, http://www.modsecurity.org/
3  * Copyright (c) 2004-2009 Breach Security, Inc. (http://www.breach.com/)
4  *
5  * This product is released under the terms of the General Public Licence,
6  * version 2 (GPLv2). Please refer to the file LICENSE (included with this
7  * distribution) which contains the complete text of the licence.
8  *
9  * There are special exceptions to the terms and conditions of the GPL
10  * as it is applied to this software. View the full text of the exception in
11  * file MODSECURITY_LICENSING_EXCEPTION in the directory of this software
12  * distribution.
13  *
14  * If any of the files related to licensing are missing or if you have any
15  * other questions related to licensing please contact Breach Security, Inc.
16  * directly using the email address support@breach.com.
17  *
18  */
19
20 #include "msc_release.h"
21
22 modsec_build_type_rec modsec_build_type[] = {
23     { "-dev", 1 },     /* Development build */
24     { "-rc", 3 },      /* Release Candidate build */
25     { "", 9 },         /* Production build */
26     { "-breach", 9 },  /* Breach build */
27     { "-trunk", 9 },   /* Trunk build */
28     { NULL, -1 }       /* terminator */
29 };
30
31 int get_modsec_build_type(const char *name)
32 {
33     int i;
34
35     for (i = 0; modsec_build_type[i].name != NULL; i++) {
36         if (strcmp(((name == NULL) ? MODSEC_VERSION_TYPE : name), modsec_build_type[i].name) == 0) {
37             return modsec_build_type[i].val;
38         }
39     }
40
41     return 9; /* so no warning */
42 }