+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.
CC=@CC@
SERVER_LFLAGS=@LIBS@
CURSES=@CURSES@
+PTHREAD_DEFS=-D_REENTRANT
client: $(CLIENT_TARGETS)
$(LFLAGS) $(SERVER_LFLAGS) -o citserver
citserver.o: citserver.c
- $(CC) $(CFLAGS) -D_REENTRANT -c citserver.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c citserver.c
user_ops.o: user_ops.c
- $(CC) $(CFLAGS) -D_REENTRANT -c user_ops.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c user_ops.c
room_ops.o: room_ops.c
- $(CC) $(CFLAGS) -D_REENTRANT -c room_ops.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c room_ops.c
dynloader.o: dynloader.c
- $(CC) $(CFLAGS) -D_REENTRANT -c dynloader.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c dynloader.c
file_ops.o: file_ops.c
- $(CC) $(CFLAGS) -D_REENTRANT -c file_ops.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c file_ops.c
support.o: support.c
- $(CC) $(CFLAGS) -D_REENTRANT -c support.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c support.c
msgbase.o: msgbase.c
- $(CC) $(CFLAGS) -D_REENTRANT -c msgbase.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c msgbase.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
- $(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
- $(CC) $(CFLAGS) -D_REENTRANT -fPIC -c serv_test.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -fPIC -c serv_test.c
housekeeping.o: housekeeping.c
- $(CC) $(CFLAGS) -D_REENTRANT -c housekeeping.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c housekeeping.c
database.o: database.c
- $(CC) $(CFLAGS) -D_REENTRANT -c database.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c database.c
control.o: control.c
- $(CC) $(CFLAGS) -D_REENTRANT -c control.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c control.c
logging.o: logging.c
- $(CC) $(CFLAGS) -D_REENTRANT -c logging.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c logging.c
config.o: config.c
- $(CC) $(CFLAGS) -D_REENTRANT -c config.c
+ $(CC) $(CFLAGS) $(PTHREAD_DEFS) -c config.c
sysdep.o: sysdep.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
fclose(fp);
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char tempbase[32];
char temptmp[64];
char buf[256];
char fl[256];
struct tm *tmbuf;
- long lc;
+ time_t lc;
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,
- idlehours, idlemins, idlesecs);
+ (long)idlehours, (long)idlemins, (long)idlesecs);
}
else {
/*
* main
*/
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
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;
#include <ctype.h>
#include <string.h>
#include <errno.h>
+#include <limits.h>
#include <pthread.h>
#include <syslog.h>
#include <dlfcn.h>
*/
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;
int a; /* the watchdog timer in effect if necessary */
fd_set rfds;
struct timeval tv;
- long start_time, now;
+ time_t start_time, now;
char inbuf[2];
time(&start_time);
/*
* The main loop. We don't need any command-line parameters to this program.
*/
-void main(void) {
+int main(void) {
char header[3];
char fields[32][1024];
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
char buf[256];
char m_subject[256];
char from[256];
- long now;
+ time_t now;
struct tm *tm;
int format_type = 0;
int fr = 0;
{
FILE *fp, *atpipe;
int a,b,e_ex_code;
- long now,beg;
+ time_t now;
+ long beg;
char datestr[64];
int cksum = 0;
struct AttachedFile *AttachList = NULL;
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) {
}
#endif
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
struct tm *tm;
int a,b,e,mtype,aflag;
goto BONFGM;
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
int a;
FILE *fp,*rmail;
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char buf[256];
char remote_nodename[32];
/*
* main
*/
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char allst[32];
FILE *allfp;
rewrite_syslist();
printf("netproc: processing ended.\n");
cleanup(0);
+ return 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];
void get_config (void);
struct config config;
-void
+int
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];
cleanup(0);
+ return 0;
}
-void
+int
main (int argc, char **argv)
{
time_t LogTime;
exit (0);
*/
}
+ return 0;
}
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char buf[256];
exit(code);
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
char buf[256];
char nodetitle[256];
serv_puts("QUIT");
serv_gets(buf);
- exit(0);
+ return 0;
}