diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-09 19:00:41 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-09 19:00:41 +0800 |
commit | 8ece8c40c2e59d2a39e05be707babc8828b5ad52 (patch) | |
tree | a88afea4c467e90b690af31d6ca798bb1100fc32 /util | |
parent | 0e42926d72a2c2d11ab4c5606b680d5d79604939 (diff) | |
download | pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.tar pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.tar.gz pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.tar.bz2 pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.tar.lz pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.tar.xz pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.tar.zst pttbbs-8ece8c40c2e59d2a39e05be707babc8828b5ad52.zip |
Drop Solaris support
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4115 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util')
-rw-r--r-- | util/bbsrf.c | 24 | ||||
-rw-r--r-- | util/reaper.c | 4 |
2 files changed, 5 insertions, 23 deletions
diff --git a/util/bbsrf.c b/util/bbsrf.c index a2ca235c..25b108fe 100644 --- a/util/bbsrf.c +++ b/util/bbsrf.c @@ -13,27 +13,17 @@ #include <sys/uio.h> #include "config.h" -#ifdef Solaris - #include <utmpx.h> - #define U_FILE UTMPX_FILE -#else - #include <utmp.h> - #define U_FILE UTMP_FILE -#endif +#include <utmp.h> +#define U_FILE UTMP_FILE #ifdef __FreeBSD__ #define UTMP_FILE _PATH_UTMP #endif -#ifndef Solaris - #if MAXHOSTNAMELEN < UT_HOSTSIZE - #define MAX_HOMENAME_LEN MAXHOSTNAMELEN - #else - #define MAX_HOMENAME_LEN UT_HOSTSIZE - #endif +#if MAXHOSTNAMELEN < UT_HOSTSIZE + #define MAX_HOMENAME_LEN MAXHOSTNAMELEN #else - /* according to /usr/include/utmpx.h ... */ - #define MAX_HOMENAME_LEN 256 + #define MAX_HOMENAME_LEN UT_HOSTSIZE #endif /* fill the hid with from hostname */ @@ -80,11 +70,7 @@ int main(void) int uid, rtv = 0; char *tty, ttybuf[32], hid[MAX_HOMENAME_LEN + 1]; -#ifndef Solaris openlog("bbsrf", LOG_PID | LOG_PERROR, LOG_USER); -#else - openlog("bbsrf", LOG_PID, LOG_USER); -#endif chdir(BBSHOME); uid = getuid(); diff --git a/util/reaper.c b/util/reaper.c index a5218706..d89f6e56 100644 --- a/util/reaper.c +++ b/util/reaper.c @@ -165,11 +165,7 @@ int check_last_login(void *data, int n, userec_t *u) { int main(int argc, char **argv) { now = time(NULL); -#ifdef Solaris - openlog("reaper", LOG_PID, SYSLOG_FACILITY); -#else openlog("reaper", LOG_PID | LOG_PERROR, SYSLOG_FACILITY); -#endif chdir(BBSHOME); attach_SHM(); |