mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-05 06:27:37 +00:00
163e8381a3
- Support SUB_FILES PR: 114077 Submitted by: KATO Tsuguru <tkato432@yahoo.com>
30 lines
863 B
Plaintext
30 lines
863 B
Plaintext
--- recept.c.orig Tue Mar 14 11:45:05 2000
|
|
+++ recept.c Sun Jun 24 00:09:07 2007
|
|
@@ -21,6 +21,7 @@
|
|
#include <gtk/gtk.h>
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
+#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
@@ -359,7 +360,7 @@
|
|
delete_showed_message (void)
|
|
{
|
|
struct linpopup_message this_message;
|
|
- char *temp_filename;
|
|
+ static char temp_filename[]="/tmp/LinPopUpXXXXXX";
|
|
int file_handle_temp, file_handle_data;
|
|
int f;
|
|
|
|
@@ -370,8 +371,7 @@
|
|
return;
|
|
}
|
|
|
|
- temp_filename = tmpnam (NULL);
|
|
- file_handle_temp = open (temp_filename, O_RDWR | O_CREAT, DATA_PERM);
|
|
+ if ( (file_handle_temp = mkstemp(temp_filename)) == -1 ) return;
|
|
file_handle_data = open (DATA_FILE, O_RDONLY, DATA_PERM);
|
|
/* lock it for reading .. */
|
|
(void) lock_reg (file_handle_data, F_SETLKW, F_RDLCK, 0, SEEK_SET, 0);
|