* aidepost.c, citadel.c, citmail.c, mailinglist.c, msgform.c,
netmailer.c, netpoll.c, netproc.c, rcit.c, readlog.c, setup.c,
stats.c, userlist.c, whobbs.c: return type of main() is int
* citadel.c, commands.c, messages.c: use time_t properly
* citserver.c: include <limits.h>
19 files changed:
+1998-09-30 Nathan Bryant <bryant@cs.usm.maine.edu>
+ * Makefile.in: new variable PTHREAD_DEFS for portability
+ * aidepost.c, citadel.c, citmail.c, mailinglist.c, msgform.c,
+ netmailer.c, netpoll.c, netproc.c, rcit.c, readlog.c, setup.c,
+ stats.c, userlist.c, whobbs.c: return type of main() is int
+ * citadel.c, commands.c, messages.c: use time_t properly
+ * citserver.c: include <limits.h>
+
Tue Sep 29 23:17:34 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* room_ops.c: modified usergoto() to look at the new data structures
for counting new messages and such.
Tue Sep 29 23:17:34 EDT 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* room_ops.c: modified usergoto() to look at the new data structures
for counting new messages and such.
CC=@CC@
SERVER_LFLAGS=@LIBS@
CURSES=@CURSES@
CC=@CC@
SERVER_LFLAGS=@LIBS@
CURSES=@CURSES@
+PTHREAD_DEFS=-D_REENTRANT
client: $(CLIENT_TARGETS)
client: $(CLIENT_TARGETS)
$(LFLAGS) $(SERVER_LFLAGS) -o citserver
citserver.o: citserver.c
$(LFLAGS) $(SERVER_LFLAGS) -o citserver
citserver.o: citserver.c
- $(CC) $(CFLAGS) -D_REENTRANT -c citserver.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c citserver.c
- $(CC) $(CFLAGS) -D_REENTRANT -c user_ops.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c user_ops.c
- $(CC) $(CFLAGS) -D_REENTRANT -c room_ops.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c room_ops.c
- $(CC) $(CFLAGS) -D_REENTRANT -c dynloader.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c dynloader.c
- $(CC) $(CFLAGS) -D_REENTRANT -c file_ops.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c file_ops.c
- $(CC) $(CFLAGS) -D_REENTRANT -c support.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c support.c
- $(CC) $(CFLAGS) -D_REENTRANT -c msgbase.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c msgbase.c
locate_host.o: locate_host.c
locate_host.o: locate_host.c
- $(CC) $(CFLAGS) -D_REENTRANT -c locate_host.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c locate_host.c
modules/serv_chat.so: serv_chat.o
$(CC) -shared -o modules/serv_chat.so serv_chat.o
serv_chat.o: serv_chat.c
modules/serv_chat.so: serv_chat.o
$(CC) -shared -o modules/serv_chat.so serv_chat.o
serv_chat.o: serv_chat.c
- $(CC) $(CFLAGS) -D_REENTRANT -fPIC -c serv_chat.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -fPIC -c serv_chat.c
modules/serv_test.so: serv_test.o
$(CC) -shared -o modules/serv_test.so serv_test.o
serv_test.o: serv_test.c
modules/serv_test.so: serv_test.o
$(CC) -shared -o modules/serv_test.so serv_test.o
serv_test.o: serv_test.c
- $(CC) $(CFLAGS) -D_REENTRANT -fPIC -c serv_test.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -fPIC -c serv_test.c
housekeeping.o: housekeeping.c
housekeeping.o: housekeeping.c
- $(CC) $(CFLAGS) -D_REENTRANT -c housekeeping.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c housekeeping.c
- $(CC) $(CFLAGS) -D_REENTRANT -c database.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c database.c
- $(CC) $(CFLAGS) -D_REENTRANT -c control.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c control.c
- $(CC) $(CFLAGS) -D_REENTRANT -c logging.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c logging.c
- $(CC) $(CFLAGS) -D_REENTRANT -c config.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c config.c
- $(CC) $(CFLAGS) -D_REENTRANT -c sysdep.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c sysdep.c
aidepost: aidepost.o config.o
$(CC) $(CFLAGS) aidepost.o config.o $(LFLAGS) -o aidepost
aidepost: aidepost.o config.o
$(CC) $(CFLAGS) aidepost.o config.o $(LFLAGS) -o aidepost
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char tempbase[32];
char temptmp[64];
{
char tempbase[32];
char temptmp[64];
char buf[256];
char fl[256];
struct tm *tmbuf;
char buf[256];
char fl[256];
struct tm *tmbuf;
int linecount = 2;
serv_puts("LIST");
int linecount = 2;
serv_puts("LIST");
flags, extract_int(buf,0), username, roomname);
printf("from <%s> using <%s>, idle %ld:%02ld:%02ld\n",
fromhost, clientsoft,
flags, extract_int(buf,0), username, roomname);
printf("from <%s> using <%s>, idle %ld:%02ld:%02ld\n",
fromhost, clientsoft,
- idlehours, idlemins, idlesecs);
+ (long)idlehours, (long)idlemins, (long)idlesecs);
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
int a,b,mcmd;
int termn8 = 0;
{
int a,b,mcmd;
int termn8 = 0;
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
int is_test = 0;
int deliver_to_ignet = 0;
{
int is_test = 0;
int deliver_to_ignet = 0;
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <syslog.h>
#include <dlfcn.h>
#include <pthread.h>
#include <syslog.h>
#include <dlfcn.h>
*/
void do_keepalive(void) {
char buf[256];
*/
void do_keepalive(void) {
char buf[256];
- static long idlet = 0L;
- long now;
+ static time_t idlet = 0;
+ time_t now;
time(&now);
if ((now - idlet) < ((long)S_KEEPALIVE)) return;
time(&now);
if ((now - idlet) < ((long)S_KEEPALIVE)) return;
int a; /* the watchdog timer in effect if necessary */
fd_set rfds;
struct timeval tv;
int a; /* the watchdog timer in effect if necessary */
fd_set rfds;
struct timeval tv;
+ time_t start_time, now;
char inbuf[2];
time(&start_time);
char inbuf[2];
time(&start_time);
/*
* The main loop. We don't need any command-line parameters to this program.
*/
/*
* The main loop. We don't need any command-line parameters to this program.
*/
char header[3];
char fields[32][1024];
char header[3];
char fields[32][1024];
struct cittext *ptr;
char wordbuf[MAXWORDBUF];
char buf[256];
struct cittext *ptr;
char wordbuf[MAXWORDBUF];
char buf[256];
- long last_server_msg,now;
+ time_t last_server_msg,now;
/*
* we're going to keep track of the last time we talked to
/*
* we're going to keep track of the last time we talked to
char buf[256];
char m_subject[256];
char from[256];
char buf[256];
char m_subject[256];
char from[256];
struct tm *tm;
int format_type = 0;
int fr = 0;
struct tm *tm;
int format_type = 0;
int fr = 0;
{
FILE *fp, *atpipe;
int a,b,e_ex_code;
{
FILE *fp, *atpipe;
int a,b,e_ex_code;
+ time_t now;
+ long beg;
char datestr[64];
int cksum = 0;
struct AttachedFile *AttachList = NULL;
char datestr[64];
int cksum = 0;
struct AttachedFile *AttachList = NULL;
printf("attach File\n");
if (strlen(boundary)==0) {
sprintf(boundary, "Citadel-Attachment-%ld.%d",
printf("attach File\n");
if (strlen(boundary)==0) {
sprintf(boundary, "Citadel-Attachment-%ld.%d",
- time(NULL), getpid() );
+ (long)time(NULL), getpid() );
}
newprompt("Filename: ", buf, 68);
if (access(buf, R_OK)==0) {
}
newprompt("Filename: ", buf, 68);
if (access(buf, R_OK)==0) {
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
struct tm *tm;
int a,b,e,mtype,aflag;
{
struct tm *tm;
int a,b,e,mtype,aflag;
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
int a;
FILE *fp,*rmail;
{
int a;
FILE *fp,*rmail;
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char buf[256];
char remote_nodename[32];
{
char buf[256];
char remote_nodename[32];
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char allst[32];
FILE *allfp;
{
char allst[32];
FILE *allfp;
rewrite_syslist();
printf("netproc: processing ended.\n");
cleanup(0);
rewrite_syslist();
printf("netproc: processing ended.\n");
cleanup(0);
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char aaa[128],bbb[128],ccc[128];
char author[128],recipient[128],room[128],node[128],path[512];
{
char aaa[128],bbb[128],ccc[128];
char author[128],recipient[128],room[128],node[128],path[512];
void get_config (void);
struct config config;
void get_config (void);
struct config config;
main (int argc, char **argv)
{
time_t LogTime;
main (int argc, char **argv)
{
time_t LogTime;
-void main(int argc, char *argv[]) {
+int main(int argc, char *argv[]) {
int a;
int curr;
char aaa[128];
int a;
int curr;
char aaa[128];
main (int argc, char **argv)
{
time_t LogTime;
main (int argc, char **argv)
{
time_t LogTime;
-void main(int argc, char **argv)
+int main(int argc, char **argv)
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char buf[256];
char nodetitle[256];
{
char buf[256];
char nodetitle[256];
serv_puts("QUIT");
serv_gets(buf);
serv_puts("QUIT");
serv_gets(buf);