--- /dev/null
+--- pinfo-0.6.0/src/manual.c.mkstemp Wed Aug 2 14:14:21 2000
++++ pinfo-0.6.0/src/manual.c Wed Aug 2 14:25:11 2000
+@@ -168,13 +168,18 @@
+ size_t macroline_size;
+ int ignored_items = 0, i = 0;
+ char zipped = 0;
++ char tempbuf[PATH_MAX] = "/tmp/pinfoXXXXXX";
++ int fd;
+
+ if (tmpfilename1)
+ {
+ unlink (tmpfilename1);
+ xfree (tmpfilename1);
+ }
+- tmpfilename1 = tempnam ("/tmp", NULL);
++ fd = mkstemp(tempbuf);
++ fchmod(fd, S_IRUSR | S_IWUSR);
++ close(fd);
++ tmpfilename1 = strdup(tempbuf);
+
+ #ifdef getmaxyx
+ init_curses ();
+@@ -199,6 +204,8 @@
+ if (ignoredmacros) /* if the pointer is non-null */
+ if (*ignoredmacros && strlen (ignoredmacros)) /* if there are some macros */
+ { /* that should be ignored */
++ char tempbuf[PATH_MAX] = "/tmp/pinfoXXXXXX";
++ int fd;
+ *location = '\0';
+ snprintf (cmd, 255, "man -W %s %s", /* we need to know the path */
+ ManOptions,
+@@ -268,9 +275,11 @@
+ }
+ else
+ source = fopen (location, "r"); /* from cmd output */
+- name = tempnam ("/tmp", NULL);
++ fd = mkstemp(tempbuf);
++ fchmod(fd, S_IRUSR | S_IWUSR);
++ name = strdup(tempbuf);
+ raw_tempfilename = name;
+- id = fopen (name, "w");
++ id = fdopen (fd, "w");
+
+ while (!feof (source)) /* we read until eof */
+ {
+@@ -370,12 +379,17 @@
+ manual_aftersearch = 0;
+ if (return_value != -1) /* -1 is quit key */
+ {
++ char tempbuf[PATH_MAX] = "/tmp/pinfoXXXXXX";
++ int fd;
+ if (tmpfilename2)
+ {
+ unlink (tmpfilename2);
+ xfree (tmpfilename2);
+ }
+- tmpfilename2 = tempnam ("/tmp", NULL);
++ fd = mkstemp(tempbuf);
++ fchmod(fd, S_IRUSR | S_IWUSR);
++ close(fd);
++ tmpfilename2 = strdup(tempbuf);
+ if (return_value != -2) /* key_back is not pressed;
+ and return_value is an
+ offset to manuallinks */
+--- pinfo-0.6.0/src/filehandling_functions.c.mkstemp Wed Aug 2 14:14:26 2000
++++ pinfo-0.6.0/src/filehandling_functions.c Wed Aug 2 14:25:42 2000
+@@ -452,12 +452,17 @@
+
+ if (number == 0) /* initialize tmp filename for file 1 */
+ {
++ char tmpbuf[PATH_MAX] = "/tmp/pinfoXXXXXX";
++ int fd;
+ if (tmpfilename1)
+ {
+ unlink (tmpfilename1); /* erase old tmpfile */
+ free (tmpfilename1);
+ }
+- tmpfilename1 = tempnam ("/tmp", NULL);
++ fd = mkstemp(tmpbuf);
++ fchmod(fd, S_IRUSR | S_IWUSR);
++ close(fd);
++ tmpfilename1 = strdup(tmpbuf);
+ tmpfilename = tmpfilename1; /* later we will refere only to tmp1 */
+ }
+ for (i = 0; i < infopathcount; i++) /* go through all paths */
+@@ -601,23 +606,33 @@
+
+ if (number == 0) /* initialize tmp filename for file 1 */
+ {
++ char tmpbuf[PATH_MAX] = "/tmp/pinfoXXXXXX";
++ int fd;
+ if (tmpfilename1)
+ {
+ unlink (tmpfilename1); /* erase old tmpfile */
+ free (tmpfilename1);
+ }
+- tmpfilename1 = tempnam ("/tmp", NULL);
++ fd = mkstemp(tmpbuf);
++ fchmod(fd, S_IRUSR | S_IWUSR);
++ close(fd);
++ tmpfilename1 = strdup(tmpbuf);
+ tmpfilename = tmpfilename1; /* later we will refere only to tmp1 */
+ }
+ else
+ /* initialize tmp filename for file 2 */
+ {
++ char tmpbuf[PATH_MAX] = "/tmp/pinfoXXXXXX";
++ int fd;
+ if (tmpfilename2)
+ {
+ unlink (tmpfilename2); /* erase old tmpfile */
+ free (tmpfilename2);
+ }
+- tmpfilename2 = tempnam ("/tmp", NULL);
++ fd = mkstemp(tmpbuf);
++ fchmod(fd, S_IRUSR | S_IWUSR);
++ close(fd);
++ tmpfilename2 = strdup(tmpbuf);
+ tmpfilename = tmpfilename2; /* later we will refere only to tmp2 */
+ }
+
+--- pinfo-0.6.0/src/common_includes.h.mkstemp Wed Aug 2 14:22:04 2000
++++ pinfo-0.6.0/src/common_includes.h Wed Aug 2 14:22:15 2000
+@@ -14,6 +14,7 @@
+ #include <stdlib.h>
+ #include <signal.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <pwd.h>
---- pinfo-0.6.6p1/po/pl.po~ Mon Sep 8 14:45:44 2003
-+++ pinfo-0.6.6p1/po/pl.po Mon Sep 8 14:45:44 2003
-@@ -1,10 +1,13 @@
+--- pinfo-0.6.8/po/pl.po.orig 2003-08-21 11:22:51.000000000 +0200
++++ pinfo-0.6.8/po/pl.po 2003-10-07 23:10:39.374541544 +0200
+@@ -1,10 +1,14 @@
# pinfo polish language module
#
# strings for the header-filter of info messages
-# , fuzzy
msgid ""
msgstr ""
- "POT-Creation-Date: 2003-02-12 21:21+0100\n"
++"Project-Id-Version: pinfo 0.6.8\n"
+ "POT-Creation-Date: 2003-08-21 11:22+0200\n"
+"PO-Revision-Date: 1999-04-21 01:50+0200\n"
+"Last-Translator: UNKNOWN\n"
+"Language-Team: Polish\n"
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
---- pinfo-0.6.6p1/po/ru.po~ Mon Sep 8 14:45:45 2003
-+++ pinfo-0.6.6p1/po/ru.po Mon Sep 8 14:45:45 2003
+--- pinfo-0.6.8/po/ru.po.orig 2003-08-21 11:22:51.000000000 +0200
++++ pinfo-0.6.8/po/ru.po 2003-10-07 23:14:34.664771992 +0200
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: 0.5.3\n"
- "POT-Creation-Date: 2003-02-12 21:21+0100\n"
+ "POT-Creation-Date: 2003-08-21 11:22+0200\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"PO-Revision-Date: 1999-04-21 01:50+0200\n"
"Last-Translator: Volosenkov Dmitry <_bil_@mail.ru>\n"
"Language-Team: russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
---- pinfo-0.6.6p1/po/sv.po~ Mon Sep 8 14:45:44 2003
-+++ pinfo-0.6.6p1/po/sv.po Mon Sep 8 14:45:44 2003
-@@ -1,10 +1,13 @@
+--- pinfo-0.6.8/po/sv.po.orig 2003-08-21 11:22:51.000000000 +0200
++++ pinfo-0.6.8/po/sv.po 2003-10-07 23:15:03.242427528 +0200
+@@ -1,10 +1,14 @@
# pinfo Swedish language module
#
# strings for the header-filter of info messages
-# , fuzzy
msgid ""
msgstr ""
- "POT-Creation-Date: 2003-02-12 21:21+0100\n"
++"Project-Id-Version: pinfo 0.6.8\n"
+ "POT-Creation-Date: 2003-08-21 11:22+0200\n"
+"PO-Revision-Date: 1999-04-21 01:50+0200\n"
+"Last-Translator: UNKNOWN\n"
+"Language-Team: Swedish\n"
Summary(ru): ðÒÏÇÒÁÍÍÁ ÐÒÏÓÍÏÔÒÁ info- É man-ÄÏËÕÍÅÎÔÏ× × ÓÔÉÌÅ lynx
Summary(uk): ðÒÏÇÒÁÍÁ ÐÅÒÅÇÌÑÄÕ info- ÔÁ man-ÄÏËÕÍÅÎÔ¦× Õ ÓÔÉ̦ lynx
Name: pinfo
-Version: 0.6.7
-Release: 2
+Version: 0.6.8
+Release: 1
License: GPL
Group: Applications/System
Vendor: Przemek Borys <pborys@dione.ids.pl>
Source0: http://dione.ids.pl/~pborys/software/pinfo/%{name}-%{version}.tar.gz
-# Source0-md5: d0ac823aa8fe528ed54004d022cb0896
+# Source0-md5: 55feb4ebaa709b52bd00a15ed0fb52fb
Source1: %{name}.sh
Source2: %{name}.csh
Patch0: %{name}-amfix.patch
Patch1: %{name}-info.patch
Patch2: %{name}-po.patch
+Patch3: %{name}-mkstemp.patch
URL: http://dione.ids.pl/~pborys/software/pinfo/
BuildRequires: autoconf
BuildRequires: automake
+BuildRequires: gettext-devel
BuildRequires: ncurses-devel >= 5.0
Requires: man-config
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
+%{__gettextize}
%{__aclocal} -I macros
%{__autoconf}
%{__automake}