Fix building without gets function, which is removed from recent version of glibc.
This commit is contained in:
parent
1b3fef9741
commit
bfdd6c4d1e
49
emacs-nogets.patch
Normal file
49
emacs-nogets.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
diff -up emacs-24.1/lib/stdio.in.h.nogets emacs-24.1/lib/stdio.in.h
|
||||||
|
--- emacs-24.1/lib/stdio.in.h.nogets 2012-04-08 05:03:02.000000000 +0200
|
||||||
|
+++ emacs-24.1/lib/stdio.in.h 2012-07-11 18:25:11.120972062 +0200
|
||||||
|
@@ -699,22 +699,11 @@ _GL_WARN_ON_USE (getline, "getline is un
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if @GNULIB_GETS@
|
||||||
|
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
|
||||||
|
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||||
|
-# undef gets
|
||||||
|
-# define gets rpl_gets
|
||||||
|
-# endif
|
||||||
|
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
|
||||||
|
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
|
||||||
|
-# else
|
||||||
|
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
|
||||||
|
-# undef gets
|
||||||
|
-# endif
|
||||||
|
-_GL_CXXALIASWARN (gets);
|
||||||
|
/* It is very rare that the developer ever has full control of stdin,
|
||||||
|
- so any use of gets warrants an unconditional warning. Assume it is
|
||||||
|
- always declared, since it is required by C89. */
|
||||||
|
+ so any use of gets warrants an unconditional warning; besides, C11
|
||||||
|
+ removed it. */
|
||||||
|
+#undef gets
|
||||||
|
+#if HAVE_RAW_DECL_GETS
|
||||||
|
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff -up emacs-24.1/m4/stdio_h.m4.nogets emacs-24.1/m4/stdio_h.m4
|
||||||
|
--- emacs-24.1/m4/stdio_h.m4.nogets 2012-04-08 05:03:02.000000000 +0200
|
||||||
|
+++ emacs-24.1/m4/stdio_h.m4 2012-07-11 18:25:48.112449063 +0200
|
||||||
|
@@ -18,7 +18,6 @@ AC_DEFUN([gl_STDIO_H],
|
||||||
|
GNULIB_GETC=1
|
||||||
|
GNULIB_GETCHAR=1
|
||||||
|
GNULIB_FGETS=1
|
||||||
|
- GNULIB_GETS=1
|
||||||
|
GNULIB_FREAD=1
|
||||||
|
dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
|
||||||
|
dnl "expected source file, required through AC_LIBSOURCES, not found". It is
|
||||||
|
@@ -113,7 +112,6 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
|
||||||
|
GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
|
||||||
|
GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
|
||||||
|
GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
|
||||||
|
- GNULIB_GETS=0; AC_SUBST([GNULIB_GETS])
|
||||||
|
GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
|
||||||
|
GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
|
||||||
|
GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])
|
@ -30,6 +30,9 @@ Patch3: rpm-spec-mode-changelog.patch
|
|||||||
Patch7: emacs-spellchecker.patch
|
Patch7: emacs-spellchecker.patch
|
||||||
# rhbz#830162
|
# rhbz#830162
|
||||||
Patch8: emacs-locate-library.patch
|
Patch8: emacs-locate-library.patch
|
||||||
|
# Fix building without gets function, which is removed from recent
|
||||||
|
# version of glibc.
|
||||||
|
Patch9: emacs-nogets.patch
|
||||||
|
|
||||||
BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk3-devel, libpng-devel
|
BuildRequires: atk-devel, cairo-devel, freetype-devel, fontconfig-devel, dbus-devel, giflib-devel, glibc-devel, gtk3-devel, libpng-devel
|
||||||
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
|
BuildRequires: libjpeg-devel, libtiff-devel, libX11-devel, libXau-devel, libXdmcp-devel, libXrender-devel, libXt-devel
|
||||||
@ -155,6 +158,7 @@ packages that add functionality to Emacs.
|
|||||||
%patch0 -p1 -b .glibc-open-macro
|
%patch0 -p1 -b .glibc-open-macro
|
||||||
%patch7 -p1 -b .spellchecker
|
%patch7 -p1 -b .spellchecker
|
||||||
%patch8 -p1 -b .locate-library
|
%patch8 -p1 -b .locate-library
|
||||||
|
%patch9 -p1 -b .nogets
|
||||||
|
|
||||||
# Install site-lisp files
|
# Install site-lisp files
|
||||||
cp %SOURCE7 %SOURCE10 site-lisp
|
cp %SOURCE7 %SOURCE10 site-lisp
|
||||||
@ -440,8 +444,8 @@ update-desktop-database &> /dev/null || :
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Jul 11 2012 Karel Klíč <kklic@redhat.com> - 1:24.1-3
|
* Wed Jul 11 2012 Karel Klíč <kklic@redhat.com> - 1:24.1-3
|
||||||
- Fix org-mode to work without emacs-el installed.
|
- Fix org-mode to work without emacs-el installed. rhbz#830162
|
||||||
rhbz#830162
|
- Fix building without gets function, which is removed from recent version of glibc.
|
||||||
|
|
||||||
* Wed Jul 11 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:24.1-2
|
* Wed Jul 11 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:24.1-2
|
||||||
- Build -el, -terminal, and -filesystem as noarch (rhbz#834907).
|
- Build -el, -terminal, and -filesystem as noarch (rhbz#834907).
|
||||||
|
Loading…
Reference in New Issue
Block a user