Fixes for Ubuntu 9.10

This commit is contained in:
Michiel Broek 2009-10-04 10:34:10 +02:00
parent 1ad3bd46ce
commit bc0a81bb28
7 changed files with 3152 additions and 2392 deletions

View File

@ -1,6 +1,17 @@
$Id: ChangeLog,v 1.1225 2008/12/28 12:28:25 mbse Exp $
v0.95.5 29-Nov-2008 v0.95.6 04-Oct-2009
general:
This may need more patches for Ubuntu 9.10.
mbfido:
Patch to compile on Ubuntu 9.10.
hatch:
Patch to compile on Ubuntu 9.10.
v0.95.5 29-Nov-2008 - 04-Oct-2009
upgrade: upgrade:
Start mbsetup, enter global setup, leave and save. Start mbsetup, enter global setup, leave and save.

3
TODO
View File

@ -1,6 +1,5 @@
$Id: TODO,v 1.353 2008/11/29 13:59:33 mbse Exp $
MBSE BBS V0.95.5 TODO list. MBSE BBS V0.95.6 TODO list.
--------------------------- ---------------------------
These are a list of things that must be implemented one way or These are a list of things that must be implemented one way or

5441
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,4 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
# $Id: configure.ac,v 1.29 2008/11/29 13:59:33 mbse Exp $
AC_INIT(lib/mbselib.h) AC_INIT(lib/mbselib.h)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
@ -13,7 +12,7 @@ AC_SUBST(SUBDIRS)
PACKAGE="mbsebbs" PACKAGE="mbsebbs"
MAJOR="0" MAJOR="0"
MINOR="95" MINOR="95"
REVISION="5" REVISION="6"
VERSION="$MAJOR.$MINOR.$REVISION" VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2008 Michiel Broek, All Rights Reserved" COPYRIGHT="Copyright (C) 1997-2008 Michiel Broek, All Rights Reserved"
SHORTRIGHT="Copyright (C) 1997-2008 M. Broek" SHORTRIGHT="Copyright (C) 1997-2008 M. Broek"

View File

@ -1,13 +1,12 @@
/***************************************************************************** /*****************************************************************************
* *
* $Id: flock.c,v 1.5 2004/02/21 17:22:02 mbroek Exp $
* Purpose ...............: File locker * Purpose ...............: File locker
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2004 * Copyright (C) 1997-2009
* *
* Michiel Broek FIDO: 2:2801/16 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 Internet: mbroek@ux123.pttnwb.nl * Beekmansbos 10
* 1971 BV IJmuiden * 1971 BV IJmuiden
* the Netherlands * the Netherlands
* *
@ -35,46 +34,44 @@
int f_lock(char *fn) int f_lock(char *fn)
{ {
int lfd=-1; int lfd=-1;
struct flock fl; struct flock fl;
struct stat st; struct stat st;
if (fn) { if (fn) {
if ((lfd = open(fn,O_RDWR | O_CREAT)) < 0) { if ((lfd = open(fn, O_RDWR | O_CREAT, 0644)) < 0) {
perror(""); WriteError("$Error opening file %s", fn);
WriteError("Error opening file %s", fn); return -1;
return -1;
}
fl.l_type=F_WRLCK;
fl.l_whence=0;
fl.l_start=0L;
fl.l_len=0L;
fl.l_pid=getpid();
if (fcntl(lfd,F_SETLK,&fl) != 0) {
if (errno != EAGAIN)
Syslog('+', "Error locking file %s",fn);
close(lfd);
return -1;
}
if (stat(fn,&st) != 0) {
perror("");
WriteError("Error accessing file %s",fn);
close(lfd);
return -1;
}
} }
return lfd;
fl.l_type=F_WRLCK;
fl.l_whence=0;
fl.l_start=0L;
fl.l_len=0L;
fl.l_pid=getpid();
if (fcntl(lfd,F_SETLK,&fl) != 0) {
if (errno != EAGAIN)
Syslog('+', "Error locking file %s",fn);
close(lfd);
return -1;
}
if (stat(fn,&st) != 0) {
WriteError("$Error accessing file %s",fn);
close(lfd);
return -1;
}
}
return lfd;
} }
void funlock(int fd) void funlock(int fd)
{ {
close(fd); close(fd);
return; return;
} }

View File

@ -1,10 +1,9 @@
/***************************************************************************** /*****************************************************************************
* *
* $Id: hatch.c,v 1.17 2005/12/03 15:09:06 mbse Exp $
* Purpose ...............: Hatch files * Purpose ...............: Hatch files
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2005 * Copyright (C) 1997-2009
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -51,8 +50,7 @@ void Hatch()
FILE *fp; FILE *fp;
struct tm *Tm; struct tm *Tm;
time_t Now; time_t Now;
int LastDay; int LastDay, HatchToday;
int HatchToday;
temp = calloc(PATH_MAX, sizeof(char)); temp = calloc(PATH_MAX, sizeof(char));
Syslog('+', "Pass: hatch files"); Syslog('+', "Pass: hatch files");
@ -76,7 +74,7 @@ void Hatch()
return; return;
} }
fread(&hatchhdr, sizeof(hatchhdr), 1, fp); (void)fread(&hatchhdr, sizeof(hatchhdr), 1, fp);
while (fread(&hatch, hatchhdr.recsize, 1, fp) == 1) { while (fread(&hatch, hatchhdr.recsize, 1, fp) == 1) {
if (hatch.Active) { if (hatch.Active) {

View File

@ -589,7 +589,8 @@ int main(int argc, char **argv)
} }
temp = calloc(10240, sizeof(char)); temp = calloc(10240, sizeof(char));
while (fgets(temp, 10240, stdin)) while (fgets(temp, 10240, stdin))
fprintf(ofp, temp); (void)fputs(temp, ofp);
// fprintf(ofp, temp);
free(temp); free(temp);
for (envrecip = &envrecip_start; *envrecip; envrecip = &((*envrecip)->next)) { for (envrecip = &envrecip_start; *envrecip; envrecip = &((*envrecip)->next)) {
@ -790,7 +791,7 @@ int TossMail(void)
if ((rc = unpack(fname)) == 0) { if ((rc = unpack(fname)) == 0) {
files_ok++; files_ok++;
rc = TossPkts(); rc = TossPkts();
chdir(inbound); (void)chdir(inbound);
} else } else
WriteError("Error unpacking file %s", fname); WriteError("Error unpacking file %s", fname);
else else