Code cleanup for ports

This commit is contained in:
Michiel Broek
2005-01-07 21:46:24 +00:00
parent e5457c6187
commit 8149bb99f6
10 changed files with 66 additions and 55 deletions

View File

@@ -149,12 +149,12 @@ void load_maincfg(void)
*/
sprintf(CFG.bbs_name, "MBSE BBS");
uname((struct utsname *)&un);
#ifdef __USE_GNU
#if defined(__USE_GNU)
sprintf(CFG.sysdomain, "%s.%s", un.nodename, un.domainname);
#else
#ifdef __linux__
#elif defined(__linux__)
sprintf(CFG.sysdomain, "%s.%s", un.nodename, un.__domainname);
#endif
#else
#error "Don't know un.domainname on this OS"
#endif
sprintf(CFG.comment, "MBSE BBS development");
sprintf(CFG.origin, "MBSE BBS. Made in the Netherlands");
@@ -1107,6 +1107,8 @@ void *scheduler(void)
}
fclose(fp);
}
#else
#error "Don't know how to get the loadaverage on this OS"
#endif
if (Load >= TCFG.maxload) {
if (!LOADhi) {

View File

@@ -49,7 +49,7 @@ char SigName[32][16] = { "NOSIGNAL",
"SIGIO", "SIGPWR", "SIGUNUSED"};
#elif defined(__PPC__)
#elif defined(__PPC__) || defined(__ppc__)
char SigName[32][16] = { "NOSIGNAL",
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL",

View File

@@ -363,6 +363,8 @@ void update_diskstat(void)
* XxxxBSD has the info in the statfs structure.
*/
tmp->ro = (sfs.f_flags & MNT_RDONLY);
#else
#error "Don't know how to get sfs read-only status"
#endif
}
}
@@ -385,6 +387,8 @@ void add_path(char *lpath)
struct statfs *mntbuf;
long mntsize;
int i;
#else
#error "Don't know how to get mount paths"
#endif
if (strlen(lpath) == 0) {