[libfep] Fix gets call for glibc-2.16 changes

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


commit b63c1710fd946f35a3fc61ca27bd58b0c90b2f60
Author: Parag Nemade <panemade at gmail.com>
Date:   Sun Aug 5 13:46:52 2012 +0530

    Fix gets call for glibc-2.16 changes

 libfep-0.0.8-no_gets.patch |   49 ++++++++++++++++++++++++++++++++++++++++++++
 libfep.spec                |    8 +++++-
 2 files changed, 55 insertions(+), 2 deletions(-)
---
diff --git a/libfep-0.0.8-no_gets.patch b/libfep-0.0.8-no_gets.patch
new file mode 100644
index 0000000..0796c7d
--- /dev/null
+++ b/libfep-0.0.8-no_gets.patch
@@ -0,0 +1,49 @@
+diff -urN libfep-0.0.8.orig/lib/stdio.in.h libfep-0.0.8/lib/stdio.in.h
+--- libfep-0.0.8.orig/lib/stdio.in.h	2012-03-29 06:47:35.000000000 +0530
++++ libfep-0.0.8/lib/stdio.in.h	2012-08-05 13:32:40.629856021 +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 libfep-0.0.8.orig/m4/stdio_h.m4 libfep-0.0.8/m4/stdio_h.m4
+--- libfep-0.0.8.orig/m4/stdio_h.m4	2012-03-29 06:47:36.000000000 +0530
++++ libfep-0.0.8/m4/stdio_h.m4	2012-08-05 13:33:02.969984841 +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/libfep.spec b/libfep.spec
index a68af9b..f5d34a2 100644
--- a/libfep.spec
+++ b/libfep.spec
@@ -1,12 +1,13 @@
 Name:		libfep
 Version:	0.0.8
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Library to implement FEP (front end processor) on ANSI terminals
 
 License:	BSD and GPLv3+
 Group:		System Environment/Libraries
 URL:		http://github.com/ueno/libfep
 Source0:	http://cloud.github.com/downloads/ueno/libfep/%{name}-%{version}.tar.gz
+Patch0:         libfep-0.0.8-no_gets.patch
 
 # FIXME switch to libgee-0.8 once this package is ready for the new libgee API
 BuildRequires:	pkgconfig(gee-1.0)
@@ -31,7 +32,7 @@ developing applications that use %{name}.
 
 %prep
 %setup -q
-
+%patch0 -p1 -b .no_gets
 
 %build
 # needed to regenerate GIR
@@ -68,6 +69,9 @@ cp -p fep/README README.fep
 
 
 %changelog
+* Sat Aug 04 2012 Parag Nemade <paragn AT fedoraproject DOT org> - 0.0.8-3
+- Fix gets call for glibc-2.16 changes
+
 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.8-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list