summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* * lib/stdbool.in.h (_Bool) [__cplusplus]: bool, not _Bool.Paul Eggert2012-08-291-1/+2
|
* stdbool: be more compatible with mixed C/C++ compilesPaul Eggert2012-08-291-19/+29
| | | | | | | * lib/stdbool.in.h (_Bool, true, false) [__cplusplus]: Define to bool, true, false, respectively, as GCC's builtin stdbool.h does. Problem reported by Michael Goffioul in <http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00143.html>.
* xstrtol.h: avoid "_Noreturn is not at beginning of declaration" warningJim Meyering2012-08-241-1/+1
| | | | | * lib/xstrtol.h: Put "_Noreturn" before "void" in declaration, to placate gcc's -Wold-style-declaration.
* pipe-filter: fix comment typoReuben Thomas2012-08-221-1/+1
| | | | * lib/pipe-filter.h: Mention correct function.
* execinfo: new modulePaul Eggert2012-08-222-0/+57
| | | | | | | | | | This is for Emacs. Currently, it provides a no-effect stub on all platforms where it does not already work. It already works on glibc-based systems, and on Solaris 11. * lib/execinfo.c, lib/execinfo.in.h, m4/execinfo.m4, modules/execinfo: New files. * doc/glibc-headers/execinfo.texi (execinfo.h): * MODULES.html.sh (Misc): Document it.
* sys_select: avoid 'static inline'Paul Eggert2012-08-191-1/+1
| | | | * lib/sys_select.in.h (rpl_fd_isset): Now static, not static inline.
* mktime: avoid 'static inline'Paul Eggert2012-08-191-2/+2
| | | | | * lib/mktime.c (leapyear, ydhms_diff): Now static, not static inline. * m4/mktime.m4 (gl_PREREQ_MKTIME): Do not require AC_C_INLINE.
* count-leading-zeros: use a lookup table on non-gcc compilersEric Blake2012-08-111-25/+16
| | | | | | | | | | | While this only affects non-gcc compilers, we can assume that lookups are faster than conditionals, even if it results in a slightly larger executable size. * lib/count-leading-zeros.h (count_leading_zeros_32): Use an alternate implementation, suggested by Jim Meyering. Signed-off-by: Eric Blake <eblake@redhat.com>
* count-leading-zeros: new moduleEric Blake2012-08-101-0/+100
| | | | | | | | | | | | | | | | | | I needed gcc's clz to determine the most significant bit of a number (useful for things like truncating to a power of 2), and was surprised it is not a standardized function (the opposite direction of finding the least significant bit is given by ffs). This borrows heavily from the design of the count-one-bits module. * modules/count-leading-zeros: New module. * m4/count-leading-zeros.m4: New file. * lib/count-leading-zeros.h: Likewise. * modules/count-leading-zeros-tests: New test. * tests/test-count-leading-zeros.c: New file. * MODULES.html.sh (Integer arithmetic functions): Document it. Signed-off-by: Eric Blake <eblake@redhat.com>
* base64: Use extern C scope in header file, for C++.Simon Josefsson2012-08-021-0/+8
| | | | * lib/base64.h: Add C++ namespace protection.
* stat-time, timespec, u64: support naive out-of-dir buildsPaul Eggert2012-08-023-3/+3
| | | | | | | | * lib/stat-time.c, lib/timespec.c, lib/u64.c: Use '#include "foo.h"', not '#include <foo.h>', when including one's own interface. This works better when configuring with out-of-directory builds, since packages need not add an otherwise-unnecessary -I$(topdir_src)/lib to DEFAULT_INCLUDES.
* Keep the extern-inline macros closer together.Paul Eggert2012-08-014-16/+12
|
* utimens: use extern-inlinePaul Eggert2012-08-012-1/+30
| | | | | | | | * lib/utimens.c (_GL_UTIMENS_INLINE): Define when including utimens.h. * lib/utimens.h: Add copyright notice, since this is now large enough to copyright. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (_GL_UTIMENS_INLINE): New macro. Use it instead of 'static inline'. * modules/utimens (Depends-on): Add extern-inline.
* u64: use extern-inlinePaul Eggert2012-08-012-10/+21
| | | | | | | | | | | * lib/u64.c: New file. * lib/u64.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (_GL_U64_INLINE): New macro. Use it instead of 'static inline'. * modules/u64 (Files): Add lib/u64.c. (Depends-on): Add extern-inline. (configure.ac): No need to require AC_C_INLINE, since extern-inline does that now. (lib_SOURCES): Add u64.c.
* timespec: use extern-inlinePaul Eggert2012-08-012-3/+14
| | | | | | | | | * lib/timespec.c: New file. * lib/timespec.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (_GL_TIMESPEC_INLINE): New macro. Use it instead of 'static inline'. * modules/timespec (Files): Add lib/timespec.c. (Depends-on): Add extern-inline. (lib_SOURCES): Add timespec.c.
* stat-time: use extern-inlinePaul Eggert2012-08-012-8/+19
| | | | | | | | | * lib/stat-time.c: New file. * lib/stat-time.h: Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (_GL_STAT_TIME_INLINE): New macro. Use it instead of 'static inline'. * modules/stat-time (Files): Add lib/stat-time.c. (Depends-on): Add extern-inline. (lib_SOURCES): Add stat-time.c.
* passfd: fix comment on recvfdEric Blake2012-07-301-1/+1
| | | | | | | * lib/passfd.c (recvfd): Fix comment. Reported by Jann Horn <jannhorn@googlemail.com>. Signed-off-by: Eric Blake <eblake@redhat.com>
* clean-temp: Fix memory leak.John Darrington2012-07-291-1/+4
| | | | | * lib/clean-temp.c (cleanup_temp_dir): Free also the 'subdirs' and 'files' members of tmpdir.
* getpass: Assume AC_CHECK_DECLS_ONCE invocation, like in getpass.m4.Bruno Haible2012-07-221-1/+1
| | | | | | | * lib/getpass.h: Assume HAVE_DECL_GETPASS is defined. * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests): Remove exemption for getpass.h. Suggested by Eric Blake.
* verify: document conflict with -Wnested-externsEric Blake2012-07-201-1/+5
| | | | | | | | | | | Our implementation of verify() relies on nested extern declarations, so it is incompatible with gcc < 4.6 coupled with -Wnested-externs when used inside a function body. But inside a function body, you can always arrange to use verify_expr() instead, which is warning-free. * lib/verify.h: Give hint about usage when gcc warnings are enabled. Signed-off-by: Eric Blake <eblake@redhat.com>
* fsusage: port back to SolarisPaul Eggert2012-07-201-2/+3
| | | | | | * lib/fsusage.c (get_fs_usage): Fix busted logic causing compile-time error (fsd not declared) on Solaris 10. Reported privately by Andrew Borodin.
* fpending: Assume AC_CHECK_DECLS_ONCE invocation, like in fpending.m4.Bruno Haible2012-07-151-4/+0
| | | | | | | * lib/fpending.h: Assume HAVE_DECL___FPENDING is defined. * cfg.mk (exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests) Remove exemption for fpending.h. Suggested by Eric Blake.
* pthread_sigmask: fix bug on FreeBSD 9Paul Eggert2012-07-151-2/+25
| | | | | | | | | | | | * lib/pthread_sigmask.c [PTHREAD_SIGMASK_INEFFECTIVE]: Include string.h. (pthread_sigmask) [PTHREAD_SIGMASK_INEFFECTIVE]: When calling pthread_sigmask (1729, NEW, OLD), specify non-null NEW; this avoids a bug on FreeBSD 9, where pthread_sigmask is effective but pthread_sigmask (1729, NULL, NULL) returns zero. See <http://bugs.gnu.org/11884>. Avoid the need to call pthread_sigmask (1729, ...) in most cases, by inspecting whether the main call changed the old mask.
* argp: make HAVE_DECL usage consistentEric Blake2012-07-131-2/+2
| | | | | | | | | | | | | | Autoconf guarantees that AC_CHECK_DECLS always defines the corresponding HAVE_DECL_*. But our hand-coded use of AC_CHECK_DECL did not define the macro to 0, leading to a false positive complaint: https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html By sticking to conventions, we avoid the false positive. * lib/argp-parse.c (__argp_parse): Check contents of HAVE_DECL macros, not whether they are defined. * m4/argp.m4 (gl_ARGP): Always define HAVE_DECL_* macros, per convention with other declaration checks. Reported by Karel Zak, with suggestions from Paul Eggert.
* gettext: do not assume '#define ... defined ...' behaviorPaul Eggert2012-07-121-3/+6
| | | | | | | | * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Do not use '#define FOO ... defined BAR ...', as the C standard says it's not portable to expect that this works after macro expansion. Problem reported for gzip by Steven M. Schweda in <http://lists.gnu.org/archive/html/bug-gzip/2012-07/msg00000.html>.
* getloadavg: clean out old Emacs and Autoconf cruftPaul Eggert2012-07-101-25/+3
| | | | | | | | See Glenn Morris in <http://bugs.gnu.org/11905>. * lib/getloadavg.c: Include <config.h>, <stdbool.h> always. Include <sys/param.h> if HAVE_SYS_PARAM_H, not if unix or __unix. (LDAV_CVT): Remove no-longer-used LOAD_AVE_CVT hook. * m4/getloadavg.m4 (gl_PREREQ_GETLOADAVG): Check for <sys/param.h>.
* getloadavg, getopt: fix commentary re configure.inPaul Eggert2012-07-091-1/+1
| | | | | | | | | | Autoconf is deprecating the name 'configure.in', so change it to to the new name 'configure.ac' in a couple of places. * lib/getloadavg.c: configure.in -> configure.ac, in comment. * m4/getopt.m4 (gl_GETOPT_IFELSE, gl_GETOPT_SUBSTITUTE_HEADER) (gl_PREREQ_GETOPT): Remove obsolete commentary re Emacs configure.in. Emacs has renamed it to configure.ac, and it no longer refers to these macros anyway.
* timespec: mark functions with const attributesPaul Eggert2012-07-091-3/+6
| | | | | * lib/timespec.h (timespec_add, timespec_sub, dtotimespec): Mark with _GL_ATTRIBUTE_CONST.
* timespec-sub: avoid duplicate includePaul Eggert2012-07-061-1/+0
| | | | | * lib/timespec-sub.c: Do not include <config.h> twice. Reported by Juanma Barranquero.
* parse-datetime: fix failure to diagnose invalid inputJim Meyering2012-07-041-1/+7
| | | | | | | | | | | | date -d "$(printf '\xb0')" would print 00:00:00 with today's date rather than diagnosing the invalid input. Now it reports this: date: invalid date '\260' * lib/parse-datetime.y (to_uchar): Define. (yylex): Don't sign-extend "other" bytes. * m4/parse-datetime.m4: Require AC_C_INLINE for first use of "inline". Thanks to Bruno Haible for the patch to this file. * tests/test-parse-datetime.c (main): Add a test to trigger the bug. Peter Evans reported the bug in GNU date: http://bugs.gnu.org/11843
* alloca: add support for HP NonStop TNS/E nativePaul Eggert2012-07-031-0/+7
| | | | | | * lib/alloca.in.h (alloca): Support the new host. From a suggestion by Joachim Schmitz in <http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00355.html>.
* fsusage: remove code not needed on non GNU/Linux systems.Pádraig Brady2012-07-031-12/+11
| | | | | | | | * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]: Don't include headers no longer needed in this case. * lib/fsusage.c [STAT_STATVFS && ! (__linux__ && (__GLIBC__||__UCLIBC__))]: Undefine STAT_STATFS2_FRSIZE to exclude code not used in this case.
* fsusage: include files needed for glibc 2.6 fallbackPaul Eggert2012-07-021-9/+12
| | | | | | | | * lib/fsusage.c [STAT_STATVFS || STAT_STATVFS64]: Include <sys/param.h>, <sys/mount.h>, <sys/vfs.h> as they are needed for the 2.6 < glibc/Linux < 2.6.36 fallback. Problem reported by Ludovic Courtès in <http://lists.gnu.org/archive/html/bug-gnulib/2012-07/msg00005.html>.
* root-uid: new modulePaul Eggert2012-06-265-6/+43
| | | | | | | | | | | | | | | | | | | | | This is for portability to Tandem's NonStop Kernel. * lib/root-uid.h, modules/root-uid: New files. * lib/euidaccess.c, lib/pt_chown.c, lib/unlinkdir.c: * lib/write-any-file.c, tests/test-sethostname2.c: Include "root-uid.h". * lib/euidaccess.c (euidaccess): * lib/pt_chown.c (main): * lib/unlinkdir.c (cannot_unlink_dir): * lib/write-any-file.c (can_write_any_file): * m4/mknod.m4 (gl_FUNC_MKNOD): * tests/test-sethostname2.c (geteuid, main): Don't assume ROOT_UID == 0. * modules/euidaccess (Depends-on): * modules/pt_chown (Depends-on): * modules/sethostname-tests (Depends-on): * modules/unlinkdir (Depends-on): * modules/write-any-file (Depends-on): Add root-uid.
* regex: use locale-independent comparison for codeset namePaul Eggert2012-06-262-3/+4
| | | | | | | | | See Bruno Haible's comment in <http://bugs.gnu.org/10305#120>. * lib/regcomp.c (init_dfa): Use just ASCII case comparison for codeset name. * lib/regex_internal.h: Do not include <strings.h>, since we no longer use strcasecmp. * modules/regex (Depends-on): Remove strcase.
* argp, regex: Ensure strcasecmp gets declared.Bruno Haible2012-06-262-0/+2
| | | | | | * lib/argp-help.c: Include <strings.h>. * lib/regex_internal.h: Likewise. Reported and suggested by Joachim Schmitz <jojo@schmitz-digital.de>.
* ptsname_r: Fix typo in last commit.Bruno Haible2012-06-251-1/+1
|
* ptsname_r: Make it consistent with ptsname on AIX.Bruno Haible2012-06-251-3/+10
| | | | | | | * lib/ptsname_r.c (__ptsname_r): For AIX, use nearly the same implementation as for OSF/1. * tests/test-ptsname_r.c (main) [AIX]: Use the modern way of opening a pty master.
* ptsname_r: Make it consistent with ptsname on OSF/1.Bruno Haible2012-06-241-0/+37
| | | | | * lib/ptsname_r.c (__ptsname_r): Add a different implementation for OSF/1.
* ttyname_r: Fix result on OSF/1, Solaris.Bruno Haible2012-06-241-1/+1
| | | | * lib/ttyname_r.c (ttyname_r): Produce a NUL-terminated result.
* ptsname_r: Add support for Solaris.Bruno Haible2012-06-241-0/+50
| | | | | * lib/ptsname_r.c (__ptsname_r): Add a different implementation for Solaris.
* ptsname_r: Fix test failures on IRIX, Solaris.Bruno Haible2012-06-241-2/+11
| | | | | | | | | | * m4/ptsname_r.m4 (gl_PREREQ_PTSNAME_R): Test whether isatty sets errno when it fails. Define ISATTY_FAILS_WITHOUT_SETTING_ERRNO accordingly. * lib/ptsname_r.c: Include <fcntl.h>. (__ptsname_r): When isatty returned false, then on IRIX, Solaris set errno if fd is invalid. * tests/test-isatty.c (main): Update comments.
* Write "Mac OS X" instead of "MacOS X".Bruno Haible2012-06-2253-144/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README: Write "Mac OS X" instead of "MacOS X". * build-aux/bootstrap: Likewise. * build-aux/install-reloc: Likewise. * lib/acl-internal.h: Likewise. * lib/acl_entries.c: Likewise. * lib/argp-ba.c: Likewise. * lib/argp-pv.c: Likewise. * lib/config.charset: Likewise. * lib/copy-acl.c: Likewise. * lib/csharpexec.c: Likewise. * lib/euidaccess.c: Likewise. * lib/fbufmode.c: Likewise. * lib/fflush.c: Likewise. * lib/file-has-acl.c: Likewise. * lib/filemode.h: Likewise. * lib/fpurge.c: Likewise. * lib/freadable.c: Likewise. * lib/freadahead.c: Likewise. * lib/freading.c: Likewise. * lib/freadptr.c: Likewise. * lib/freadseek.c: Likewise. * lib/fseeko.c: Likewise. * lib/fseterr.c: Likewise. * lib/fsusage.c: Likewise. * lib/fwritable.c: Likewise. * lib/fwriting.c: Likewise. * lib/get-rusage-as.c: Likewise. * lib/get-rusage-data.c: Likewise. * lib/getdomainname.c: Likewise. * lib/idpriv-drop.c: Likewise. * lib/idpriv-droptemp.c: Likewise. * lib/localcharset.c: Likewise. * lib/locale.in.h: Likewise. * lib/localename.c: Likewise. * lib/mbsrtowcs-state.c: Likewise. * lib/nproc.c: Likewise. * lib/passfd.c: Likewise. * lib/posix_openpt.c: Likewise. * lib/printf-parse.c: Likewise. * lib/progreloc.c: Likewise. * lib/safe-read.h: Likewise. * lib/safe-write.h: Likewise. * lib/sched.in.h: Likewise. * lib/set-mode-acl.c: Likewise. * lib/signal.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/strtod.c: Likewise. * lib/sys_select.in.h: Likewise. * lib/tcgetsid.c: Likewise. * lib/unistd.in.h: Likewise. * lib/unlockpt.c: Likewise. * lib/vasnprintf.c: Likewise. * lib/vma-iter.c: Likewise. * lib/wcsrtombs-state.c: Likewise. * m4/acl.m4: Likewise. * m4/acosl.m4: Likewise. * m4/asinl.m4: Likewise. * m4/atanl.m4: Likewise. * m4/c-stack.m4: Likewise. * m4/cosl.m4: Likewise. * m4/expl.m4: Likewise. * m4/extensions.m4: Likewise. * m4/fdatasync.m4: Likewise. * m4/fmal.m4: Likewise. * m4/frexp.m4: Likewise. * m4/frexpf.m4: Likewise. * m4/frexpl.m4: Likewise. * m4/fsusage.m4: Likewise. * m4/getdomainname.m4: Likewise. * m4/getloadavg.m4: Likewise. * m4/getopt.m4: Likewise. * m4/gettext.m4: Likewise. * m4/gnulib-common.m4: Likewise. * m4/intdiv0.m4: Likewise. * m4/intlmacosx.m4: Likewise. * m4/largefile.m4: Likewise. * m4/ldexpl.m4: Likewise. * m4/link-follow.m4: Likewise. * m4/locale-ar.m4: Likewise. * m4/locale-fr.m4: Likewise. * m4/locale-ja.m4: Likewise. * m4/locale-tr.m4: Likewise. * m4/locale-zh.m4: Likewise. * m4/locale_h.m4: Likewise. * m4/lock.m4: Likewise. * m4/logl.m4: Likewise. * m4/mathfunc.m4: Likewise. * m4/minus-zero.m4: Likewise. * m4/mktime.m4: Likewise. * m4/mmap-anon.m4: Likewise. * m4/multiarch.m4: Likewise. * m4/nanosleep.m4: Likewise. * m4/nocrash.m4: Likewise. * m4/poll.m4: Likewise. * m4/printf-frexpl.m4: Likewise. * m4/printf.m4: Likewise. * m4/signbit.m4: Likewise. * m4/sinl.m4: Likewise. * m4/sqrtl.m4: Likewise. * m4/strerror_r.m4: Likewise. * m4/tanl.m4: Likewise. * m4/threadlib.m4: Likewise. * m4/ttyname_r.m4: Likewise. * m4/unlink.m4: Likewise. * m4/visibility.m4: Likewise. * m4/wcwidth.m4: Likewise. * tests/minus-zero.h: Likewise. * tests/test-alloca-opt.c: Likewise. * tests/test-copy-acl.sh: Likewise. * tests/test-copy-file.sh: Likewise. * tests/test-fdatasync.c: Likewise. * tests/test-file-has-acl.sh: Likewise. * tests/test-flock.c: Likewise. * tests/test-fsync.c: Likewise. * tests/test-localename.c: Likewise. * tests/test-malloca.c: Likewise. * tests/test-nonblocking-pipe.h: Likewise. * tests/test-nonblocking-socket.h: Likewise. * tests/test-openpty.c: Likewise. * tests/test-posix_openpt.c: Likewise. * tests/test-ptsname.c: Likewise. * tests/test-ptsname_r.c: Likewise. * tests/test-sameacls.c: Likewise. * tests/test-select.h: Likewise. * tests/test-set-mode-acl.sh: Likewise. * tests/test-snprintf-posix.h: Likewise. * tests/test-sprintf-posix.h: Likewise. * tests/test-strtod.c: Likewise. * tests/test-time.c: Likewise. * tests/test-vasnprintf-posix.c: Likewise. * tests/test-vasprintf-posix.c: Likewise. * doc/acl-resources.txt: Likewise. * doc/**/*.texi: Likewise. Reported by Max Horn <max@quendi.de>.
* grantpt: Relax requirement regarding invalid file descriptors.Bruno Haible2012-06-221-3/+0
| | | | | | | | | | | * lib/grantpt.c: Don't include <fcntl.h>. (grantpt): Don't verify the validity of the file descriptor. * modules/grantpt (Depends-on): Remove fcntl-h. * tests/test-grantpt.c (main): Allow grantpt to succeed for invalid file descriptors. * doc/posix-functions/grantpt.texi: Document more platforms on which grantpt succeeds for invalid file descriptors. Reported by Rich Felker <dalias@aerifal.cx>.
* Fix misspellings in comments.Paul Eggert2012-06-211-4/+4
|
* nonblocking: Avoid compilation error on mingw64.Bruno Haible2012-06-211-0/+16
| | | | | | | | | | * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MODULE_INDICATOR for scanf, fscanf. * modules/vscanf (configure.ac): Invoke gl_MODULE_INDICATOR. * modules/vfscanf (configure.ac): Likewise. * lib/stdio-read.c (scanf, fscanf, vscanf, vfscanf): Enable function definition only if stdio.h has prepared it. Reported by Daniel P. Berrange <berrange@redhat.com>.
* tmpfile, clean-temp: Fix invocation of GetVersionEx.John Darrington2012-06-202-0/+10
| | | | | | * lib/tmpfile.c (supports_delete_on_close): Initialize parameter for GetVersionEx correctly. * lib/clean-temp.c (supports_delete_on_close): Likewise.
* stat, fstat: Avoid warnings on mingw64.Bruno Haible2012-06-202-0/+3
| | | | | | | * lib/stat.c (stat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Undefine before redefining. * lib/fstat.c (stat, fstat) [_GL_WINDOWS_64_BIT_ST_SIZE]: Likewise. Reported by Daniel P. Berrange <berrange@redhat.com>.
* stdioext: Add support for musl libc.Bruno Haible2012-06-1910-23/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/fbufmode.m4 (gl_FUNC_FBUFMODE): Test whether __fbufsize exists. * lib/fbufmode.c (fbufmode): Add conditional code for musl. * m4/fseterr.m4: New file. * lib/fseterr.h (fseterr): Define as an alias of __fseterr if that function exists. * modules/fseterr (Files): Add m4/fseterr.m4. (configure.ac): Invoke gl_FUNC_FSETERR. Compile fseterr.c if __fseterr does not exist. (Makefile.am): Remove fseterr.c from lib_SOURCES. * lib/freadable.h: Update comment. * lib/fwritable.h: Update comment. * lib/freading.h: Update comment. * lib/fwriting.h: Update comment. * m4/freadahead.m4: New file. * lib/freadahead.h (freadahead): Define as an alias of __freadahead if that function exists. * modules/freadahead (Files): Add m4/freadahead.m4. (configure.ac): Invoke gl_FUNC_FREADAHEAD. Compile freadahead.c if __freadahead does not exist. (Makefile.am): Remove freadahead.c from lib_SOURCES. * m4/freadptr.m4: New file. * lib/freadptr.h (freadptr): Define as an alias of __freadptr if that function exists. * modules/freadptr (Files): Add m4/freadptr.m4. (configure.ac): Invoke gl_FUNC_FREADPTR. Compile freadptr.c if __freadptr does not exist. (Makefile.am): Remove freadptr.c from lib_SOURCES. * m4/freadseek.m4: New file. * lib/freadseek.c (freadptrinc): Use __freadptrinc if that function exists. * modules/freadseek (Files): Add m4/freadseek.m4. (configure.ac): Invoke gl_FUNC_FREADSEEK. * lib/fpurge.c (fpurge): Update comment. Reported by and with help from Rich Felker <dalias@aerifal.cx>.
* regex: avoid warning when pointers are not longPaul Eggert2012-06-171-2/+5
| | | | | | | | | * lib/regcomp.c (parse_dup_op, mark_opt_subexp): Cast between void * and uintptr_t, not long, for portability to hosts where pointers and long have different sizes. Issue noted by Daniel P. Berrange in <http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00122.html> and fix suggested by Bruno Haible in <http://lists.gnu.org/archive/html/bug-gnulib/2012-06/msg00128.html>.