[recutils] Fix gets call for glibc-2.16 changes

paragn paragn at fedoraproject.org
Sun Aug 5 08:17:35 UTC 2012


commit 0ab1140c508947f1d222fed70358f76f3f4b6a34
Author: Parag Nemade <panemade at gmail.com>
Date:   Sun Aug 5 13:47:21 2012 +0530

    Fix gets call for glibc-2.16 changes

 recutils-1.5-no_gets.patch |   49 ++++++++++++++++++++++++++++++++++++++++++++
 recutils.spec              |    8 +++++-
 2 files changed, 55 insertions(+), 2 deletions(-)
---
diff --git a/recutils-1.5-no_gets.patch b/recutils-1.5-no_gets.patch
new file mode 100644
index 0000000..97e2edb
--- /dev/null
+++ b/recutils-1.5-no_gets.patch
@@ -0,0 +1,49 @@
+diff -urN recutils-1.5.orig/lib/stdio.in.h recutils-1.5/lib/stdio.in.h
+--- recutils-1.5.orig/lib/stdio.in.h	2012-01-11 01:46:13.000000000 +0530
++++ recutils-1.5/lib/stdio.in.h	2012-08-05 13:10:07.055682444 +0530
+@@ -699,22 +699,11 @@
+ # 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 -urN recutils-1.5.orig/m4/stdio_h.m4 recutils-1.5/m4/stdio_h.m4
+--- recutils-1.5.orig/m4/stdio_h.m4	2012-01-11 01:46:15.000000000 +0530
++++ recutils-1.5/m4/stdio_h.m4	2012-08-05 13:07:49.291642775 +0530
+@@ -18,7 +18,6 @@
+   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 @@
+   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])
diff --git a/recutils.spec b/recutils.spec
index 392d0c6..b33fc2d 100644
--- a/recutils.spec
+++ b/recutils.spec
@@ -1,6 +1,6 @@
 Name:		recutils
 Version:	1.5
-Release:	3%{?dist}
+Release:	4%{?dist}
 Summary:	A set of tools to access GNU recfile databases
 
 License:	GPLv3+
@@ -8,6 +8,7 @@ URL:		http://www.gnu.org/software/recutils/
 Source0:	ftp://ftp.gnu.org/gnu/recutils/%{name}-%{version}.tar.gz
 Source1:	rec-mode-init.el
 Patch0:		recutils-shared-lib-calls-exit.patch
+Patch1:         recutils-1.5-no_gets.patch
 
 BuildRequires:	gettext
 BuildRequires:	emacs-nox
@@ -40,7 +41,7 @@ Libraries and header files for recutils
 %prep
 %setup -q
 %patch0 -p1 -b .shared-lib-calls-exit
-
+%patch1 -p1 -b .no_gets
 
 %build
 %configure --disable-static --disable-rpath
@@ -103,6 +104,9 @@ fi
 
 
 %changelog
+* Sat Aug 04 2012 Parag Nemade <paragn AT fedoraproject DOT org> - 1.5-4
+- Fix gets call for glibc-2.16 changes
+
 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.5-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list