From f51f81cd5d73c514205752d736af5c006f3771e5 Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 19 Apr 2008 01:33:56 +0000 Subject: - (internal) export osdep from cmsys, fixing bbsctl linking error git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4196 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- common/sys/osdep.c | 2 +- include/cmsys.h | 6 ++++++ include/proto.h | 6 ------ util/Makefile | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/sys/osdep.c b/common/sys/osdep.c index 434ca583..1c4b5cd1 100644 --- a/common/sys/osdep.c +++ b/common/sys/osdep.c @@ -253,7 +253,7 @@ setproctitle(const char *format,...) #endif -#if __FreeBSD__ +#ifdef __FreeBSD__ int cpuload(char *str) diff --git a/include/cmsys.h b/include/cmsys.h index 3f051d09..934ccd9d 100644 --- a/include/cmsys.h +++ b/include/cmsys.h @@ -76,6 +76,12 @@ extern int toconnect(const char *addr); extern int toread(int fd, void *buf, int len); extern int towrite(int fd, const void *buf, int len); +/* osdep */ +extern int cpuload(char *str); +extern void initsetproctitle(int argc, char **argv, char **envp); +extern void setproctitle(const char* format, ...) GCC_CHECK_FORMAT(1,2); + + /* sort.c */ extern int cmp_int(const void *a, const void *b); extern int cmp_int_desc(const void * a, const void * b); diff --git a/include/proto.h b/include/proto.h index 91b8ddd2..37fbf0e1 100644 --- a/include/proto.h +++ b/include/proto.h @@ -474,12 +474,6 @@ char *completeutmp_getname(int where); &completeutmp_compar, &completeutmp_permission, \ &completeutmp_getname) -/* osdep */ -int cpuload(char *str); -void initsetproctitle(int argc, char **argv, char **envp); -void setproctitle(const char* format, ...) GCC_CHECK_FORMAT(1,2); - - /* othello */ int othello_main(void); diff --git a/util/Makefile b/util/Makefile index 801489b1..20477500 100644 --- a/util/Makefile +++ b/util/Makefile @@ -106,8 +106,8 @@ installdiskstat: diskstat chmod 2755 /usr/local/bin/diskstat # for bbsctl. bbsctl should be compiled with bbs and installed with root -bbsctl: bbsctl.c util_osdep.o - $(CCACHE) $(CC) $(CFLAGS) ${LDFLAGS} -o $@ $@.c util_osdep.o +bbsctl: bbsctl.c + $(CCACHE) $(CC) $(CFLAGS) ${LDFLAGS} -o $@ $@.c $(LIBS) installbbsctl: bbsctl rm -f /home/bbs/bin/bbsctl -- cgit v1.2.3