read-file: Avoid memory reallocations with regular files.
[gnulib.git] / ChangeLog
index 2e97ef5..8a32339 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,171 @@
+2010-08-28  Giuseppe Scrivano  <gscrivano@gnu.org>
+            Eric Blake  <eblake@redhat.com>
+            Bruno Haible  <bruno@clisp.org>
+
+       read-file: Avoid memory reallocations with regular files.
+       * lib/read-file.c: Include <sys/stat.h>, <stdio.h>, <stdint.h>.
+       (fread_file): With regular files, use the remaining length as the
+       initial buffer size.  Check against overflow.
+       * modules/read-file (Depends-on): Add ftello, malloc-posix, stdint,
+       sys_stat.
+
+2010-08-28  Bruno Haible  <bruno@clisp.org>
+
+       ftello: Relax license.
+       * modules/ftello (License): Relax to LGPLv2+.
+       Reported by Eric Blake.
+
+2010-08-28  Bruno Haible  <bruno@clisp.org>
+
+       Avoid relocwrapper link errors due to gnulib replacement functions.
+       * lib/canonicalize-lgpl.c [IN_RELOCWRAPPER]: Use the system's getcwd
+       function.
+       Reported by Ben Pfaff <blp@cs.stanford.edu>.
+
+2010-08-28  Bruno Haible  <bruno@clisp.org>
+
+       Prefer using AC_DEFUN_ONCE over AC_DEFUN in projects with gnulib.
+       * m4/iconv.m4 (gl_iconv_AC_DEFUN): Use AC_DEFUN_ONCE if gl_00GNULIB is
+       defined.
+       * m4/libunistring.m4 (gl_libunistring_AC_DEFUN): Likewise.
+       Suggested by Eric Blake.
+
+2010-08-28  Bruno Haible  <bruno@clisp.org>
+
+       sys_socket, netdb: Ensure socklen_t gets defined.
+       * modules/sys_socket (Depends-on): Add socklen.
+       * modules/netdb (Depends-on): Likewise.
+       * modules/getaddrinfo (Depends-on): Remove socklen.
+       * modules/getsockopt (Depends-on): Likewise.
+       * modules/setsockopt (Depends-on): Likewise.
+       * tests/test-sys_socket.c: Check that socklen_t is defined.
+       * tests/test-netdb.c: Likewise.
+       * m4/socklen.m4: Update comments.
+       Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
+
+2010-08-27  Eric Blake  <eblake@redhat.com>
+
+       login_tty: add missing dependency
+       * modules/login_tty (Depends-on): Add pty.
+
+2010-08-26  Eric Blake  <eblake@redhat.com>
+
+       lib-symbol-versions: fix m4 quoting
+       * m4/ld-version-script.m4 (gl_LD_VERSION_SCRIPT): Use correct
+       format for AC_LINK_IFELSE.
+
+       glob: fix compile test
+       * m4/glob.m4 (gl_GLOB): Use correct format for AC_COMPILE_IFELSE.
+
+       btowc: fix missing file
+       * modules/btowc (Files): Also ship locale-fr.m4.
+
+       lseek: fix link test
+       * m4/lseek.m4 (gl_FUNC_LSEEK): Use correct format for
+       AC_LINK_IFELSE.
+
+       include_next: silence autoconf 2.68 warning
+       * m4/include_next.m4 (gl_INCLUDE_NEXT): Mark this use of
+       AC_COMPILE_IFELSE as special.
+       (AC_LANG_DEFINES_PROVIDED): Provide dummy implementation for
+       autoconf < 2.68.
+
+       acl: fix compilation test
+       * m4/acl.m4 (gl_FUNC_ALL): Use correct format for
+       AC_COMPILE_IFELSE.
+
+2010-08-26  Bruno Haible  <bruno@clisp.org>
+
+       Modernize AC_TRY_RUN invocations.
+       * m4/btowc.m4 (gl_FUNC_BTOWC): Use AC_RUN_IFELSE instead of AC_TRY_RUN.
+       * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Likewise.
+       * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise.
+       * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Likewise.
+       * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
+       * m4/fopen.m4 (gl_FUNC_FOPEN): Likewise.
+       * m4/frexp.m4 (gl_FUNC_FREXP_WORKS): Likewise.
+       * m4/frexpl.m4 (gl_FUNC_FREXPL_WORKS): Likewise.
+       * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
+       * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
+       * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN_UTF): Likewise.
+       * m4/intdiv0.m4 (gt_INTDIV0): Likewise.
+       * m4/isnanf.m4 (gl_ISNANF_WORKS): Likewise.
+       * m4/isnanl.m4 (gl_FUNC_ISNANL_WORKS): Likewise.
+       * m4/ldexpl.m4 (gl_FUNC_LDEXPL_WORKS): Likewise.
+       * m4/mbrlen.m4 (gl_MBRLEN_INCOMPLETE_STATE, gl_MBRLEN_RETVAL,
+       gl_MBRLEN_NUL_RETVAL): Likewise.
+       * m4/mbrtowc.m4 (gl_MBRTOWC_INCOMPLETE_STATE, gl_MBRTOWC_SANITYCHECK,
+       gl_MBRTOWC_NULL_ARG, gl_MBRTOWC_RETVAL, gl_MBRTOWC_NUL_RETVAL):
+       Likewise.
+       * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
+       * m4/open.m4 (gl_FUNC_OPEN): Likewise.
+       * m4/printf.m4 (gl_PRINTF_SIZES_C99, gl_PRINTF_LONG_DOUBLE,
+       gl_PRINTF_INFINITE, gl_PRINTF_INFINITE_LONG_DOUBLE,
+       gl_PRINTF_DIRECTIVE_A, gl_PRINTF_DIRECTIVE_F, gl_PRINTF_DIRECTIVE_N,
+       gl_PRINTF_DIRECTIVE_LS, gl_PRINTF_POSITIONS, gl_PRINTF_FLAG_GROUPING,
+       gl_PRINTF_FLAG_LEFTADJUST, gl_PRINTF_FLAG_ZERO, gl_PRINTF_PRECISION,
+       gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99,
+       gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1, gl_VSNPRINTF_ZEROSIZE_C99):
+       Likewise.
+       * m4/printf-posix.m4 (gt_PRINTF_POSIX): Likewise.
+       * m4/signbit.m4 (gl_SIGNBIT, gl_FLOATTYPE_SIGN_LOCATION): Likewise.
+       * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
+       * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
+       * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
+       * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Likewise.
+       * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
+       * m4/wcsrtombs.m4 (gl_WCSRTOMBS_TERMINATION): Likewise.
+       * m4/wctob.m4 (gl_FUNC_WCTOB): Likewise.
+       * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
+
+2010-08-26  Bruno Haible  <bruno@clisp.org>
+
+       Modernize AC_TRY_LINK invocations.
+       * m4/acosl.m4 (gl_FUNC_ACOSL): Use AC_LINK_IFELSE instead of
+       AC_TRY_LINK.
+       * m4/argp.m4 (gl_ARGP): Likewise.
+       * m4/asinl.m4 (gl_FUNC_ASINL): Likewise.
+       * m4/atanl.m4 (gl_FUNC_ATANL): Likewise.
+       * m4/ceil.m4 (gl_FUNC_CEIL_LIBS): Likewise.
+       * m4/ceilf.m4 (gl_FUNC_CEILF_LIBS): Likewise.
+       * m4/ceill.m4 (gl_FUNC_CEILL_LIBS): Likewise.
+       * m4/codeset.m4 (AM_LANGINFO_CODESET): Likewise.
+       * m4/cosl.m4 (gl_FUNC_COSL): Likewise.
+       * m4/expl.m4 (gl_FUNC_EXPL): Likewise.
+       * m4/floor.m4 (gl_FUNC_FLOOR_LIBS): Likewise.
+       * m4/floorf.m4 (gl_FUNC_FLOORF_LIBS): Likewise.
+       * m4/floorl.m4 (gl_FUNC_FLOORL_LIBS): Likewise.
+       * m4/frexp.m4 (gl_FUNC_FREXP, gl_CHECK_FREXP_NO_LIBM): Likewise.
+       * m4/frexpl.m4 (gl_FUNC_FREXPL, gl_CHECK_FREXPL_NO_LIBM): Likewise.
+       * m4/ftello.m4 (gl_FUNC_FTELLO): Likewise.
+       * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
+       * m4/hostent.m4 (gl_HOSTENT): Likewise.
+       * m4/iconv.m4 (AM_ICONV_LINK): Likewise.
+       * m4/intl.m4 (gt_INTL_SUBDIR_CORE): Likewise.
+       * m4/intlmacosx.m4 (gt_INTL_MACOSX): Likewise.
+       * m4/isnand.m4 (gl_HAVE_ISNAND_IN_LIBM, gl_HAVE_ISNAND_NO_LIBM):
+       Likewise.
+       * m4/isnanf.m4 (gl_HAVE_ISNANF_NO_LIBM, gl_HAVE_ISNANF_IN_LIBM):
+       Likewise.
+       * m4/isnanl.m4 (gl_HAVE_ISNANL_NO_LIBM, gl_HAVE_ISNANL_IN_LIBM):
+       Likewise.
+       * m4/lcmessage.m4 (gt_LC_MESSAGES): Likewise.
+       * m4/ldexpl.m4 (gl_FUNC_LDEXPL, gl_CHECK_LDEXPL_NO_LIBM): Likewise.
+       * m4/lib-link.m4 (AC_LIB_HAVE_LINKFLAGS): Likewise.
+       * m4/logb.m4 (gl_FUNC_LOGB): Likewise.
+       * m4/logl.m4 (gl_FUNC_LOGL): Likewise.
+       * m4/printf-frexp.m4 (gl_FUNC_PRINTF_FREXP): Likewise.
+       * m4/servent.m4 (gl_SERVENT): Likewise.
+       * m4/signbit.m4 (gl_SIGNBIT): Likewise.
+       * m4/sinl.m4 (gl_FUNC_SINL): Likewise.
+       * m4/sqrtl.m4 (gl_FUNC_SQRTL): Likewise.
+       * m4/tanl.m4 (gl_FUNC_TANL): Likewise.
+       * m4/threadlib.m4 (gl_THREADLIB_BODY): Likewise.
+       * m4/trunc.m4 (gl_FUNC_TRUNC): Likewise.
+       * m4/truncf.m4 (gl_FUNC_TRUNCF): Likewise.
+       * m4/truncl.m4 (gl_FUNC_TRUNCL): Likewise.
+       * modules/tsearch-tests (configure.ac): Likewise.
+
 2010-08-26  Bruno Haible  <bruno@clisp.org>
 
        Modernize AC_TRY_COMPILE invocations.