diff options
Diffstat (limited to 'sci-visualization/grace/files/grace-5.1.22-mkstemp.patch')
-rw-r--r-- | sci-visualization/grace/files/grace-5.1.22-mkstemp.patch | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch index 5cb0f35ef9eb..402a5162c584 100644 --- a/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch +++ b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch @@ -1,12 +1,30 @@ ---- src/plotone.c.orig 2008-07-16 11:36:43.000000000 +0100 -+++ src/plotone.c 2008-07-16 12:14:22.000000000 +0100 -@@ -119,21 +119,29 @@ - if (print_file[0] == '\0') { - Device_entry dev = get_device_props(hdevice); +diff -Naur grace-5.1.22/src/editpwin.c grace-5.1.22.new/src/editpwin.c +--- grace-5.1.22/src/editpwin.c 2006-06-03 17:19:52.000000000 -0400 ++++ grace-5.1.22.new/src/editpwin.c 2008-07-26 12:45:21.000000000 -0400 +@@ -776,12 +776,12 @@ + */ + void do_ext_editor(int gno, int setno) + { +- char *fname, ebuf[256]; ++ char fname[64], ebuf[256]; + FILE *cp; + int save_autos; + +- fname = tmpnam(NULL); +- cp = grace_openw(fname); ++ strcpy(fname, "grace-XXXXXX"); ++ cp = fdopen(mkstemp(fname), "wb"); + if (cp == NULL) { + return; + } +diff -Naur grace-5.1.22/src/plotone.c grace-5.1.22.new/src/plotone.c +--- grace-5.1.22/src/plotone.c 2005-05-19 16:30:25.000000000 -0400 ++++ grace-5.1.22.new/src/plotone.c 2008-07-26 12:45:40.000000000 -0400 +@@ -121,19 +121,27 @@ sprintf(print_file, "%s.%s", get_docbname(), dev.fext); -+ prstream = grace_openw(fname); } strcpy(fname, print_file); ++ prstream = grace_openw(fname); } else { + int hdfd; s = get_print_cmd(); @@ -35,21 +53,3 @@ if (prstream == NULL) { return; } ---- src/editpwin.c.orig 2008-07-16 11:37:01.000000000 +0100 -+++ src/editpwin.c 2008-07-16 11:39:37.000000000 +0100 -@@ -776,12 +776,12 @@ - */ - void do_ext_editor(int gno, int setno) - { -- char *fname, ebuf[256]; -+ char fname[64], ebuf[256]; - FILE *cp; - int save_autos; - -- fname = tmpnam(NULL); -- cp = grace_openw(fname); -+ strcpy(fname, "grace-XXXXXX"); -+ cp = fdopen(mkstemp(fname), "wb"); - if (cp == NULL) { - return; - } |