1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

* lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.

This commit is contained in:
Paul Eggert 2011-06-15 11:50:18 -07:00
parent eeafcea7ee
commit 8c9b210626
4 changed files with 21 additions and 45 deletions

View File

@ -1,3 +1,7 @@
2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
* lib/ftoastr.c, lib/stdio.in.h, lib/verify.h: Merge from gnulib.
2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
* configure.in: Add emacsgtkfixed.o to GTK_OBJ if HAVE_GTK3.

View File

@ -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

View File

@ -461,25 +461,6 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)
_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence));
# endif
_GL_CXXALIASWARN (fseeko);
# if (@REPLACE_FSEEKO@ || !@HAVE_FSEEKO@) && !@GNULIB_FSEEK@
/* 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_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp));
# endif
_GL_CXXALIASWARN (ftello);
# if (@REPLACE_FTELLO@ || !@HAVE_FTELLO@) && !@GNULIB_FTELL@
/* 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

View File

@ -221,10 +221,18 @@ template <int w>
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 ';'. */