aboutsummaryrefslogtreecommitdiff
path: root/misc/orville-write
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2020-10-01 15:31:55 +0000
committerStefan Eßer <se@FreeBSD.org>2020-10-01 15:31:55 +0000
commit5a1b795757080540fb50aa23e92462f73c7ddda0 (patch)
tree439da34a58dc8ff02aa36d697f37ab61542598aa /misc/orville-write
parentae466f3147056bf325976c7435fc4390e6510408 (diff)
downloadports-5a1b795757080540fb50aa23e92462f73c7ddda0.tar.gz
ports-5a1b795757080540fb50aa23e92462f73c7ddda0.zip
Fix build with -fno-common
While here fix one program error ("%s" format without argument).
Notes
Notes: svn path=/head/; revision=550843
Diffstat (limited to 'misc/orville-write')
-rw-r--r--misc/orville-write/Makefile1
-rw-r--r--misc/orville-write/files/patch-amin.c10
-rw-r--r--misc/orville-write/files/patch-getutent.c18
-rw-r--r--misc/orville-write/files/patch-getutent.h4
-rw-r--r--misc/orville-write/files/patch-helpers.c18
-rw-r--r--misc/orville-write/files/patch-huh.c8
-rw-r--r--misc/orville-write/files/patch-lib__common.c28
-rw-r--r--misc/orville-write/files/patch-lib__common.h (renamed from misc/orville-write/files/patch-lib_common.h)13
-rw-r--r--misc/orville-write/files/patch-lib_common.c19
-rw-r--r--misc/orville-write/files/patch-mesg.c28
-rw-r--r--misc/orville-write/files/patch-wrt__him.c (renamed from misc/orville-write/files/patch-wrt_him.c)28
-rw-r--r--misc/orville-write/files/patch-wrt__main.c11
-rw-r--r--misc/orville-write/files/patch-wrt__me.c (renamed from misc/orville-write/files/patch-wrt_me.c)8
-rw-r--r--misc/orville-write/files/patch-wrttmp.h6
14 files changed, 115 insertions, 85 deletions
diff --git a/misc/orville-write/Makefile b/misc/orville-write/Makefile
index 65559028302a..e8b0001b9e12 100644
--- a/misc/orville-write/Makefile
+++ b/misc/orville-write/Makefile
@@ -3,6 +3,7 @@
PORTNAME= orville-write
PORTVERSION= 2.55
+PORTREVISION= 1
CATEGORIES= misc
MASTER_SITES= http://unixpapa.com/software/
diff --git a/misc/orville-write/files/patch-amin.c b/misc/orville-write/files/patch-amin.c
index c469459f5496..ac7af21ac713 100644
--- a/misc/orville-write/files/patch-amin.c
+++ b/misc/orville-write/files/patch-amin.c
@@ -1,6 +1,6 @@
---- amin.c.orig 2010-02-02 23:04:35.773467035 -0800
-+++ amin.c 2010-02-02 23:06:45.674814831 -0800
-@@ -194,16 +194,16 @@
+--- amin.c.orig 2004-09-29 04:43:10 UTC
++++ amin.c
+@@ -194,16 +194,16 @@ char *r;
void locate_wrttmp(char *tty, struct wrttmp *wbuf, long *pos)
{
@@ -20,7 +20,7 @@
}
-@@ -230,7 +230,7 @@
+@@ -230,7 +230,7 @@ char *shortcmd; /* command without full pathname */
}
/* Close utmp file */
@@ -29,7 +29,7 @@
/* Figure out name of program being exec'ed */
if ((shortcmd= strrchr(fullcmd,'/')) == NULL)
-@@ -241,7 +241,7 @@
+@@ -241,7 +241,7 @@ char *shortcmd; /* command without full pathname */
/* Fix my entry in wrttmp */
newwrt= mywrt;
newwrt.wrt_what[0]= '!';
diff --git a/misc/orville-write/files/patch-getutent.c b/misc/orville-write/files/patch-getutent.c
index acbdef74c917..71bf0750dae3 100644
--- a/misc/orville-write/files/patch-getutent.c
+++ b/misc/orville-write/files/patch-getutent.c
@@ -1,6 +1,6 @@
---- getutent.c.orig 2000-01-31 22:02:45.000000000 -0800
-+++ getutent.c 2010-02-02 22:53:30.347068707 -0800
-@@ -20,18 +20,8 @@
+--- getutent.c.orig 2000-02-01 06:02:45 UTC
++++ getutent.c
+@@ -20,18 +20,8 @@ static int openut()
{
if (utmp.state == 0)
{
@@ -19,7 +19,7 @@
}
}
-@@ -42,8 +32,7 @@
+@@ -42,8 +32,7 @@ static int openut()
void endutent()
{
if (utmp.state == 1)
@@ -29,7 +29,7 @@
}
-@@ -52,8 +41,7 @@
+@@ -52,8 +41,7 @@ void endutent()
void setutent()
{
@@ -39,7 +39,7 @@
}
-@@ -75,9 +63,9 @@
+@@ -75,9 +63,9 @@ int utmpname(const char *file)
/* GETUTENT - Read the next entry from the utmp file into static storage.
*/
@@ -51,7 +51,7 @@
switch (utmp.state)
{
-@@ -85,11 +73,11 @@
+@@ -85,11 +73,11 @@ static struct utmp ut;
openut();
/* Drop through */
case 1:
@@ -66,7 +66,7 @@
}
}
-@@ -100,9 +88,9 @@
+@@ -100,9 +88,9 @@ static struct utmp ut;
* we conform with Linux and Solaris.
*/
@@ -78,7 +78,7 @@
switch (utmp.state)
{
-@@ -110,20 +98,20 @@
+@@ -110,20 +98,20 @@ static struct utmp ut;
openut();
/* Drop through */
case 1:
diff --git a/misc/orville-write/files/patch-getutent.h b/misc/orville-write/files/patch-getutent.h
index 16147b9e82f1..274c79c720d9 100644
--- a/misc/orville-write/files/patch-getutent.h
+++ b/misc/orville-write/files/patch-getutent.h
@@ -1,5 +1,5 @@
---- getutent.h.orig 2000-01-31 22:01:13.000000000 -0800
-+++ getutent.h 2010-02-02 22:49:58.043092643 -0800
+--- getutent.h.orig 2000-02-01 06:01:13 UTC
++++ getutent.h
@@ -14,8 +14,8 @@
int utmpname(const char *file);
void endutent(void);
diff --git a/misc/orville-write/files/patch-helpers.c b/misc/orville-write/files/patch-helpers.c
index 3fc7bf2d286e..da3a6ba40f3e 100644
--- a/misc/orville-write/files/patch-helpers.c
+++ b/misc/orville-write/files/patch-helpers.c
@@ -1,5 +1,5 @@
---- helpers.c.orig 2000-02-20 09:28:08.000000000 -0800
-+++ helpers.c 2010-02-02 23:20:25.434811144 -0800
+--- helpers.c.orig 2000-02-20 17:28:08 UTC
++++ helpers.c
@@ -11,7 +11,7 @@
struct hlp {
@@ -9,7 +9,7 @@
int busy; /* is he busy? */
struct hlp *next; /* next helper */
} *list= NULL;
-@@ -27,7 +27,7 @@
+@@ -27,7 +27,7 @@ struct hlp *curr, *prev;
for (curr= list, prev= NULL; curr != NULL; prev= curr,curr= prev->next)
{
@@ -18,7 +18,7 @@
{
if (prev == NULL)
list= curr->next;
-@@ -47,7 +47,7 @@
+@@ -47,7 +47,7 @@ struct hlp *curr, *prev;
int perms_on(struct wrttmp *w)
{
struct stat st;
@@ -27,7 +27,7 @@
#ifdef TTYPERMS
#define MASK 022
-@@ -59,7 +59,7 @@
+@@ -59,7 +59,7 @@ char devname[UT_LINESIZE+7];
/* Is his tty physically writable? */
@@ -36,7 +36,7 @@
if (stat(devname,&st))
return(0);
-@@ -72,7 +72,7 @@
+@@ -72,7 +72,7 @@ main(int argc, char **argv)
FILE *fp;
struct wrttmp w;
struct wrthdr wt_head;
@@ -45,7 +45,7 @@
struct hlp *tmp;
int i, j;
int slot= 0;
-@@ -146,7 +146,7 @@
+@@ -146,7 +146,7 @@ int listthem= 1;
if (list != NULL)
{
/* Do the scan */
@@ -54,7 +54,7 @@
{
#ifdef USER_PROCESS
if (u->ut_type != USER_PROCESS)
-@@ -155,15 +155,15 @@
+@@ -155,15 +155,15 @@ int listthem= 1;
if ((tmp= findlist(u->ut_line)) != NULL)
{
/* If the time stamps don't match, this isn't a real helper */
@@ -73,7 +73,7 @@
tmp->busy ? " [busy]" : "");
}
-@@ -172,7 +172,7 @@
+@@ -172,7 +172,7 @@ int listthem= 1;
}
}
diff --git a/misc/orville-write/files/patch-huh.c b/misc/orville-write/files/patch-huh.c
index e7508d00d494..adaafbe415e9 100644
--- a/misc/orville-write/files/patch-huh.c
+++ b/misc/orville-write/files/patch-huh.c
@@ -1,6 +1,6 @@
---- huh.c.orig 2010-02-02 23:11:01.823876514 -0800
-+++ huh.c 2010-02-02 23:11:54.475034412 -0800
-@@ -34,13 +34,13 @@
+--- huh.c.orig 2003-05-30 15:37:40 UTC
++++ huh.c
+@@ -34,13 +34,13 @@ struct passwd *pwd;
int record_on()
{
@@ -16,7 +16,7 @@
/* Open the wrttmp file */
if (init_wstream(O_RDONLY)) return 1;
-@@ -50,13 +50,13 @@
+@@ -50,13 +50,13 @@ long pos;
tty= mydevname+5;
/* Find our entry in the utmp file */
diff --git a/misc/orville-write/files/patch-lib__common.c b/misc/orville-write/files/patch-lib__common.c
new file mode 100644
index 000000000000..8039ad343d38
--- /dev/null
+++ b/misc/orville-write/files/patch-lib__common.c
@@ -0,0 +1,28 @@
+--- lib_common.c.orig 2004-09-29 04:43:53 UTC
++++ lib_common.c
+@@ -89,7 +89,7 @@ char *tty;
+ }
+ if ((tty= ttyname(2)) == NULL || strlen(tty) < 5)
+ {
+- printf("%s: Not on a valid tty\n");
++ printf("%s: Not on a valid tty\n", progname);
+ return 2;
+ }
+ strncpy(mydevname,tty,UT_LINESIZE+10);
+@@ -141,13 +141,13 @@ int init_wstream(int mode)
+ * fail. The tty name need not be null terminated.
+ */
+
+-struct utmp *find_utmp(char *tty)
++struct utmpx *find_utmp(char *tty)
+ {
+-struct utmp tmputmp;
++struct utmpx tmputmp;
+
+ strncpy(tmputmp.ut_line, tty, UT_LINESIZE);
+ setutent(); /* open and/or rewind */
+- return getutline(&tmputmp);
++ return getutxline(&tmputmp);
+ }
+
+
diff --git a/misc/orville-write/files/patch-lib_common.h b/misc/orville-write/files/patch-lib__common.h
index 58da23112e59..b73b58fac460 100644
--- a/misc/orville-write/files/patch-lib_common.h
+++ b/misc/orville-write/files/patch-lib__common.h
@@ -1,5 +1,5 @@
---- lib_common.h.orig 2010-02-02 22:40:13.646402561 -0800
-+++ lib_common.h 2010-02-02 22:40:30.475105092 -0800
+--- lib_common.h.orig 2000-02-01 05:49:10 UTC
++++ lib_common.h
@@ -6,7 +6,7 @@
#include "getutent.h"
@@ -9,3 +9,12 @@
void find_wrttmp(char *tty, time_t time,struct wrttmp *wbuf, long *pos);
void dflt_wrttmp(struct wrttmp *wbuf, char *tty, time_t time);
char *leafname(char *fullpath);
+@@ -19,7 +19,7 @@ extern int f_disconnect, f_exceptions, f_helpers, f_lo
+ extern char *progname;
+ extern char mydevname[];
+ extern int wstream;
+-struct wrthdr wt_head;
++extern struct wrthdr wt_head;
+
+ #ifdef TTYPERMS
+ int saveperms(void);
diff --git a/misc/orville-write/files/patch-lib_common.c b/misc/orville-write/files/patch-lib_common.c
deleted file mode 100644
index 00db6944cf73..000000000000
--- a/misc/orville-write/files/patch-lib_common.c
+++ /dev/null
@@ -1,19 +0,0 @@
---- lib_common.c.orig 2010-02-02 22:34:36.829638978 -0800
-+++ lib_common.c 2010-02-02 22:36:28.170798539 -0800
-@@ -141,13 +141,13 @@
- * fail. The tty name need not be null terminated.
- */
-
--struct utmp *find_utmp(char *tty)
-+struct utmpx *find_utmp(char *tty)
- {
--struct utmp tmputmp;
-+struct utmpx tmputmp;
-
- strncpy(tmputmp.ut_line, tty, UT_LINESIZE);
- setutent(); /* open and/or rewind */
-- return getutline(&tmputmp);
-+ return getutxline(&tmputmp);
- }
-
-
diff --git a/misc/orville-write/files/patch-mesg.c b/misc/orville-write/files/patch-mesg.c
index d1a4a577e360..00d86b1f997f 100644
--- a/misc/orville-write/files/patch-mesg.c
+++ b/misc/orville-write/files/patch-mesg.c
@@ -1,5 +1,5 @@
---- mesg.c.orig 2010-02-02 22:54:21.613120678 -0800
-+++ mesg.c 2010-02-02 23:01:31.739763589 -0800
+--- mesg.c.orig 2004-09-29 04:43:14 UTC
++++ mesg.c
@@ -19,7 +19,7 @@
char *mytty; /* my tty name in tty?? format */
long mypos; /* offset of my entry in wrttmp file */
@@ -9,7 +9,7 @@
char silent= FALSE; /* generates no output if true */
int verbose= FALSE; /* generate whole table of output if true */
-@@ -335,7 +335,7 @@
+@@ -335,7 +335,7 @@ char flag;
}
/* Close the utmp file */
@@ -18,7 +18,7 @@
if (f_wrthist != NULL &&
!wassilent && (new[SMESG] == 'n' || new[SEXCP] == 'y'))
-@@ -549,12 +549,12 @@
+@@ -549,12 +549,12 @@ int code;
void do_disconnect()
{
@@ -33,7 +33,7 @@
/* For each user who is writing me */
for (;;)
-@@ -564,16 +564,16 @@
+@@ -564,16 +564,16 @@ int slot= 0;
sizeof(struct wrttmp))
break;
@@ -53,7 +53,7 @@
{
/* Writer is for real: bonk him one */
kill(hiswrt.wrt_pid, SIGTERM);
-@@ -590,10 +590,10 @@
+@@ -590,10 +590,10 @@ int slot= 0;
int find_me()
{
@@ -66,7 +66,7 @@
{
printf("%s: Unable to find your tty (%s) in utmp file\n",
progname,mytty);
-@@ -602,7 +602,7 @@
+@@ -602,7 +602,7 @@ struct utmp *ut;
myutmp= *ut;
/* Find the entry in the wrttmp file */
@@ -75,7 +75,7 @@
}
-@@ -616,13 +616,13 @@
+@@ -616,13 +616,13 @@ int may_help()
#define BUFSZ 80
FILE *hfp;
char buf[BUFSZ+1];
@@ -92,7 +92,7 @@
strcat(myname,"\n");
while (fgets(buf,BUFSZ,hfp) != NULL)
-@@ -645,7 +645,7 @@
+@@ -645,7 +645,7 @@ int window_warning(int newmode)
{
struct wrthist *hist;
struct wrttmp w;
@@ -101,7 +101,7 @@
long writer, writee;
time_t now;
int n, foundsome= 0;
-@@ -669,7 +669,7 @@
+@@ -669,7 +669,7 @@ FILE *fp;
for (writee= 0; writee < n; writee++)
{
@@ -110,7 +110,7 @@
now - hist[writee].tm <= f_answertel)
{
/* Fetch "his" wrttmp entry - it may actually belong to a previous
-@@ -688,12 +688,12 @@
+@@ -688,12 +688,12 @@ FILE *fp;
/* Fetch his utmp entry, and confirm that the current user was
* already logged in there when we sent our last telegram there.
*/
@@ -126,7 +126,7 @@
continue;
if (!foundsome)
-@@ -703,8 +703,8 @@
+@@ -703,8 +703,8 @@ FILE *fp;
foundsome= 1;
}
printf(" %-*.*s %-*.*s %4.1f more minutes\n",
@@ -137,7 +137,7 @@
(float)(f_answertel - now + hist[writee].tm)/60.0);
}
}
-@@ -717,7 +717,7 @@
+@@ -717,7 +717,7 @@ FILE *fp;
char *myhomedir()
{
@@ -146,7 +146,7 @@
struct passwd *pw;
char *dir, *getenv();
-@@ -726,8 +726,8 @@
+@@ -726,8 +726,8 @@ char *dir, *getenv();
return dir;
/* If that don't work, try passwd file */
diff --git a/misc/orville-write/files/patch-wrt_him.c b/misc/orville-write/files/patch-wrt__him.c
index ac9dc9e83aa0..d3c6a0687b09 100644
--- a/misc/orville-write/files/patch-wrt_him.c
+++ b/misc/orville-write/files/patch-wrt__him.c
@@ -1,6 +1,6 @@
---- wrt_him.c.orig 2004-09-28 20:32:13.000000000 -0700
-+++ wrt_him.c 2010-02-02 22:31:08.634155195 -0800
-@@ -116,7 +116,7 @@
+--- wrt_him.c.orig 2004-09-29 03:32:13 UTC
++++ wrt_him.c
+@@ -116,7 +116,7 @@ int rc;
extern struct wrttmp mywrt;
/* Open utmp file */
@@ -9,7 +9,7 @@
/* Look me up */
find_me();
-@@ -204,7 +204,7 @@
+@@ -204,7 +204,7 @@ int write_me;
int perm, hisperm= 0;
time_t hisatime= 0;
time_t atime;
@@ -18,7 +18,7 @@
struct wrttmp tmpwrt;
long tmppos;
-@@ -213,16 +213,14 @@
+@@ -213,16 +213,14 @@ long tmppos;
{
/* Check if this is the target user, ignoring X-window lines */
if (ut->ut_line[0] != ':' &&
@@ -37,7 +37,7 @@
/* Is this guy writing me? */
write_me= !strncmp(tmpwrt.wrt_what,myname,UT_NAMESIZE);
-@@ -283,7 +281,7 @@
+@@ -283,7 +281,7 @@ long tmppos;
int find_tty()
{
@@ -46,7 +46,7 @@
if ((ut= find_utmp(histty)) == NULL)
return(1);
-@@ -291,23 +289,23 @@
+@@ -291,23 +289,23 @@ struct utmp *ut;
if (*hisname != '\0')
{
/* Does the name not match? */
@@ -74,7 +74,7 @@
return(0);
}
-@@ -321,7 +319,7 @@
+@@ -321,7 +319,7 @@ struct utmp *ut;
void find_answer()
{
@@ -83,7 +83,7 @@
int slot;
lseek(wstream,hispos= wrttmp_offset(slot= 0),0);
-@@ -332,9 +330,9 @@
+@@ -332,9 +330,9 @@ int slot;
{
/* Found someone writing me - get his name from utmp */
strncpy(histty,hiswrt.wrt_line,UT_LINESIZE);
@@ -95,7 +95,7 @@
printf("Replying to %s on %s...",hisname,histty);
if (!telegram) putchar('\n');
return;
-@@ -363,7 +361,7 @@
+@@ -363,7 +361,7 @@ int nhelpers= 0; /* Number of helpers on */
int ahelpers= 0; /* Number of helpers available */
int previous;
int slot= 0;
@@ -104,7 +104,7 @@
struct wrttmp tmpwrt;
long tmppos;
-@@ -387,7 +385,7 @@
+@@ -387,7 +385,7 @@ long tmppos;
/* Find the helper candidate in utmp - if he's not there skip out */
if ((ut= find_utmp(tmpwrt.wrt_line)) == NULL ||
@@ -113,7 +113,7 @@
continue;
/* Reject helpers with their message permissions off */
-@@ -397,14 +395,14 @@
+@@ -397,14 +395,14 @@ long tmppos;
{
/* Perms off - but am I in .yeswrite file? */
if (!f_exceptions || tmpwrt.wrt_except != 'y' ||
@@ -130,7 +130,7 @@
continue;
}
}
-@@ -422,7 +420,7 @@
+@@ -422,7 +420,7 @@ long tmppos;
ahelpers++;
/* Has he helped us before? */
@@ -139,7 +139,7 @@
/* So roll the dice to see if we will choose him */
if (!previous && (unsigned)RAND() > (unsigned)RAND_MAX / ahelpers)
-@@ -430,7 +428,7 @@
+@@ -430,7 +428,7 @@ long tmppos;
/* We chose him, so make him our helper candidate so far */
strncpy(histty, tmpwrt.wrt_line, UT_LINESIZE);
diff --git a/misc/orville-write/files/patch-wrt__main.c b/misc/orville-write/files/patch-wrt__main.c
new file mode 100644
index 000000000000..391066abe62e
--- /dev/null
+++ b/misc/orville-write/files/patch-wrt__main.c
@@ -0,0 +1,11 @@
+--- wrt_main.c.orig 2004-09-29 04:43:17 UTC
++++ wrt_main.c
+@@ -38,7 +38,7 @@ char myname[UT_NAMESIZE+1]= ""; /* my name (based on u
+ char myuidname[UT_NAMESIZE+1]; /* my name (based on uid number) */
+ char *mytty; /* my tty name in "tty##" format */
+ #ifdef TTYPERMS
+-int myperms; /* my original tty perms */
++extern int myperms; /* my original tty perms */
+ #endif /*TTYPERMS*/
+
+ FILE *histerm; /* Opened version of device to write to */
diff --git a/misc/orville-write/files/patch-wrt_me.c b/misc/orville-write/files/patch-wrt__me.c
index 00f9c921a881..bd6cfe7b847e 100644
--- a/misc/orville-write/files/patch-wrt_me.c
+++ b/misc/orville-write/files/patch-wrt__me.c
@@ -1,6 +1,6 @@
---- wrt_me.c.orig 2010-02-02 22:31:42.972816673 -0800
-+++ wrt_me.c 2010-02-02 22:33:09.915329757 -0800
-@@ -14,19 +14,19 @@
+--- wrt_me.c.orig 2003-05-30 15:22:35 UTC
++++ wrt_me.c
+@@ -14,19 +14,19 @@ long mypos= -1; /* offset of my entry in the wrttmp f
void find_me()
{
@@ -23,7 +23,7 @@
/* Check if this is our real identity */
#ifndef SLOWPASSWD
-@@ -48,7 +48,7 @@
+@@ -48,7 +48,7 @@ int myuid;
/* Find my wrt_tmp entry */
diff --git a/misc/orville-write/files/patch-wrttmp.h b/misc/orville-write/files/patch-wrttmp.h
index 07f221c79f1b..f19f9ce80342 100644
--- a/misc/orville-write/files/patch-wrttmp.h
+++ b/misc/orville-write/files/patch-wrttmp.h
@@ -1,5 +1,5 @@
---- wrttmp.h.orig 2010-02-02 22:10:42.237520427 -0800
-+++ wrttmp.h 2010-02-02 22:18:11.802300308 -0800
+--- wrttmp.h.orig 2000-01-26 04:26:03 UTC
++++ wrttmp.h
@@ -30,7 +30,7 @@
#define WRTTMP_H
@@ -22,7 +22,7 @@
#endif
#if defined(TTY_GROUP) || defined(TTY_OTHERS)
-@@ -65,9 +65,9 @@
+@@ -65,9 +65,9 @@ struct wrthdr {
};
struct wrttmp {