handle open being a macro
This commit is contained in:
parent
69531d2c3c
commit
8910b36358
20
nano-2.0.6-open-macro.patch
Normal file
20
nano-2.0.6-open-macro.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- nano-2.0.6/src/files.c~ 2007-04-21 21:33:56.000000000 +0100
|
||||||
|
+++ nano-2.0.6/src/files.c 2007-08-22 18:52:11.000000000 +0100
|
||||||
|
@@ -1518,7 +1518,7 @@ bool write_file(const char *name, FILE *
|
||||||
|
}
|
||||||
|
|
||||||
|
if (f_open == NULL) {
|
||||||
|
- fd_source = open(realname, O_RDONLY | O_CREAT);
|
||||||
|
+ fd_source = open(realname, O_RDONLY | O_CREAT, 0600);
|
||||||
|
|
||||||
|
if (fd_source != -1) {
|
||||||
|
f_source = fdopen(fd_source, "rb");
|
||||||
|
@@ -1637,7 +1637,7 @@ bool write_file(const char *name, FILE *
|
||||||
|
int fd_source;
|
||||||
|
FILE *f_source = NULL;
|
||||||
|
|
||||||
|
- fd_source = open(tempname, O_RDONLY | O_CREAT);
|
||||||
|
+ fd_source = open(tempname, O_RDONLY | O_CREAT, 0600);
|
||||||
|
|
||||||
|
if (fd_source != -1) {
|
||||||
|
f_source = fdopen(fd_source, "rb");
|
@ -6,6 +6,7 @@ License: GPLv2+
|
|||||||
Group: Applications/Editors
|
Group: Applications/Editors
|
||||||
URL: http://www.nano-editor.org
|
URL: http://www.nano-editor.org
|
||||||
Source: http://www.nano-editor.org/dist/v1.3/%{name}-%{version}.tar.gz
|
Source: http://www.nano-editor.org/dist/v1.3/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: nano-2.0.6-open-macro.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: ncurses-devel, autoconf, gettext-devel, groff
|
BuildRequires: ncurses-devel, autoconf, gettext-devel, groff
|
||||||
Requires(post): /sbin/install-info
|
Requires(post): /sbin/install-info
|
||||||
@ -16,6 +17,7 @@ GNU nano is a small and friendly text editor.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
iconv -f iso-8859-1 -t utf-8 -o nano.1.tmp doc/man/fr/nano.1 && mv nano.1.tmp doc/man/fr/nano.1
|
iconv -f iso-8859-1 -t utf-8 -o nano.1.tmp doc/man/fr/nano.1 && mv nano.1.tmp doc/man/fr/nano.1
|
||||||
iconv -f iso-8859-1 -t utf-8 -o nanorc.5.tmp doc/man/fr/nano.1 && mv nanorc.5.tmp doc/man/fr/nanorc.5
|
iconv -f iso-8859-1 -t utf-8 -o nanorc.5.tmp doc/man/fr/nano.1 && mv nanorc.5.tmp doc/man/fr/nanorc.5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user