emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108106: Fix build failure with gl


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108106: Fix build failure with glibc-2.16.
Date: Tue, 14 Aug 2012 17:59:25 +0800
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108106
fixes bug: http://debbugs.gnu.org/11873
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Tue 2012-08-14 17:59:25 +0800
message:
  Fix build failure with glibc-2.16.
  
  * lib/gnulib.mk:
  * lib/stdio.in.h:
  * m4/stdio_h.m4: Do not assume that gets is defined.
modified:
  ChangeLog
  lib/gnulib.mk
  lib/stdio.in.h
  m4/stdio_h.m4
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-21 19:42:32 +0000
+++ b/ChangeLog 2012-08-14 09:59:25 +0000
@@ -1,3 +1,9 @@
+2012-08-14  Ulrich Mueller  <address@hidden>
+
+       * lib/gnulib.mk:
+       * lib/stdio.in.h:
+       * m4/stdio_h.m4: Do not assume that gets is defined (Bug#11873).
+
 2012-06-21  Ulrich Mueller  <address@hidden>
 
        * configure.in: Use m/intel386.h for amd64 with x32 ABI.  (Bug#11669)

=== modified file 'lib/gnulib.mk'
--- a/lib/gnulib.mk     2012-02-01 06:04:34 +0000
+++ b/lib/gnulib.mk     2012-08-14 09:59:25 +0000
@@ -599,7 +599,6 @@
              -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
              -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
              -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
-             -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
              -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
              -e 
's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
              -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \

=== modified file 'lib/stdio.in.h'
--- a/lib/stdio.in.h    2011-09-26 21:30:18 +0000
+++ b/lib/stdio.in.h    2012-08-14 09:59:25 +0000
@@ -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
 
@@ -1054,7 +1043,7 @@
 # endif
 #endif
 
-/* Some people would argue that sprintf should be handled like gets
+/* Some people would argue that sprintf uses should be warned about
    (for example, OpenBSD issues a link warning for both functions),
    since both can cause security holes due to buffer overruns.
    However, we believe that sprintf can be used safely, and is more

=== modified file 'm4/stdio_h.m4'
--- a/m4/stdio_h.m4     2011-09-26 21:30:18 +0000
+++ b/m4/stdio_h.m4     2012-08-14 09:59:25 +0000
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 40
+# stdio_h.m4 serial 41
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -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
@@ -72,10 +71,10 @@
 
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, and which is not
-  dnl guaranteed by C89.
+  dnl guaranteed by C89 and C11.
   gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
-    ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat
-    snprintf tmpfile vdprintf vsnprintf])
+    ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
+    renameat snprintf tmpfile vdprintf vsnprintf])
 ])
 
 AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
@@ -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])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]