|
Packit |
284210 |
/*
|
|
Packit |
284210 |
* ModSecurity for Apache 2.x, http://www.modsecurity.org/
|
|
Packit |
284210 |
* Copyright (c) 2004-2013 Trustwave Holdings, Inc. (http://www.trustwave.com/)
|
|
Packit |
284210 |
*
|
|
Packit |
284210 |
* You may not use this file except in compliance with
|
|
Packit |
284210 |
* the License. You may obtain a copy of the License at
|
|
Packit |
284210 |
*
|
|
Packit |
284210 |
* http://www.apache.org/licenses/LICENSE-2.0
|
|
Packit |
284210 |
*
|
|
Packit |
284210 |
* If any of the files related to licensing are missing or if you have any
|
|
Packit |
284210 |
* other questions related to licensing please contact Trustwave Holdings, Inc.
|
|
Packit |
284210 |
* directly using the email address security@modsecurity.org.
|
|
Packit |
284210 |
*/
|
|
Packit |
284210 |
|
|
Packit |
284210 |
#include "msc_release.h"
|
|
Packit |
284210 |
|
|
Packit |
284210 |
static const struct modsec_build_type_rec {
|
|
Packit |
284210 |
char name[12]; /* pads at 16 bytes with val */
|
|
Packit |
284210 |
int val;
|
|
Packit |
284210 |
} modsec_build_type[] = {
|
|
Packit |
284210 |
{ "-dev", 1 }, /* Development build */
|
|
Packit |
284210 |
{ "-rc", 3 }, /* Release Candidate build */
|
|
Packit |
284210 |
{ "", 9 }, /* Production build */
|
|
Packit |
284210 |
{ "-tw", 9 }, /* Truswave Holdings build */
|
|
Packit |
284210 |
{ "-trunk", 9 } /* Trunk build */
|
|
Packit |
284210 |
};
|
|
Packit |
284210 |
|
|
Packit |
284210 |
int get_modsec_build_type(const char *name)
|
|
Packit |
284210 |
{
|
|
Packit |
284210 |
size_t i;
|
|
Packit |
284210 |
|
|
Packit |
284210 |
for (i = 0; i < sizeof(modsec_build_type)/sizeof(modsec_build_type[0]); i++) {
|
|
Packit |
284210 |
if (strcmp(((name == NULL) ? MODSEC_VERSION_TYPE : name), modsec_build_type[i].name) == 0) {
|
|
Packit |
284210 |
return modsec_build_type[i].val;
|
|
Packit |
284210 |
}
|
|
Packit |
284210 |
}
|
|
Packit |
284210 |
|
|
Packit |
284210 |
return 9; /* so no warning */
|
|
Packit |
284210 |
}
|