mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
sysutils/copytape: include errno.h for errno
errno must be accessed by a macro from errno.h. Tidy includes and add unistd.h for read/write. Consolidate patches for easy of maintenance. This code is borderline useless and certainly broken with modern tape sizes due to the use of ints for sizes. PR: 281781 Approved by: sjroz@verizon.net (maintainer)
This commit is contained in:
parent
f2d04fb7c6
commit
cc977a4b8b
3 changed files with 19 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= copytape
|
||||
PORTVERSION= 1.0
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= COMP_SOURCES/unix/volume10
|
||||
DISTNAME= copytape
|
||||
|
|
|
@ -1,15 +1,28 @@
|
|||
--- copytape.c.orig Fri Oct 23 17:23:06 1998
|
||||
+++ copytape.c Fri Oct 23 17:23:46 1998
|
||||
@@ -36,7 +36,7 @@
|
||||
--- copytape.c.orig
|
||||
+++ copytape.c
|
||||
@@ -28,15 +28,18 @@
|
||||
*/
|
||||
|
||||
extern int errno;
|
||||
|
||||
-#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mtio.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
-extern int errno;
|
||||
+#include <errno.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
-#define BUFLEN 262144 /* max tape block size */
|
||||
+#define BUFLEN (1024*1024) /* max tape block size */
|
||||
#define TAPE_MARK -100 /* return record length if we read a
|
||||
* tape mark */
|
||||
#define END_OF_TAPE -101 /* 2 consecutive tape marks */
|
||||
@@ -149,7 +149,7 @@
|
||||
@@ -149,7 +152,7 @@
|
||||
len = input(from);
|
||||
} while (len > 0);
|
||||
if (len == FORMAT_ERROR) {
|
|
@ -1,11 +0,0 @@
|
|||
--- copytape.c.orig 2013-10-16 06:54:00.000000000 -0400
|
||||
+++ copytape.c 2013-10-16 06:54:13.000000000 -0400
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mtio.h>
|
Loading…
Add table
Reference in a new issue