[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnu-libiconv] Build libiconv on linux / gets error
From: |
address@hidden |
Subject: |
Re: [bug-gnu-libiconv] Build libiconv on linux / gets error |
Date: |
Sun, 3 Apr 2016 16:57:08 -0400 (EDT) |
> But when compiling, I get this error:
>
> gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I.. -I../lib -I../intl
> -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -g -O2 -c progname.c
> In file included from progname.c:26:0:
> ./stdio.h:1010:1: error: ‘gets’ undeclared here (not in a function)
> _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets
> instead");
> ^
Yes, saw this myself on a Debian system recently. Easy to fix.
Seems related to a glibc version problem.
On a recent debian version I see :
$ cat /etc/debian_version
8.3
$ ldd --version
ldd (Debian GLIBC 2.19-18+deb8u3) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
There is the problem there. Actually, in the libiconv sources.
> But, if there are some fixes, why noone fix this error?
$ diff -c ./srclib/stdio.in.h_backup ./srclib/stdio.in.h
*** ./srclib/stdio.in.h_backup Sun Aug 7 09:42:06 2011
--- ./srclib/stdio.in.h Tue Mar 29 22:03:53 2016
***************
*** 695,702 ****
--- 695,704 ----
/* 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. */
+ #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2,
16)
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#endif
+ #endif
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
builds fine on Red Hat Enterprise linux version 6.7 because :
# ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
Of course builds fine on non-linux systems like Solaris.
Seems like an easy item to fix really .. yes, you are right. Should be
trivial to get around this annoyance.
Dennis Clarke
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [bug-gnu-libiconv] Build libiconv on linux / gets error,
address@hidden <=