Mercurial > noffle
changeset 54:125d79c9e586 noffle
[svn] * src/client.c, src/configfile.c, src/content.c, src/control.c,
src/database.c, src/dynamicstring.c, src/fetch.c, src/fetchlist.c,
src/group.c, src/itemlist.c, src/lock.c, src/log.c, src/noffle.c,
src/online.c, src/outgoing.c, src/over.c, src/post.c, src/protocol.c,
src/pseudo.c, src/request.c, src/server.c, src/util.c:
Added portable.h #include.
* src/client.h, src/database.h, src/fetch.c, src/group.h, src/lock.c,
src/outgoing.c, src/over.c, src/over.h, src/pseudo.c, src/server.c,
src/util.c, src/util.h: Added some #ifdefs to correctly include either
time.h or sys/time.h or both, depending on which are found.
* src/noffle.c: Changed the return-type of the signal-handlers bugReport()
and logSignal() to RETSIGTYPE, which is either void or int, depending on
the system you compile on (autoconf #defines the RETSIGTYPE).
author | uh1763 |
---|---|
date | Tue, 09 May 2000 23:28:38 +0100 |
parents | 9f3a4eccce32 |
children | 3b3750063786 |
files | ChangeLog src/client.c src/client.h src/configfile.c src/content.c src/control.c src/database.c src/database.h src/dynamicstring.c src/fetch.c src/fetchlist.c src/group.c src/group.h src/itemlist.c src/lock.c src/log.c src/noffle.c src/online.c src/outgoing.c src/over.c src/over.h src/post.c src/protocol.c src/pseudo.c src/request.c src/server.c src/util.c src/util.h |
diffstat | 28 files changed, 196 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon May 08 17:52:14 2000 +0100 +++ b/ChangeLog Tue May 09 23:28:38 2000 +0100 @@ -2,6 +2,24 @@ NOFFLE ChangeLog ------------------------------------------------------------------------------- +Wed May 10 00:25:44 CEST 2000 Uwe Hermann <uh1763@bingo-ev.de> + + * src/client.c, src/configfile.c, src/content.c, src/control.c, + src/database.c, src/dynamicstring.c, src/fetch.c, src/fetchlist.c, + src/group.c, src/itemlist.c, src/lock.c, src/log.c, src/noffle.c, + src/online.c, src/outgoing.c, src/over.c, src/post.c, src/protocol.c, + src/pseudo.c, src/request.c, src/server.c, src/util.c: + Added portable.h #include. + + * src/client.h, src/database.h, src/fetch.c, src/group.h, src/lock.c, + src/outgoing.c, src/over.c, src/over.h, src/pseudo.c, src/server.c, + src/util.c, src/util.h: Added some #ifdefs to correctly include either + time.h or sys/time.h or both, depending on which are found. + + * src/noffle.c: Changed the return-type of the signal-handlers bugReport() + and logSignal() to RETSIGTYPE, which is either void or int, depending on + the system you compile on (autoconf #defines the RETSIGTYPE). + Sat May 6 12:25:39 BST 2000 Jim Hague <jim.hague@acm.org>
--- a/src/client.c Mon May 08 17:52:14 2000 +0100 +++ b/src/client.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* client.c - $Id: client.c 54 2000-05-06 16:55:22Z bears $ + $Id: client.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -30,6 +30,7 @@ #include "request.h" #include "util.h" #include "wildmat.h" +#include "portable.h" /* Some newsgroups names are reserved for server-specific or server
--- a/src/client.h Mon May 08 17:52:14 2000 +0100 +++ b/src/client.h Tue May 09 23:28:38 2000 +0100 @@ -3,7 +3,7 @@ Noffle acting as client to other NNTP-servers - $Id: client.h 51 2000-05-05 23:49:38Z uh1763 $ + $Id: client.h 60 2000-05-09 22:28:38Z uh1763 $ */ #ifndef CLIENT_H @@ -13,7 +13,17 @@ #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "common.h" #include "database.h" #include "fetchlist.h"
--- a/src/configfile.c Mon May 08 17:52:14 2000 +0100 +++ b/src/configfile.c Tue May 09 23:28:38 2000 +0100 @@ -6,7 +6,7 @@ SPOOLDIR VERSION - $Id: configfile.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: configfile.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -18,6 +18,7 @@ #include <limits.h> #include "log.h" #include "util.h" +#include "portable.h" typedef struct {
--- a/src/content.c Mon May 08 17:52:14 2000 +0100 +++ b/src/content.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* content.c - $Id: content.c 55 2000-05-06 16:56:50Z bears $ + $Id: content.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -22,6 +22,7 @@ #include "pseudo.h" #include "util.h" #include "content.h" +#include "portable.h" struct {
--- a/src/control.c Mon May 08 17:52:14 2000 +0100 +++ b/src/control.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* control.c - $Id: control.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: control.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -17,6 +17,7 @@ #include "itemlist.h" #include "log.h" #include "outgoing.h" +#include "portable.h" int Ctrl_cancel( const char *msgId )
--- a/src/database.c Mon May 08 17:52:14 2000 +0100 +++ b/src/database.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* database.c - $Id: database.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: database.c 60 2000-05-09 22:28:38Z uh1763 $ Uses GNU gdbm library. Using Berkeley db (included in libc6) was cumbersome. It is based on Berkeley db 1.85, which has severe bugs @@ -28,6 +28,7 @@ #include "protocol.h" #include "util.h" #include "wildmat.h" +#include "portable.h" static struct Db {
--- a/src/database.h Mon May 08 17:52:14 2000 +0100 +++ b/src/database.h Tue May 09 23:28:38 2000 +0100 @@ -3,7 +3,7 @@ Article database. - $Id: database.h 51 2000-05-05 23:49:38Z uh1763 $ + $Id: database.h 60 2000-05-09 22:28:38Z uh1763 $ */ #ifndef DB_H @@ -13,7 +13,17 @@ #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "common.h" #include "dynamicstring.h" #include "over.h"
--- a/src/dynamicstring.c Mon May 08 17:52:14 2000 +0100 +++ b/src/dynamicstring.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* dynamicstring.c - $Id: dynamicstring.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: dynamicstring.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -12,6 +12,7 @@ #include <sys/types.h> #include "log.h" +#include "portable.h" struct DynStr {
--- a/src/fetch.c Mon May 08 17:52:14 2000 +0100 +++ b/src/fetch.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* fetch.c - $Id: fetch.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: fetch.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -11,7 +11,18 @@ #include <stdio.h> #include "fetch.h" #include <errno.h> + +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include <signal.h> #include "client.h" #include "configfile.h" @@ -25,6 +36,7 @@ #include "protocol.h" #include "pseudo.h" #include "util.h" +#include "portable.h" struct Fetch {
--- a/src/fetchlist.c Mon May 08 17:52:14 2000 +0100 +++ b/src/fetchlist.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* fetchlist.c - $Id: fetchlist.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: fetchlist.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -13,6 +13,7 @@ #include "configfile.h" #include "log.h" #include "util.h" +#include "portable.h" struct Elem {
--- a/src/group.c Mon May 08 17:52:14 2000 +0100 +++ b/src/group.c Tue May 09 23:28:38 2000 +0100 @@ -7,7 +7,7 @@ loadGrp() and saveGrp(). This is done transparently. Access to the groups database is done by group name, by the functions defined in group.h. - $Id: group.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: group.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -23,6 +23,7 @@ #include "configfile.h" #include "log.h" #include "util.h" +#include "portable.h" /* currently only used within grp */ typedef struct
--- a/src/group.h Mon May 08 17:52:14 2000 +0100 +++ b/src/group.h Tue May 09 23:28:38 2000 +0100 @@ -3,7 +3,7 @@ Groups database - $Id: group.h 51 2000-05-05 23:49:38Z uh1763 $ + $Id: group.h 60 2000-05-09 22:28:38Z uh1763 $ */ #ifndef GRP_H @@ -13,7 +13,17 @@ #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "common.h" #define GRP_LOCAL_SERVER_NAME "(local)"
--- a/src/itemlist.c Mon May 08 17:52:14 2000 +0100 +++ b/src/itemlist.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* itemlist.c - $Id: itemlist.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: itemlist.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -14,6 +14,7 @@ #include <stdlib.h> #include "common.h" #include "log.h" +#include "portable.h" struct ItemList {
--- a/src/lock.c Mon May 08 17:52:14 2000 +0100 +++ b/src/lock.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* lock.c - $Id: lock.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: lock.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -15,13 +15,25 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> + +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include <unistd.h> #include "configfile.h" #include "log.h" #include "database.h" #include "group.h" #include "request.h" +#include "portable.h" struct Lock {
--- a/src/log.c Mon May 08 17:52:14 2000 +0100 +++ b/src/log.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* log.c - $Id: log.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: log.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -12,6 +12,7 @@ #include <stdarg.h> #include "common.h" #include "log.h" +#include "portable.h" #define MAXLENGTH 240
--- a/src/noffle.c Mon May 08 17:52:14 2000 +0100 +++ b/src/noffle.c Tue May 09 23:28:38 2000 +0100 @@ -10,7 +10,7 @@ received for some seconds (to allow multiple clients connect at the same time). - $Id: noffle.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: noffle.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -43,6 +43,7 @@ #include "server.h" #include "request.h" #include "lock.h" +#include "portable.h" struct Noffle @@ -561,7 +562,7 @@ Lock_closeDatabases(); } -static void +static RETSIGTYPE bugReport( int sig ) { Log_err( "Received SIGSEGV. Please submit a bug report" ); @@ -569,7 +570,7 @@ raise( sig ); } -static void +static RETSIGTYPE logSignal( int sig ) { const char *name;
--- a/src/online.c Mon May 08 17:52:14 2000 +0100 +++ b/src/online.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* online.c - $Id: online.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: online.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -14,6 +14,7 @@ #include "configfile.h" #include "log.h" #include "online.h" +#include "portable.h" static void fileOnline( Str s )
--- a/src/outgoing.c Mon May 08 17:52:14 2000 +0100 +++ b/src/outgoing.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* outgoing.c - $Id: outgoing.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: outgoing.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -16,11 +16,23 @@ #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> + +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include <unistd.h> #include "configfile.h" #include "log.h" #include "util.h" +#include "portable.h" struct Outgoing {
--- a/src/over.c Mon May 08 17:52:14 2000 +0100 +++ b/src/over.c Tue May 09 23:28:38 2000 +0100 @@ -1,15 +1,25 @@ /* over.c - $Id: over.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: over.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> +#include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include <errno.h> -#include <time.h> #include "configfile.h" #include "content.h" #include "database.h" @@ -18,6 +28,7 @@ #include "util.h" #include "protocol.h" #include "pseudo.h" +#include "portable.h" struct Over {
--- a/src/over.h Mon May 08 17:52:14 2000 +0100 +++ b/src/over.h Tue May 09 23:28:38 2000 +0100 @@ -5,7 +5,7 @@ content.c. An article overview contains important article properties, such as date, from, subject. - $Id: over.h 51 2000-05-05 23:49:38Z uh1763 $ + $Id: over.h 60 2000-05-09 22:28:38Z uh1763 $ */ #ifndef OVER_H @@ -15,7 +15,17 @@ #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "common.h" struct Over;
--- a/src/post.c Mon May 08 17:52:14 2000 +0100 +++ b/src/post.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* post.c - $Id: post.c 49 2000-05-05 21:45:56Z uh1763 $ + $Id: post.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -19,6 +19,7 @@ #include "over.h" #include "protocol.h" #include "util.h" +#include "portable.h" struct OverInfo {
--- a/src/protocol.c Mon May 08 17:52:14 2000 +0100 +++ b/src/protocol.c Tue May 09 23:28:38 2000 +0100 @@ -1,7 +1,7 @@ /* protocol.c - $Id: protocol.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: protocol.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -19,6 +19,7 @@ #include "over.h" #include "util.h" #include "protocol.h" +#include "portable.h" Bool Prt_getLn( Str line, FILE *f )
--- a/src/pseudo.c Mon May 08 17:52:14 2000 +0100 +++ b/src/pseudo.c Tue May 09 23:28:38 2000 +0100 @@ -1,17 +1,27 @@ /* pseudo.c - $Id: pseudo.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: pseudo.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> +#include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "pseudo.h" #include <stdio.h> -#include <time.h> #include "common.h" #include "configfile.h" #include "content.h" @@ -21,6 +31,7 @@ #include "protocol.h" #include "util.h" #include "pseudo.h" +#include "portable.h" static Over * genOv( const char *rawSubj, const char *rawBody, const char *suffix )
--- a/src/request.c Mon May 08 17:52:14 2000 +0100 +++ b/src/request.c Tue May 09 23:28:38 2000 +0100 @@ -3,7 +3,7 @@ Collection of articles that are marked for download. - $Id: request.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: request.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H @@ -22,6 +22,7 @@ #include "configfile.h" #include "log.h" #include "util.h" +#include "portable.h" /* This struct keeps record of the message IDs that are to be fetched from
--- a/src/server.c Mon May 08 17:52:14 2000 +0100 +++ b/src/server.c Tue May 09 23:28:38 2000 +0100 @@ -1,21 +1,30 @@ /* server.c - $Id: server.c 55 2000-05-06 16:56:50Z bears $ + $Id: server.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> +#include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include <stdio.h> #include "server.h" #include <ctype.h> #include <signal.h> #include <stdarg.h> -#include <sys/time.h> #include <sys/types.h> -#include <time.h> #include <unistd.h> #include "client.h" #include "common.h" @@ -39,6 +48,7 @@ #include "request.h" #include "util.h" #include "wildmat.h" +#include "portable.h" struct {
--- a/src/util.c Mon May 08 17:52:14 2000 +0100 +++ b/src/util.c Tue May 09 23:28:38 2000 +0100 @@ -1,24 +1,35 @@ /* util.c - $Id: util.c 51 2000-05-05 23:49:38Z uh1763 $ + $Id: util.c 60 2000-05-09 22:28:38Z uh1763 $ */ #if HAVE_CONFIG_H #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> +#include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "util.h" #include <errno.h> #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <time.h> #include <unistd.h> #include "configfile.h" #include "log.h" #include "wildmat.h" +#include "portable.h" static const char * nextWhiteSpace( const char *p )
--- a/src/util.h Mon May 08 17:52:14 2000 +0100 +++ b/src/util.h Tue May 09 23:28:38 2000 +0100 @@ -3,7 +3,7 @@ Miscellaneous helper functions. - $Id: util.h 51 2000-05-05 23:49:38Z uh1763 $ + $Id: util.h 60 2000-05-09 22:28:38Z uh1763 $ */ #ifndef UTL_H @@ -13,7 +13,17 @@ #include <config.h> #endif +#if TIME_WITH_SYS_TIME +#include <sys/time.h> #include <time.h> +#else +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#else +#include <time.h> +#endif +#endif + #include "common.h" /*