summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2008-07-16 11:47:32 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2008-07-16 11:47:32 +0000
commit59a9759d5f9da6274c128a75b95421598352a0a3 (patch)
treeaed1d74f79a5ab2b4d4aac2b8c57335942d4df8b /sci-visualization/grace/files/grace-5.1.22-mkstemp.patch
parentFix mozilla deps again, bug #230670 (diff)
downloadgentoo-2-59a9759d5f9da6274c128a75b95421598352a0a3.tar.gz
gentoo-2-59a9759d5f9da6274c128a75b95421598352a0a3.tar.bz2
gentoo-2-59a9759d5f9da6274c128a75b95421598352a0a3.zip
Version bump with a few patches. Removed stdc99 patch, thanks for markusle for tracking that down, closing bug #231607
(Portage version: 2.1.4.4)
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.patch55
1 files changed, 55 insertions, 0 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
new file mode 100644
index 000000000000..5cb0f35ef9eb
--- /dev/null
+++ b/sci-visualization/grace/files/grace-5.1.22-mkstemp.patch
@@ -0,0 +1,55 @@
+--- 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);
+ sprintf(print_file, "%s.%s", get_docbname(), dev.fext);
++ prstream = grace_openw(fname);
+ }
+ strcpy(fname, print_file);
+ } else {
++ int hdfd;
+ s = get_print_cmd();
+ if (s == NULL || s[0] == '\0') {
+ errmsg("No print command defined, output aborted");
+ return;
+ }
+- tmpnam(fname);
+- /* VMS doesn't like extensionless files */
+- strcat(fname, ".prn");
++ strcpy(fname, "grace-hardcopy-XXXXXX");
++ hdfd=mkstemp(fname);
++ if (hdfd == -1) {
++ errmsg("Could not create a temporary file, output aborted.");
++ return;
++ }
++ prstream = fdopen(hdfd, "wb");
++ if (prstream == NULL) {
++ errmsg("Could not create a temporary file, output aborted.");
++ return;
++ }
+ }
+
+- prstream = grace_openw(fname);
+-
+ 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;
+ }