diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 09:33:56 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 09:33:56 +0800 |
commit | f51f81cd5d73c514205752d736af5c006f3771e5 (patch) | |
tree | c0e21eefcba41ea4e081c6dc68ffd11bf3164a5b | |
parent | 16cbbae762ff2c52b073e618bd2a1a64521b560d (diff) | |
download | pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.tar pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.tar.gz pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.tar.bz2 pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.tar.lz pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.tar.xz pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.tar.zst pttbbs-f51f81cd5d73c514205752d736af5c006f3771e5.zip |
- (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
-rw-r--r-- | common/sys/osdep.c | 2 | ||||
-rw-r--r-- | include/cmsys.h | 6 | ||||
-rw-r--r-- | include/proto.h | 6 | ||||
-rw-r--r-- | 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 |