wchar: Avoid #define replacements in C++ mode.
[gnulib.git] / ChangeLog
index db91771..e3c917a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,229 @@
 2010-03-07  Bruno Haible  <bruno@clisp.org>
 
-       Fix test-dirent link error.
-       * modules/dirent-tests (Makefile.am): Define test_dirent_LDADD.
+       wchar: Avoid #define replacements in C++ mode.
+       * lib/wchar.in.h: Include c++defs.h.
+       (btowc, wctob, mbsinit, mbrtowc, mbrlen, mbsrtowcs, mbsnrtowcs,
+       wcrtomb, wcsrtombs, wcsnrtombs): In C++, define a namespaced alias
+       symbol.
+       (wcwidth): Likewise. Fix prototype to be POSIX compliant.
+       * modules/wchar (Depends-on): Add c++defs.
+       (Makefile.am): Update wchar.h rule.
+
+       unistd: Avoid #define replacements in C++ mode.
+       * lib/unistd.in.h: Include c++defs.h.
+       (chown, close, dup, dup2, dup3, euidaccess, faccessat, fchdir,
+       fchownat, fsync, ftruncate, getcwd, getdomainname, getdtablesize,
+       getgroups, gethostname, getlogin, getlogin_r, getpagesize,
+       getusershell, setusershell, endusershell, lchown, link, linkat, lseek,
+       pipe2, pread, readlink, readlinkat, rmdir, sleep, symlink, symlinkat,
+       unlink, unlinkat, usleep, write): In C++, define a namespaced alias
+       symbol.
+       (environ): Update.
+       * modules/unistd (Depends-on): Add c++defs.
+       (Makefile.am): Update unistd.h rule.
+
+       time: Avoid #define replacements in C++ mode.
+       * lib/time.in.h: Include c++defs.h, warn-on-use.h.
+       (nanosleep, mktime, localtime_r, gmtime_r, strptime, timegm): In C++,
+       define a namespaced alias symbol.
+       * m4/time_h.m4 (gl_TIME_MODULE_INDICATOR): New macro.
+       (gl_HEADER_TIME_H_DEFAULTS): Initialize also GNULIB_MKTIME,
+       GNULIB_NANOSLEEP, GNULIB_STRPTIME, GNULIB_TIMEGM.
+       * modules/time (Depends-on): Add c++defs, warn-on-use.
+       (Makefile.am): Update time.h rule.
+       * modules/mktime (configure.ac): Invoke gl_TIME_MODULE_INDICATOR.
+       * modules/nanosleep (configure.ac): Likewise.
+       * modules/strptime (configure.ac): Likewise.
+       * modules/timegm (configure.ac): Likewise.
+
+       sys_time: Avoid #define replacements in C++ mode.
+       * lib/sys_time.in.h: Include c++defs.h.
+       (gettimeofday): In C++, define a namespaced alias symbol.
+       * modules/sys_time (Depends-on): Add c++defs.
+       (Makefile.am): Update sys/time.h rule.
+
+       sys_stat: Avoid #define replacements in C++ mode.
+       * lib/sys_stat.in.h: Include c++defs.h.
+       (fchmodat, fstat, fstatat, futimens, lchmod, lstat, mkdir, mkdirat,
+       mkfifo, mkfifoat, mknod, mknodat, utimensat): In C++, define a
+       namespaced alias symbol.
+       In C++, define a namespaced alias symbol.
+       * modules/sys_stat (Depends-on): Add c++defs.
+       (Makefile.am): Update sys/stat.h rule.
+
+       sys_socket: Avoid #define replacements in C++ mode.
+       * lib/sys_socket.in.h: Handle the case of recursive include on Cygwin.
+       Include c++defs.h. Include warn-on-use.h earlier. Enable the function
+       definitions also when the system has a <sys/socket.h>.
+       (socket, connect, accept, bind, getpeername, getsockname, getsockopt,
+       listen, recv, send, recvfrom, sendto, setsockopt, shutdown, accept4):
+       In C++, define a namespaced alias symbol.
+       * modules/sys_socket (Depends-on): Add c++defs.
+       (Makefile.am): Update sys/socket.h rule.
+
+       sys_select: Avoid #define replacements in C++ mode.
+       * lib/sys_select.in.h: Include c++defs.h. Enable the function
+       definitions also when the system has a <sys/select.h>.
+       (select): In C++, define a namespaced alias symbol.
+       * modules/sys_select (Depends-on): Add c++defs.
+       (Makefile.am): Update sys/select.h rule.
+
+       sys_ioctl: Avoid #define replacements in C++ mode.
+       * lib/sys_ioctl.in.h: Include c++defs.h.
+       (ioctl): In C++, define a namespaced alias symbol.
+       * modules/sys_ioctl (Depends-on): Add c++defs.
+       (Makefile.am): Update sys/ioctl.h rule.
+
+       string: Avoid #define replacements in C++ mode.
+       * lib/string.in.h: Include c++defs.h.
+       (stpncpy): Define to rpl_stpncpy, not gnu_stpncpy.
+       (memchr, memmem, mempcpy, memrchr, rawmemchr, stpcpy, stpncpy,
+       strchrnul, strdup, strndup, strnlen, strpbrk, strsep, strstr,
+       strcasestr, strtok_r, mbslen, mbschr, mbsrchr, mbspbrk, strerror,
+       strsignal, strverscmp): In C++, define a namespaced alias symbol.
+       * modules/string (Depends-on): Add c++defs.
+       (Makefile.am): Update string.h rule.
+
+       stdlib: Avoid #define replacements in C++ mode.
+       * lib/stdlib.in.h: Include c++defs.h.
+       (atoll, calloc, canonicalize_file_name, getloadavg, getsubopt, malloc,
+       mkdtemp, mkostemp, mkostemps, mkstemp, mkstemps, putenv, random_r,
+       srandom_r, initstate_r, setstate_r, realloc, realpath, rpmatch, setenv,
+       strtod, strtoll, strtoull, unsetenv): In C++, define a namespaced alias
+       symbol.
+       * modules/stdlib (Depends-on): Add c++defs.
+       (Makefile.am): Update stdlib.h rule.
+
+       stdio: Avoid #define replacements in C++ mode.
+       * lib/stdio.in.h: Include c++defs.h.
+       (dprintf, fclose, fflush, fopen, fprintf, fpurge, fputc, fputs,
+       freopen, fseek, fseeko, ftell, ftello, fwrite, getdelim, getline,
+       obstack_printf, obstack_vprintf, perror, popen, printf, fputc, putchar,
+       puts, remove, rename, renameat, snprintf, sprintf, asprintf, vasprintf,
+       vdprintf, vfprintf, vprintf, vsnprintf, vsprintf): In C++, define a
+       namespaced alias symbol.
+       * modules/stdio (Depends-on): Add c++defs.
+       (Makefile.am): Update stdio.h rule.
+
+       spawn: Avoid #define replacements in C++ mode.
+       * lib/spawn.in.h: Include c++defs.h.
+       (posix_spawn, posix_spawnp, posix_spawnattr_init,
+       posix_spawnattr_destroy, posix_spawnattr_getsigdefault,
+       posix_spawnattr_setsigdefault, posix_spawnattr_getsigmask,
+       posix_spawnattr_setsigmask, posix_spawnattr_getflags,
+       posix_spawnattr_setflags, posix_spawnattr_getpgroup,
+       posix_spawnattr_setpgroup, posix_spawnattr_getschedpolicy,
+       posix_spawnattr_setschedpolicy, posix_spawnattr_getschedparam,
+       posix_spawnattr_setschedparam, posix_spawn_file_actions_init,
+       posix_spawn_file_actions_destroy, posix_spawn_file_actions_addopen,
+       posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2):
+       In C++, define a namespaced alias symbol.
+       * modules/spawn (Depends-on): Add c++defs.
+       (Makefile.am): Update spawn.h rule.
+
+       signal: Avoid #define replacements in C++ mode.
+       * lib/signal.in.h: Include c++defs.h.
+       (sigismember, sigemptyset, sigaddset, sigdelset, sigfillset,
+       sigpending, sigprocmask, signal, raise, sigaction): In C++, define a
+       namespaced alias symbol.
+       * modules/signal (Depends-on): Add c++defs.
+       (Makefile.am): Update signal.h rule.
+
+       search: Avoid #define replacements in C++ mode.
+       * lib/search.in.h: Include c++defs.h.
+       (_gl_search_compar_fn, _gl_search_action_fn): New types.
+       (tsearch, tfind, tdelete, twalk): In C++, define a namespaced alias
+       symbol.
+       * modules/search (Depends-on): Add c++defs.
+       (Makefile.am): Update search.h rule.
+
+       math: Avoid #define replacements in C++ mode.
+       * lib/math.in.h: Include c++defs.h.
+       (frexp, acosl, asinl, atanl, ceilf, ceill, cosl, expl, floorf, floorl,
+       frexpl, ldexpl, logl, roundf, round, roundl, sinl, sqrtl, tanl, truncf,
+       trunc, truncl): In C++, define a namespaced alias symbol.
+       * modules/math (Depends-on): Add c++defs.
+       (Makefile.am): Update math.h rule.
+
+       locale: Avoid #define replacements in C++ mode.
+       * lib/locale.in.h: Include c++defs.h.
+       (duplocale): In C++, define a namespaced alias symbol.
+       * m4/locale_h.m4 (gl_LOCALE_H_DEFAULTS): Initialize HAVE_DUPLOCALE.
+       * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Set HAVE_DUPLOCALE.
+       * modules/locale (Depends-on): Add c++defs.
+       (Makefile.am): Update locale.h rule. Substitute HAVE_DUPLOCALE.
+
+       langinfo: Avoid #define replacements in C++ mode.
+       * lib/langinfo.in.h: Include c++defs.h.
+       (nl_langinfo): In C++, define a namespaced alias symbol.
+       * modules/langinfo (Depends-on): Add c++defs.
+       (Makefile.am): Update langinfo.h rule.
+
+       iconv-h: Avoid #define replacements in C++ mode.
+       * lib/iconv.in.h: Include c++defs.h, warn-on-use.h.
+       (iconv_open, iconv, iconv_close): In C++, define a namespaced alias
+       symbol.
+       * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Invoke gl_REPLACE_ICONV_H
+       whenever iconv is present.
+       * modules/iconv-h (Depends-on): Add c++defs, warn-on-use.
+       (Makefile.am): Update iconv.h rule.
+
+       glob: Avoid #define replacements in C++ mode.
+       * lib/glob.in.h: Include c++defs.h, warn-on-use.h.
+       (_gl_glob_errfunc_fn): New type.
+       (glob, globfree, glob_pattern_p): In C++, define a namespaced alias
+       symbol.
+       * modules/glob (Depends-on): Add c++defs, warn-on-use.
+       (Makefile.am): Update glob.h rule.
+
+       fcntl-h: Avoid #define replacements in C++ mode.
+       * lib/fcntl.in.h: Include c++defs.h.
+       (fcntl, open, openat): In C++, define a namespaced alias symbol.
+       * modules/fcntl-h (Depends-on): Add c++defs.
+       (Makefile.am): Update fcntl.h rule.
+
+       dirent: Avoid #define replacements in C++ mode.
+       * lib/dirent.in.h: Include c++defs.h.
+       (closedir, fdopendir, opendir, scandir, alphasort): In C++, define a
+       namespaced alias symbol.
+       (dirfd): Update declaration.
+       * modules/dirent (Depends-on): Add c++defs.
+       (Makefile.am): Update dirent.h rule.
+
+       ctype: Make it usable in C++ code.
+       * lib/ctype.in.h: Include c++defs.h.
+       (isblank): Declare as extern "C".
+       * modules/ctype (Depends-on): Add c++defs.
+       (Makefile.am): Update ctype.h rule.
+
+       New module 'c++defs'.
+       * modules/c++defs: New file.
+       * build-aux/c++defs.h: New file.
+       Reported by John W. Eaton <jwe@gnu.org>.
+
+2010-03-07  Bruno Haible  <bruno@clisp.org>
+
+       logb: Provide missing declaration for Cygwin.
+       * lib/math.in.h (logb): New declaration.
+       * m4/logb.m4: New file.
+       * modules/logb (Files): Add m4/logb.m4.
+       (Depends-on): Add math.
+       (configure.ac): Invoke gl_FUNC_LOGB, gl_MATH_MODULE_INDICATOR.
+       * m4/math_h.m4 (gl_MATH_H): Check also for logb declaration.
+       (gl_MATH_H_DEFAULTS): Initialize GNULIB_LOGB, HAVE_DECL_LOGB.
+       * modules/math (Makefile.am): Substitute GNULIB_LOGB, HAVE_DECL_LOGB.
+       * doc/posix-functions/logb.texi: Mention the Cygwin bug.
+
+2010-03-07  Bruno Haible  <bruno@clisp.org>
+
+       Fix test-cond link error.
+       * tests/test-cond.c: Include <stdio.h>.
+
+2010-03-07  Bruno Haible  <bruno@clisp.org>
+
+       Fix test-dirent-safer link error.
+       * modules/dirent-safer-tests (Makefile.am): Define
+       test_dirent_safer_LDADD.
 
 2010-03-07  Bruno Haible  <bruno@clisp.org>