| 14 |
#include "menu.h" |
#include "menu.h" |
| 15 |
#include <time.h> |
#include <time.h> |
| 16 |
|
|
| 17 |
|
#ifdef HAVE_SYSTEM_V |
| 18 |
|
#include <sys/sem.h> |
| 19 |
|
#else |
| 20 |
|
#include <semaphore.h> |
| 21 |
|
#endif |
| 22 |
|
|
| 23 |
enum section_list_constant_t |
enum section_list_constant_t |
| 24 |
{ |
{ |
| 25 |
BBS_article_title_max_len = 160, |
BBS_article_title_max_len = 160, |
|
#if defined(__CYGWIN__) |
|
|
BBS_article_limit_per_section = 10000, |
|
|
#else |
|
| 26 |
BBS_article_limit_per_section = 50000, |
BBS_article_limit_per_section = 50000, |
|
#endif |
|
| 27 |
BBS_article_limit_per_page = 20, |
BBS_article_limit_per_page = 20, |
| 28 |
|
|
| 29 |
BBS_ontop_article_limit_per_section = 10, |
BBS_ontop_article_limit_per_section = 10, |
| 82 |
|
|
| 83 |
struct section_list_pool_t |
struct section_list_pool_t |
| 84 |
{ |
{ |
| 85 |
int shmid; |
size_t shm_size; |
| 86 |
SECTION_LIST sections[BBS_max_section]; |
SECTION_LIST sections[BBS_max_section]; |
| 87 |
int section_count; |
int section_count; |
| 88 |
|
#ifndef HAVE_SYSTEM_V |
| 89 |
|
sem_t sem[BBS_max_section + 1]; |
| 90 |
|
uint16_t read_lock_count[BBS_max_section + 1]; |
| 91 |
|
uint16_t write_lock_count[BBS_max_section + 1]; |
| 92 |
|
#else |
| 93 |
int semid; |
int semid; |
| 94 |
|
#endif |
| 95 |
TRIE_NODE *p_trie_dict_section_by_name; |
TRIE_NODE *p_trie_dict_section_by_name; |
| 96 |
TRIE_NODE *p_trie_dict_section_by_sid; |
TRIE_NODE *p_trie_dict_section_by_sid; |
| 97 |
}; |
}; |