diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-09-21 08:17:59 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-09-21 08:17:59 +0800 |
commit | 3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980 (patch) | |
tree | 7b87488cf86f11b065a9c9504bfd3268178f55e6 /util | |
parent | 6aafb916266e197bdf3261981aad70e9f94b3153 (diff) | |
download | pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.tar pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.tar.gz pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.tar.bz2 pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.tar.lz pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.tar.xz pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.tar.zst pttbbs-3d8e3bc3cebd807bd32d8e9e11b0555aa24eb980.zip |
* fix compile
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3566 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/shmctl.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/util/shmctl.c b/util/shmctl.c index 939fab39..42ba9415 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -980,24 +980,24 @@ int torb(int argc, char **argv) return 0; } -int fixbcache(int argc, char **argv) +void lockbcache(void) { - void lockbcache(void) - { - int i; - for( i = 0 ; i < 10 && SHM->Bbusystate ; ++i ){ - printf("SHM->Bbusystate is currently locked (value: %d). " - "please wait... ", SHM->Bbusystate); - sleep(1); - } - if( i == 10 ) - puts("steal bcache lock\n"); - SHM->Bbusystate = 1; - } - void unlockbcache(void) - { - SHM->Bbusystate = 0; + int i; + for( i = 0 ; i < 10 && SHM->Bbusystate ; ++i ){ + printf("SHM->Bbusystate is currently locked (value: %d). " + "please wait... ", SHM->Bbusystate); + sleep(1); } + if( i == 10 ) + puts("steal bcache lock\n"); + SHM->Bbusystate = 1; +} +void unlockbcache(void) +{ + SHM->Bbusystate = 0; +} +int fixbcache(int argc, char **argv) +{ int n, fd, bid, changed = 0; boardheader_t bh; @@ -1132,7 +1132,7 @@ int showstat(int argc, char *argv[]) if(argv[1] && strcmp(argv[1],"-c")==0) flag_clear=1; for(i=0; i<STAT_NUM; i++) { - char *desc= i*sizeof(char*)<sizeof(stat_desc)?stat_desc[i]:"?"; + const char *desc= i*sizeof(char*)<sizeof(stat_desc)?stat_desc[i]:"?"; printf("%s:\t%d\n", desc, SHM->statistic[i]); } if(flag_clear) |