diff options
author | Masafumi Max NAKANE <max@FreeBSD.org> | 1997-08-30 16:24:02 +0000 |
---|---|---|
committer | Masafumi Max NAKANE <max@FreeBSD.org> | 1997-08-30 16:24:02 +0000 |
commit | cfb35583cc021caa8ba8400a7babc844e9747450 (patch) | |
tree | b1f123bfd0e60282fa0a72a7d5be1d559bc8a795 /news/suck/files/patch-ab | |
parent | Upgrade, 2.16.12 -> 3.0.13. (diff) |
Upgrade, 2.6.2 -> 3.5.2
Change the maintainer from graphite@taurus.bekkoame.or.jp to
jseger@scds.com. (I have received a personal note from the old
maintainer and he approves this change.)
Also, install the sample scripts into share/examples/suck instead of
into etc/rc.d.
PR: 4131
Submitted by: the new maintainer <jseger@scds.com>
Notes
Notes:
svn path=/head/; revision=7730
Diffstat (limited to 'news/suck/files/patch-ab')
-rw-r--r-- | news/suck/files/patch-ab | 131 |
1 files changed, 8 insertions, 123 deletions
diff --git a/news/suck/files/patch-ab b/news/suck/files/patch-ab index b5795b733e2a..c5a471037ff3 100644 --- a/news/suck/files/patch-ab +++ b/news/suck/files/patch-ab @@ -1,125 +1,10 @@ ---- suck.c.orig Sat Mar 30 11:27:51 1996 -+++ suck.c Fri Apr 5 23:01:42 1996 -@@ -11,6 +11,10 @@ - #include "suck.h" - #include "suckutils.h" +--- lmove.c.orig Fri May 23 08:16:38 1997 ++++ lmove.c Mon Aug 25 16:43:04 1997 +@@ -27,6 +27,7 @@ + #include <sys/stat.h> + #include <errno.h> + #include <signal.h> ++#include <sys/syslimits.h> -+#ifdef _HAVE_PARAM_H -+#include <sys/param.h> -+#endif -+ - #ifdef KILLFILE - #include "killfile.h" - #endif -@@ -511,7 +515,9 @@ - } - #endif - } -- fclose(ifp); -+ if( ifp != NULL ){ -+ fclose(ifp); -+ } - } - #ifdef KILLFILE - free_killfile(killp); -@@ -783,7 +789,11 @@ - } - if(retval == RETVAL_OK) { - /* first put #! rnews size */ -+#if (defined(BSD) && (BSD >= 199306)) -+ fprintf(fptr, "#! rnews %qd\n", sbuf.st_size); -+#else - fprintf(fptr, "#! rnews %ld\n", sbuf.st_size); -+#endif - - /* use fread/fwrite in case lines are longer than MAXLINLEN */ - while((i = fread(buf, 1, MAXLINLEN, fpin)) > 0) { ---- suckutils.c.orig Wed Mar 6 14:48:18 1996 -+++ suckutils.c Fri Apr 5 23:01:42 1996 -@@ -13,6 +13,10 @@ + #include "suck_config.h" #include "both.h" - #include "suckutils.h" - -+#ifdef _HAVE_PARAM_H -+#include <sys/param.h> -+#endif -+ - /*------------------------------------------------------------------------*/ - /* check if directory exists, if not, try to create it. */ - /* return TRUE if made/exists and can write to it */ -@@ -148,7 +152,11 @@ - lockfile = full_path(FP_GET, FP_TMPDIR, N_LOCKFILE); - if((f_lock = fopen(lockfile, "r")) != NULL) { - /* okay, let's try and see if this sucker is truly alive */ -+# if (defined(BSD) && (BSD >= 199306)) -+ fscanf(f_lock, "%ld", &pid); -+# else - fscanf(f_lock, "%d", &pid); -+# endif - fclose(f_lock); - if(pid <= 0) { - error_log(ERRLOG_REPORT, "Lock File %s , Invalid PID, aborting.\n", lockfile); -@@ -160,21 +168,37 @@ - else if(kill(pid, 0) == -1 && errno == ESRCH) { - /* no pid found */ - if(unlink(lockfile) == 0) { -+# if (defined(BSD) && (BSD >= 199306)) -+ error_log(ERRLOG_REPORT, "Lock File %s , stale PID %ld removed.\n", lockfile, pid); -+# else - error_log(ERRLOG_REPORT, "Lock File %s , stale PID %d removed.\n", lockfile, pid); -+# endif - } - else { -+# if (defined(BSD) && (BSD >= 199306)) -+ error_log(ERRLOG_REPORT, "Unable to remove Lock File %s , stale PID %d, Aborting.\n", lockfile, pid); -+# else - error_log(ERRLOG_REPORT, "Unable to remove Lock File %s , stale PID %d, Aborting.\n", lockfile, pid); -+# endif - retval = RETVAL_ERROR; - } - } - else { -+# if (defined(BSD) && (BSD >= 199306)) -+ error_log(ERRLOG_REPORT, "Lock File %s , PID %ld exists, aborting.\n", lockfile, pid); -+# else - error_log(ERRLOG_REPORT, "Lock File %s , PID %d exists, aborting.\n", lockfile, pid); -+# endif - retval = RETVAL_ERROR; - } - } - if(retval == RETVAL_OK) { - if((f_lock = fopen(lockfile, "w")) != NULL) { -+# if (defined(BSD) && (BSD >= 199306)) -+ fprintf(f_lock, "%ld", getpid()); -+# else - fprintf(f_lock, "%d", getpid()); -+# endif - fclose(f_lock); - } - else { ---- both.c.orig Wed Mar 6 14:48:28 1996 -+++ both.c Fri Apr 5 23:01:42 1996 -@@ -12,6 +12,10 @@ - #include "config.h" - #include "both.h" - -+#ifdef _HAVE_PARAM_H -+#include <sys/param.h> -+#endif -+ - #ifdef TIMEOUT - #include <sys/time.h> - #include <sys/types.h> -@@ -238,7 +242,12 @@ - if(i < 1) { - if(i == 0) { - /* in case recv has no data */ -+#if (defined(BSD) && (BSD >= 199306)) -+ /* I don't know, is this appropriate conversion */ -+ errno = ENOTCONN; -+#else - errno = ENODATA; -+#endif - } - MyPerror("Socket error"); - ret = -1; |