diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-11-09 05:12:58 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-11-09 05:12:58 +0800 |
commit | 10624ecf13fd3d2537619cb895334257882e06ae (patch) | |
tree | 89ecd74c1f6af002f1e6c71aa764bb2359934c7f | |
parent | 9a9be56f087bcab02f706ff36785c4ba0fbc2f19 (diff) | |
download | pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.tar pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.tar.gz pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.tar.bz2 pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.tar.lz pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.tar.xz pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.tar.zst pttbbs-10624ecf13fd3d2537619cb895334257882e06ae.zip |
Linux compatible
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@566 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | docs/FAQ | 5 | ||||
-rw-r--r-- | docs/INSTALL | 1 | ||||
-rw-r--r-- | include/bbs.h | 11 | ||||
-rw-r--r-- | mbbsd/term.c | 6 |
4 files changed, 20 insertions, 3 deletions
@@ -1,3 +1,8 @@ +使用 Linux, 在 compile的時候出如 Makefile:20: *** missing separator. Stop. +請安裝 pmake, 並將 make alias 成 pmake . +如: apt-get install pmake + alias make pmake + 加大 shared-memory: 如果您是用 FreeBSD, 請在 /boot/loader.conf 裡面加入 kern.ipc.shmmax=104857600 diff --git a/docs/INSTALL b/docs/INSTALL index 2cff5971..5afa900f 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -34,6 +34,7 @@ 8. 執行 cd pttbbs 9. 如果之前沒有設定過 pttbbs.conf 的話, 請 cp sample/pttbbs.conf pttbbs.conf 10. 修改 pttbbs.conf + * 如果您是用 Linux系統, 請先安裝 pmake, 然後將 make alias 成 pmake * 11. 執行 make OSTYPE=FreeBSD BBSHOME=/home/bbs all install (Linux使用者請把 "FreeBSD" 改成 "linux") 12. 如果是新架起來的站, 請執行 cd sample; make install diff --git a/include/bbs.h b/include/bbs.h index 9163656b..a83cd84f 100644 --- a/include/bbs.h +++ b/include/bbs.h @@ -28,7 +28,6 @@ #include <sys/types.h> #include <dirent.h> #include <sys/mman.h> -#include <machine/param.h> #include <sys/ipc.h> #include <sys/shm.h> #include <sys/sem.h> @@ -49,9 +48,17 @@ #ifndef INCLUDE_VAR_H #include "var.h" #endif + +/* os dependant include file, define */ #ifdef FreeBSD #include <machine/limits.h> -#else + #include <machine/param.h> +#endif +#ifdef Linux + #include <sys/param.h> #include <limits.h> + #define strlcpy(a,b,c) strncpy(a,b,c) + #define strlcat(a,b,c) strncat(a,b,c) #endif + #endif /* INCLUDE_BBS_H */ diff --git a/mbbsd/term.c b/mbbsd/term.c index ed112346..a0f83354 100644 --- a/mbbsd/term.c +++ b/mbbsd/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.10 2002/09/11 07:16:49 kcwu Exp $ */ +/* $Id: term.c,v 1.11 2002/11/08 21:12:58 in2 Exp $ */ #include "bbs.h" int tgetent(const char *bp, char *name); @@ -52,6 +52,7 @@ outcf(int ch) } #endif +#ifndef Linux static void term_resize(int sig) { @@ -84,11 +85,14 @@ term_resize(int sig) signal(SIGWINCH, term_resize); } +#endif int term_init() { +#ifndef Linux signal(SIGWINCH, term_resize); +#endif return YEA; } |