openbsd-ports/devel/ddd/patches/patch-ddd_exit_C
2002-03-21 05:28:20 +00:00

17 lines
510 B
Plaintext

$OpenBSD: patch-ddd_exit_C,v 1.2 2002/03/21 05:28:21 fgsch Exp $
--- ddd/exit.C.orig Tue Dec 19 12:45:49 2000
+++ ddd/exit.C Wed Mar 13 04:32:03 2002
@@ -1149,8 +1149,10 @@ void report_core(ostream& log)
if (!is_core_file("core"))
return;
- string tempfile = tmpnam(0);
- ofstream os(tempfile);
+ char temp_name[] = "/tmp/ddd.XXXXXXXXXX";
+ int temp_fd = mkstemp(temp_name);
+ string tempfile = temp_name;
+ ofstream os(temp_fd);
os <<
"set verbose off\n"
"set height 0\n"