diff options
Diffstat (limited to 'news/s-news')
-rw-r--r-- | news/s-news/files/patch-qnews.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/news/s-news/files/patch-qnews.c b/news/s-news/files/patch-qnews.c index c28838e73c9d..7e02ca4a8952 100644 --- a/news/s-news/files/patch-qnews.c +++ b/news/s-news/files/patch-qnews.c @@ -1,5 +1,5 @@ --- qnews.c.orig Sat May 18 22:21:42 2002 -+++ qnews.c Wed Aug 4 03:24:43 2004 ++++ qnews.c Sat Dec 18 19:21:57 2004 @@ -2,6 +2,8 @@ * S-News version 0.1.9 - A Simple News Server * Copyright (C) 1998 Christopher John Purnell @@ -9,7 +9,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by -@@ -22,7 +24,18 @@ +@@ -22,12 +24,20 @@ #include "config.h" #endif @@ -20,15 +20,17 @@ +#endif +#include <fcntl.h> + -+#ifdef HAVE_MALLOC_H -+#include <malloc.h> -+#else -+#include <stdlib.h> -+#endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -@@ -79,15 +92,37 @@ + #ifdef HAVE_MALLOC_H + #include <malloc.h> ++#else ++#include <stdlib.h> + #endif + #ifdef STDC_HEADERS + #include <string.h> +@@ -79,15 +89,37 @@ if (match_group(ptr->value,line,end)) { FILE *fp; @@ -49,7 +51,7 @@ - return (1); + perror(file); + return (1); - } ++ } + if (flock(fd,LOCK_EX) == -1) + { + perror(file); @@ -59,7 +61,7 @@ + { + perror(file); + return (1); -+ } + } + #else + if (!(fp = fopen(file,"a"))) + { @@ -70,7 +72,7 @@ if (fputs(line,fp) < 0 || fputc('\n',fp) < 0) -@@ -103,6 +138,9 @@ +@@ -103,6 +135,9 @@ return (1); } @@ -80,7 +82,7 @@ break; } } -@@ -204,7 +242,7 @@ +@@ -204,7 +239,7 @@ return (0); break; case '[': @@ -89,7 +91,7 @@ { unsigned char rev,mat=0,l=0,h,u=*str; -@@ -229,6 +267,8 @@ +@@ -229,6 +264,8 @@ if (mat==rev) return (0); } |