View | Details | Raw Unified | Return to bug 118182
Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +10 lines)
Line  Link Here
0
-- arc-5.21l.orig/arcsvc.c
0
++ arc-5.21l/arcsvc.c
Lines 17-22 Link Here
17
	 Computer Innovations Optimizing C86
17
	 Computer Innovations Optimizing C86
18
*/
18
*/
19
#include <stdio.h>
19
#include <stdio.h>
20
#include <sys/types.h>
21
#include <sys/stat.h>
22
#include <fcntl.h>
20
#include "arc.h"
23
#include "arc.h"
21
#if	_MTS
24
#if	_MTS
22
#include <mts.h>
25
#include <mts.h>
Lines 52-58 Link Here
52
	}
55
	}
53
#endif
56
#endif
54
	if (chg) {		/* if opening for changes */
57
	if (chg) {		/* if opening for changes */
55
		if (!(new = fopen(newname, OPEN_W)))
58
		int fd;
59
60
		if ((fd = open(newname, O_CREAT|O_EXCL|O_RDWR, S_IREAD|S_IWRITE)) == -1)
61
			arcdie("Cannot create archive copy: %s", newname);
62
63
		if (!(new = fdopen(fd, OPEN_W)))
56
			arcdie("Cannot create archive copy: %s", newname);
64
			arcdie("Cannot create archive copy: %s", newname);
57
65
58
	changing = chg;		/* note if open for changes */
66
	changing = chg;		/* note if open for changes */

Return to bug 118182