aboutsummaryrefslogtreecommitdiff
path: root/news/s-news
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2004-12-20 11:15:03 +0000
committerVolker Stolz <vs@FreeBSD.org>2004-12-20 11:15:03 +0000
commit1d0ed989c7168ce38c12918b5cb412dad622494b (patch)
treeb5a954760d96c64158f4978495bf7b07fac17484 /news/s-news
parent24e2c924f1c85da1f360d6543b40ff6965f44f10 (diff)
downloadports-1d0ed989c7168ce38c12918b5cb412dad622494b.tar.gz
ports-1d0ed989c7168ce38c12918b5cb412dad622494b.zip
Fix duplicate HAVE_MALLOC_H
PR: ports/75228 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=124577
Diffstat (limited to 'news/s-news')
-rw-r--r--news/s-news/files/patch-qnews.c28
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);
}