emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104598: * lib/ftoastr.c, lib/stdio.i


From: Paul Eggert
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104598: * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.
Date: Wed, 15 Jun 2011 11:50:18 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104598
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2011-06-15 11:50:18 -0700
message:
  * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.
modified:
  ChangeLog
  lib/ftoastr.c
  lib/stdio.in.h
  lib/verify.h
=== modified file 'ChangeLog'
--- a/ChangeLog 2011-06-14 21:08:20 +0000
+++ b/ChangeLog 2011-06-15 18:50:18 +0000
@@ -1,3 +1,7 @@
+2011-06-15  Paul Eggert  <address@hidden>
+
+       * lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.
+
 2011-06-14  Jan Djärv  <address@hidden>
 
        * configure.in: Add emacsgtkfixed.o to GTK_OBJ if HAVE_GTK3.

=== modified file 'lib/ftoastr.c'
--- a/lib/ftoastr.c     2011-01-09 01:20:28 +0000
+++ b/lib/ftoastr.c     2011-06-15 18:50:18 +0000
@@ -40,14 +40,15 @@
 # define FLOAT_MIN LDBL_MIN
 # define FLOAT_PREC_BOUND _GL_LDBL_PREC_BOUND
 # define FTOASTR ldtoastr
-# define STRTOF strtold
+# if HAVE_C99_STRTOLD
+#  define STRTOF strtold
+# endif
 #elif LENGTH == 2
 # define FLOAT double
 # define FLOAT_DIG DBL_DIG
 # define FLOAT_MIN DBL_MIN
 # define FLOAT_PREC_BOUND _GL_DBL_PREC_BOUND
 # define FTOASTR dtoastr
-# define STRTOF strtod
 #else
 # define LENGTH 1
 # define FLOAT float
@@ -55,14 +56,15 @@
 # define FLOAT_MIN FLT_MIN
 # define FLOAT_PREC_BOUND _GL_FLT_PREC_BOUND
 # define FTOASTR ftoastr
-# define STRTOF strtof
+# if HAVE_STRTOF
+#  define STRTOF strtof
+# endif
 #endif
 
 /* On pre-C99 hosts, approximate strtof and strtold with strtod.  This
    may generate one or two extra digits, but that's better than not
-   working at all.  Assume that strtof works if strtold does.  */
-#if LENGTH != 2 && ! HAVE_C99_STRTOLD
-# undef STRTOF
+   working at all.  */
+#ifndef STRTOF
 # define STRTOF strtod
 #endif
 

=== modified file 'lib/stdio.in.h'
--- a/lib/stdio.in.h    2011-05-29 21:52:18 +0000
+++ b/lib/stdio.in.h    2011-06-15 18:50:18 +0000
@@ -461,25 +461,6 @@
 _GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
 # endif
 _GL_CXXALIASWARN (fseeko);
-# if (@REPLACE_FSEEKO@ || address@hidden@) && address@hidden@
-   /* Provide an fseek function that is consistent with fseeko.  */
-   /* In order to avoid that fseek gets defined as a macro here, the
-      developer can request the 'fseek' module.  */
-#  if !GNULIB_defined_fseek_function
-#   undef fseek
-#   define fseek rpl_fseek
-static inline int _GL_ARG_NONNULL ((1))
-rpl_fseek (FILE *fp, long offset, int whence)
-{
-#   if @REPLACE_FSEEKO@
-  return rpl_fseeko (fp, offset, whence);
-#   else
-  return fseeko (fp, offset, whence);
-#   endif
-}
-#   define GNULIB_defined_fseek_function 1
-#  endif
-# endif
 #elif defined GNULIB_POSIXCHECK
 # define _GL_FSEEK_WARN /* Category 1, above.  */
 # undef fseek
@@ -539,25 +520,6 @@
 _GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
 # endif
 _GL_CXXALIASWARN (ftello);
-# if (@REPLACE_FTELLO@ || address@hidden@) && address@hidden@
-   /* Provide an ftell function that is consistent with ftello.  */
-   /* In order to avoid that ftell gets defined as a macro here, the
-      developer can request the 'ftell' module.  */
-#  if !GNULIB_defined_ftell_function
-#   undef ftell
-#   define ftell rpl_ftell
-static inline long _GL_ARG_NONNULL ((1))
-rpl_ftell (FILE *f)
-{
-#   if @REPLACE_FTELLO@
-  return rpl_ftello (f);
-#   else
-  return ftello (f);
-#   endif
-}
-#   define GNULIB_defined_ftell_function 1
-#  endif
-# endif
 #elif defined GNULIB_POSIXCHECK
 # define _GL_FTELL_WARN /* Category 1, above.  */
 # undef ftell

=== modified file 'lib/verify.h'
--- a/lib/verify.h      2011-05-29 21:52:18 +0000
+++ b/lib/verify.h      2011-06-15 18:50:18 +0000
@@ -221,10 +221,18 @@
    contexts, e.g., the top level.  */
 
 /* Verify requirement R at compile-time, as an integer constant expression.
-   Return 1.  */
+   Return 1.  This is equivalent to verify_expr (R, 1).
+
+   verify_true is obsolescent; please use verify_expr instead.  */
 
 # define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")")
 
+/* Verify requirement R at compile-time.  Return the value of the
+   expression E.  */
+
+# define verify_expr(R, E) \
+    (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E))
+
 /* Verify requirement R at compile-time, as a declaration without a
    trailing ';'.  */
 


reply via email to

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