1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$NetBSD: patch-ab,v 1.2 2003/02/06 15:06:18 yyamano Exp $
--- 9e.c.orig Thu Jun 15 22:40:52 2000
+++ 9e.c
@@ -1,6 +1,9 @@
/* 9e.c */
#include <assert.h>
+#ifdef __APPLE__
+#include <sys/types.h>
+#endif
#include <dirent.h>
#include <errno.h>
#include <stdio.h>
@@ -139,17 +142,16 @@
}
if(Hdrs) {
- fprintf(stderr, "%s %lo %s %s %ld %ld\n", namebuf, mode,
+ fprintf(stderr, "%s %lo %s %s %ld %ld\n", name, mode,
owner, group, mtime, size);
fout = NULL;
} else {
if (Verbose)
- fprintf(stderr, "%s %d\n", namebuf, size);
+ fprintf(stderr, "%s\n", name);
if(mode & CHDIR) {
assert(size == 0);
/* Give ourselves read, write, and execute permission */
- if(mkdir(name, (mode & ~CHDIR) | 0700) < 0)
- warn("mkdir(2) failed for", name);
+ mkdir(name, (mode & ~CHDIR) | 0700);
continue;
}
if((fout=fopen(name, "w+b")) == NULL)
|