-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn://cherokee-project.com/cherokee/trunk@493 5dc97367-97…
…f1-0310-9951-d761b3857238
- Loading branch information
Showing
13 changed files
with
145 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1267,3 +1267,4 @@ cherokee_close_fd (cint_t fd) | |
|
||
return (re == 0) ? ret_ok : ret_error; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,6 @@ | |
|
||
#include <cherokee/buffer.h> | ||
|
||
|
||
CHEROKEE_BEGIN_DECLS | ||
|
||
#ifdef _WIN32 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ | ||
|
||
/* Cherokee | ||
* | ||
* Authors: | ||
* Alvaro Lopez Ortega <alvaro@alobbs.com> | ||
* | ||
* Copyright (C) 2001-2006 Alvaro Lopez Ortega | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of version 2 of the GNU General Public | ||
* License as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
* USA | ||
*/ | ||
|
||
#include "common-internal.h" | ||
#include "version.h" | ||
|
||
|
||
ret_t | ||
cherokee_version_add (cherokee_buffer_t *buf, cherokee_server_token_t level) | ||
{ | ||
ret_t ret; | ||
|
||
switch (level) { | ||
case cherokee_version_product: | ||
ret = cherokee_buffer_add_str (buf, "Cherokee web server"); | ||
case cherokee_version_minor: | ||
ret = cherokee_buffer_add_str (buf, "Cherokee web server " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION); | ||
case cherokee_version_minimal: | ||
ret = cherokee_buffer_add_str (buf, "Cherokee web server " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION "." PACKAGE_MICRO_VERSION); | ||
case cherokee_version_os: | ||
ret = cherokee_buffer_add_str (buf, "Cherokee web server " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION "." PACKAGE_MICRO_VERSION " (" OS_TYPE ")"); | ||
case cherokee_version_full: | ||
ret = cherokee_buffer_add_str (buf, "Cherokee web server " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION "." PACKAGE_MICRO_VERSION " (" OS_TYPE ")"); | ||
} | ||
|
||
return ret; | ||
} | ||
|
||
|
||
ret_t | ||
cherokee_version_add_w_port (cherokee_buffer_t *buf, cherokee_server_token_t level, cuint_t port) | ||
{ | ||
ret_t ret; | ||
|
||
switch (level) { | ||
case cherokee_version_product: | ||
ret = cherokee_buffer_add_va (buf, "Cherokee web server Port %d", port); | ||
case cherokee_version_minor: | ||
ret = cherokee_buffer_add_va (buf, "Cherokee web server Port %d " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION, port); | ||
case cherokee_version_minimal: | ||
ret = cherokee_buffer_add_va (buf, "Cherokee web server Port %d " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION "." PACKAGE_MICRO_VERSION, port); | ||
case cherokee_version_os: | ||
ret = cherokee_buffer_add_va (buf, "Cherokee web server Port %d " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION "." PACKAGE_MICRO_VERSION " (" OS_TYPE ")", port); | ||
case cherokee_version_full: | ||
ret = cherokee_buffer_add_va (buf, "Cherokee web server Port %d " PACKAGE_MAJOR_VERSION "." PACKAGE_MINOR_VERSION "." PACKAGE_MICRO_VERSION " (" OS_TYPE ")", port); | ||
} | ||
|
||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ | ||
|
||
/* Cherokee | ||
* | ||
* Authors: | ||
* Alvaro Lopez Ortega <alvaro@alobbs.com> | ||
* | ||
* Copyright (C) 2001-2006 Alvaro Lopez Ortega | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of version 2 of the GNU General Public | ||
* License as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 | ||
* USA | ||
*/ | ||
|
||
#if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION) | ||
# error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents." | ||
#endif | ||
|
||
|
||
#ifndef CHEROKEE_VERSION_H | ||
#define CHEROKEE_VERSION_H | ||
|
||
#include <cherokee/common.h> | ||
#include <cherokee/buffer.h> | ||
|
||
CHEROKEE_BEGIN_DECLS | ||
|
||
|
||
typedef enum { | ||
cherokee_version_product, | ||
cherokee_version_minor, | ||
cherokee_version_minimal, | ||
cherokee_version_os, | ||
cherokee_version_full | ||
} cherokee_server_token_t; | ||
|
||
ret_t cherokee_version_add (cherokee_buffer_t *buf, cherokee_server_token_t level); | ||
ret_t cherokee_version_add_w_port (cherokee_buffer_t *buf, cherokee_server_token_t level, cuint_t port); | ||
|
||
|
||
CHEROKEE_END_DECLS | ||
|
||
#endif /* CHEROKEE_VERSION_H */ |