From 073c18e488955d8e490953c2263bda1886147517 Mon Sep 17 00:00:00 2001 From: John Marino Date: Tue, 8 May 2012 12:36:23 +0200 Subject: [PATCH] grep: Upgrade from version 2.9 to 2.12 ===================== Version 2.10 (16 NOV 2011) ===================== It's been nearly five months and 80 commits since 2.9, yet few big changes in grep proper. However, there have been many changes in gnulib, including a few portability fixes that affect grep. We inherited 750+ portability and robustness improvements by using gnulib. [Bug fixes] * grep no longer mishandles high-bit-set pattern bytes on systems where "char" is a signed type. [bug appears to affect only MS-Windows] * grep now rejects a command like "grep -r pattern . > out", in which the output file is also one of the inputs, because it can result in an "infinite" disk-filling loop. [bug present since "the beginning"] [Build-related] "make dist" no longer builds .tar.gz files. xz is portable enough and in wide-enough use that distributing only .tar.xz files is enough. ===================== Version 2.11 (02 MAR 2012) ===================== In just 2.5 months, we've seen more changes than in the five months leading up to 2.10, addressing a surprising number of old bugs. Special thanks to Paulo Bonzini and Paul Eggert for many fine patches. We inherited 340+ portability and robustness improvements by using gnulib. [New features] * If no file operand is given, and a command-line -r or equivalent option is given, grep now searches the working directory. Formerly grep ignored the -r and searched standard input nonrecursively. An -r found in GREP_OPTIONS does not have this new effect. * grep now supports color highlighting of matches on MS-Windows. [Bug fixes] * grep no longer dumps core on lines whose lengths do not fit in 'int'. (e.g., lines longer than 2 GiB on a typical 64-bit host). Instead, grep either works as expected, or reports an error. An error can occur if not enough main memory is available, or if the GNU C library's regular expression functions cannot handle such long lines. [bug present since "the beginning"] * The -m, -A, -B, and -C options no longer mishandle context line counts that do not fit in 'int'. Also, grep -c's counts are now limited by the type 'intmax_t' (typically less than 2**63) rather than 'int' (typically less than 2**31). * grep no longer silently suppresses errors when reading a directory as if it were a text file. For example, "grep x ." now reports a read error on most systems; formerly, it ignored the error. [bug introduced in grep-2.5] * grep now exits with status 2 if a directory loop is found, instead of possibly exiting with status 0 or 1. [bug introduced in grep-2.3] * The -s option now suppresses certain input error diagnostics that it formerly failed to suppress. These include errors when closing the input, when lseeking the input, and when the input is also the output. [bug introduced in grep-2.4] * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report an error instead of looping. [bug present since "the beginning"] * The --include, --exclude, and --exclude-dir options now handle command-line arguments more consistently. --include and --exclude apply only to non-directories and --exclude-dir applies only to directories. "-" (standard input) is never excluded, since it is not a file name. [bug introduced in grep-2.5] * grep no longer rejects "grep -qr . > out", i.e., when run with -q and an input file is the same as the output file, since with -q grep generates no output, so there is no risk of infinite loop or of an output-affecting race condition. Thus, the use of the following options also disables the input-equals-output failure: --max-count=N (-m) (for N >= 2) --files-with-matches (-l) --files-without-match (-L) [bug introduced in grep-2.10] * grep no longer emits an error message and quits on MS-Windows when invoked with the -r option. * grep no longer misinterprets some alternations involving anchors (^, $, \< \> \B, \b). For example, grep -E "(^|\B)a" no longer reports a match for the string "x a". [bug present since "the beginning"] [Changes in behavior] * Use of the --mmap option now elicits a warning. It has been a no-op since March of 2010. * grep no longer diagnoses write errors repeatedly; it exits after diagnosing the first write error. This is better behavior when writing to a dangling pipe. * Syntax errors in GREP_COLORS are now ignored, instead of sometimes eliciting warnings. This is more consistent with programs that (e.g.) ignore errors in termcap entries. ===================== Version 2.12 (23 APR 2012) ===================== There have been 22 commits by 3 people in the 7 weeks since 2.11. In spite of the relatively small number of commits, this is a significant delta, with two regression fixes, Paul's conversion, from grep's crufty old dir-traversal code to the use of gnulib's fts and the change to how -r (--recursive) works. [Bug fixes] * "echo P|grep --devices=skip P" once again prints P, as it did in 2.10 [bug introduced in grep-2.11] * grep no longer segfaults with -r --exclude-dir and no file operand. I.e., ":|grep -r --exclude-dir=D PAT" would segfault. [bug introduced in grep-2.11] * Recursive grep now uses fts for directory traversal, so it can handle much-larger directories without reporting things like "File name too long", and it can run much faster when dealing with large directory hierarchies. [bug present since the beginning] * grep -E 'a{1000000000}' now reports an overflow error rather than silently acting like grep -E 'a\{1000000000}'. [New features] * The -R option now has a long-option alias --dereference-recursive. [Changes in behavior] * The -r (--recursive) option now follows only command-line symlinks. Also, by default -r now reads a device only if it is named on the command line; this can be overridden with --devices. -R acts as before, so use -R if you prefer the old behavior of following all symlinks and defaulting to reading all devices. --- contrib/grep/README.DELETED | 3 + contrib/grep/README.DRAGONFLY | 13 +- gnu/usr.bin/grep/grep/grep.1 | 26 +- gnu/usr.bin/grep/libgreputils/Makefile | 73 +-- gnu/usr.bin/grep/libgreputils/alloca.h | 10 +- gnu/usr.bin/grep/libgreputils/config.h | 520 +++++++++++++++--- gnu/usr.bin/grep/libgreputils/fcntl.h | 647 +++++++++++++++++++++++ gnu/usr.bin/grep/libgreputils/getopt.h | 54 +- gnu/usr.bin/grep/libgreputils/unistr.h | 178 ++++--- gnu/usr.bin/grep/libgreputils/unitypes.h | 26 +- gnu/usr.bin/grep/libgreputils/uniwidth.h | 25 +- 11 files changed, 1331 insertions(+), 244 deletions(-) create mode 100644 gnu/usr.bin/grep/libgreputils/fcntl.h diff --git a/contrib/grep/README.DELETED b/contrib/grep/README.DELETED index 0ee439032c..0f3af17016 100644 --- a/contrib/grep/README.DELETED +++ b/contrib/grep/README.DELETED @@ -2,6 +2,7 @@ ABOUT-NLS AUTHORS ChangeLog +ChangeLog-2009 GNUmakefile INSTALL Makefile.am @@ -61,7 +62,9 @@ lib/stddef.in.h lib/stdint.in.h lib/stdlib.in.h lib/string.in.h +lib/strings.in.h lib/sys_stat.in.h +lib/sys_types.in.h lib/time.in.h lib/unistd.in.h lib/unitypes.in.h diff --git a/contrib/grep/README.DRAGONFLY b/contrib/grep/README.DRAGONFLY index 20944a241a..8380034914 100644 --- a/contrib/grep/README.DRAGONFLY +++ b/contrib/grep/README.DRAGONFLY @@ -1,17 +1,16 @@ -GNU GREP 2.9 -============ +GNU GREP 2.12 +============= Original source can be downloaded from: http://ftp.gnu.org/gnu/grep -file = grep-2.9.tar.gz -date = 21 June 2011 -size = 1790291 -sha1 = 910ccb63f7436349c0bc6ae60f916a8cf938fcb8 +file = grep-2.12.tar.xz +date = 24 April 2012 +size = 1179436 +sha1 = 0853e96b22050cc3ff11a60e5715ca0c9852a715 A list of files and directories removed is in README.DELETED Local modifications applied to following files: src/main.c - doc/grep.texi diff --git a/gnu/usr.bin/grep/grep/grep.1 b/gnu/usr.bin/grep/grep/grep.1 index 2861ff32b6..4f5f390fef 100644 --- a/gnu/usr.bin/grep/grep/grep.1 +++ b/gnu/usr.bin/grep/grep/grep.1 @@ -21,7 +21,7 @@ . \" ISO 8601 date, complete format, extended representation . ds Dt \\*(Yr-\\*(Mn-\\*(Dy .. -.TH GREP 1 \*(Dt "GNU grep 2.9" "User Commands" +.TH GREP 1 \*(Dt "GNU grep 2.12" "User Commands" .hy 0 . .SH NAME @@ -534,10 +534,6 @@ this is equivalent to the option. .SS "Other Options" .TP -.BR \-O ", " \-\^\-only-files -Ignore all special files, except for symlinks. Yet, when recursing -into directories, ignore symlinked directories as well. -.TP .BR \-\^\-line\-buffered Use line buffering on output. This can cause a performance penalty. @@ -680,11 +676,10 @@ and .BR [:xdigit:]. For example, .B [[:alnum:]] -means -.BR [0\-9A\-Za\-z] , -except the latter form depends upon the C locale and the -\s-1ASCII\s0 character encoding, whereas the former is independent -of locale and character set. +means the character class of numbers and +letters in the current locale. In the C locale and \s-1ASCII\s0 +character set encoding, this is the same as +.BR [0\-9A\-Za\-z] . (Note that the brackets in these class names are part of the symbolic names, and must be included in addition to the brackets delimiting the bracket expression.) @@ -722,11 +717,11 @@ at the edge of a word. The symbol .B \ew is a synonym for -.B [[:alnum:]] +.B [_[:alnum:]] and .B \eW is a synonym for -.BR [^[:alnum:]] . +.BR [^_[:alnum:]] . .SS Repetition A regular expression may be followed by one of several repetition operators: .PD 0 @@ -750,11 +745,6 @@ The preceding item is matched .I n or more times. .TP -.BI {, m } -The preceding item is matched at most -.I m -times. -.TP .BI { n , m } The preceding item is matched at least .I n @@ -1183,7 +1173,7 @@ to use logic that tests for this general condition instead of strict equality with\ 2. . .SH COPYRIGHT -Copyright 1998-2000, 2002, 2005-2011 Free Software Foundation, Inc. +Copyright 1998-2000, 2002, 2005-2012 Free Software Foundation, Inc. .PP This is free software; see the source for copying conditions. diff --git a/gnu/usr.bin/grep/libgreputils/Makefile b/gnu/usr.bin/grep/libgreputils/Makefile index df8fd12f9b..46cad5fc70 100644 --- a/gnu/usr.bin/grep/libgreputils/Makefile +++ b/gnu/usr.bin/grep/libgreputils/Makefile @@ -9,60 +9,71 @@ CONTRIBDIR= ${BASEDIR}/lib CFLAGS+= -I${CONTRIBDIR} -I${.CURDIR} -I${.OBJDIR} CFLAGS+= -DHAVE_CONFIG_H -SRCS= c-ctype.c \ +SRCS= argmatch.c \ + c-ctype.c \ c-strcasecmp.c \ c-strncasecmp.c \ + cloexec.c \ + close-stream.c \ + closeout.c \ + cycle-check.c \ + opendir-safer.c \ + dirname-lgpl.c \ + basename-lgpl.c \ + stripslash.c \ + exclude.c \ exitfail.c \ - isdir.c \ + creat-safer.c \ + open-safer.c \ + fd-hook.c \ + filenamecat-lgpl.c \ + hard-locale.c \ + hash.c \ + i-ring.c \ localcharset.c \ malloca.c \ mbchar.c \ mbscasecmp.c \ mbslen.c \ mbsstr.c \ + openat-die.c \ + openat-safer.c \ progname.c \ propername.c \ + quotearg.c \ + save-cwd.c \ striconv.c \ strnlen1.c \ trim.c \ + dup-safer.c \ + fd-safer.c \ + u8-mbtoucr.c \ + u8-uctomb.c \ + u8-uctomb-aux.c \ + pipe-safer.c \ width.c \ version-etc.c \ version-etc-fsf.c \ + xmalloc.c \ xalloc-die.c \ xstriconv.c \ - xstrndup.c \ - xstrtoumax.c \ - savedir.c \ - argmatch.c \ - basename.c \ - basename-lgpl.c \ - close-stream.c \ - closeout.c \ - dirname.c \ - dirname-lgpl.c \ + xstrtoimax.c \ + xstrtol.c \ + xstrtoul.c \ + xstrtol-error.c \ + colorize.c \ + chdir-long.c \ + dup2.c \ error.c \ - exclude.c \ + fcntl.c \ + fts.c \ getopt.c \ getopt1.c \ - hard-locale.c \ - hash.c \ - mempcpy.c \ obstack.c \ - quote.c \ - quotearg.c \ + openat-proc.c \ regex.c \ - stripslash.c \ - wcwidth.c \ - xmalloc.c \ - xstrtol.c \ - xstrtol-error.c \ - xstrtoul.c \ - close-stream.c \ - closeout.c \ - u8-mbtoucr.c \ - u8-uctomb.c \ - u8-uctomb-aux.c \ - xmalloc.c \ - strerror.c + strerror.c \ + strerror-override.c \ + wcwidth.c .include diff --git a/gnu/usr.bin/grep/libgreputils/alloca.h b/gnu/usr.bin/grep/libgreputils/alloca.h index 848693f1ba..1bf70c4257 100644 --- a/gnu/usr.bin/grep/libgreputils/alloca.h +++ b/gnu/usr.bin/grep/libgreputils/alloca.h @@ -1,9 +1,7 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -17,9 +15,9 @@ General Public License for more details. You should have received a copy of the GNU General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + License along with this program; if not, see + . + */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ diff --git a/gnu/usr.bin/grep/libgreputils/config.h b/gnu/usr.bin/grep/libgreputils/config.h index 216c05a54d..4d30795a51 100644 --- a/gnu/usr.bin/grep/libgreputils/config.h +++ b/gnu/usr.bin/grep/libgreputils/config.h @@ -1,6 +1,9 @@ /* config.h. Generated from config.hin by configure. */ /* config.hin. Generated from configure.ac by autoheader. */ +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + /* Define to the function xargmatch calls on failures. */ #define ARGMATCH_DIE usage (EXIT_FAILURE) @@ -25,39 +28,83 @@ /* Define to 1 if the `closedir' function returns void instead of `int'. */ /* #undef CLOSEDIR_VOID */ -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. +/* Define to one of '_getb67', 'GETB67', 'getb67' for Cray-2 and Cray-YMP + systems. This function is required for 'alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ -/* Define to 1 if using `alloca.c'. */ +/* Define to 1 if using 'alloca.c'. */ /* #undef C_ALLOCA */ +/* Define as the bit index in the word where to find bit 0 of the exponent of + 'double'. */ +#define DBL_EXPBIT0_BIT 20 + +/* Define as the word index where to find the exponent of 'double'. */ +#define DBL_EXPBIT0_WORD 1 + +/* the name of the file descriptor member of DIR */ +/* #undef DIR_FD_MEMBER_NAME */ + +#ifdef DIR_FD_MEMBER_NAME +# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) +#else +# define DIR_TO_FD(Dir_p) -1 +#endif + + /* Define to 1 if // is a file system root distinct from /. */ /* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */ +/* Define if struct dirent has a member d_ino that actually works. */ +#define D_INO_IN_DIRENT 1 + /* Define to 1 if translation of program messages to the user's native language is requested. */ /* #undef ENABLE_NLS */ +/* Define this to 1 if F_DUPFD behavior does not match POSIX */ +/* #undef FCNTL_DUPFD_BUGGY */ + /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ #define FUNC_NL_LANGINFO_YESEXPR_WORKS 1 -/* Define to make the limit macros in visible. */ -#define GL_TRIGGER_STDC_LIMIT_MACROS 1 - /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module close-stream shall be considered present. */ #define GNULIB_CLOSE_STREAM 1 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module dirname shall be considered present. */ -#define GNULIB_DIRNAME 1 + whether the gnulib module dirent-safer shall be considered present. */ +#define GNULIB_DIRENT_SAFER 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fcntl-safer shall be considered present. */ +#define GNULIB_FCNTL_SAFER 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fdopendir shall be considered present. */ +#define GNULIB_FDOPENDIR 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fd-safer-flag shall be considered present. */ +#define GNULIB_FD_SAFER_FLAG IN_GREP_GNULIB_TESTS + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module fstatat shall be considered present. */ +#define GNULIB_FSTATAT 1 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module malloc-gnu shall be considered present. */ #define GNULIB_MALLOC_GNU 1 +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module openat shall be considered present. */ +#define GNULIB_OPENAT 1 + +/* Define to a C preprocessor expression that evaluates to 1 or 0, depending + whether the gnulib module openat-safer shall be considered present. */ +#define GNULIB_OPENAT_SAFER 1 + /* enable some gnulib portability checks */ /* #undef GNULIB_PORTCHECK */ @@ -76,24 +123,72 @@ /* Define to 1 when the gnulib module btowc should be tested. */ #define GNULIB_TEST_BTOWC 1 +/* Define to 1 when the gnulib module chdir should be tested. */ +#define GNULIB_TEST_CHDIR 1 + +/* Define to 1 when the gnulib module cloexec should be tested. */ +#define GNULIB_TEST_CLOEXEC 1 + +/* Define to 1 when the gnulib module close should be tested. */ +#define GNULIB_TEST_CLOSE 1 + +/* Define to 1 when the gnulib module closedir should be tested. */ +#define GNULIB_TEST_CLOSEDIR 1 + +/* Define to 1 when the gnulib module dirfd should be tested. */ +#define GNULIB_TEST_DIRFD 1 + +/* Define to 1 when the gnulib module dup should be tested. */ +#define GNULIB_TEST_DUP 1 + /* Define to 1 when the gnulib module dup2 should be tested. */ #define GNULIB_TEST_DUP2 1 /* Define to 1 when the gnulib module environ should be tested. */ #define GNULIB_TEST_ENVIRON 1 +/* Define to 1 when the gnulib module fchdir should be tested. */ +#define GNULIB_TEST_FCHDIR 1 + +/* Define to 1 when the gnulib module fcntl should be tested. */ +#define GNULIB_TEST_FCNTL 1 + +/* Define to 1 when the gnulib module fdopen should be tested. */ +#define GNULIB_TEST_FDOPEN 1 + +/* Define to 1 when the gnulib module fdopendir should be tested. */ +#define GNULIB_TEST_FDOPENDIR 1 + +/* Define to 1 when the gnulib module fstat should be tested. */ +#define GNULIB_TEST_FSTAT 1 + +/* Define to 1 when the gnulib module fstatat should be tested. */ +#define GNULIB_TEST_FSTATAT 1 + /* Define to 1 when the gnulib module getcwd should be tested. */ #define GNULIB_TEST_GETCWD 1 +/* Define to 1 when the gnulib module getdtablesize should be tested. */ +#define GNULIB_TEST_GETDTABLESIZE 1 + /* Define to 1 when the gnulib module getopt-gnu should be tested. */ #define GNULIB_TEST_GETOPT_GNU 1 /* Define to 1 when the gnulib module getpagesize should be tested. */ #define GNULIB_TEST_GETPAGESIZE 1 +/* Define to 1 when the gnulib module isatty should be tested. */ +#define GNULIB_TEST_ISATTY 1 + /* Define to 1 when the gnulib module iswblank should be tested. */ #define GNULIB_TEST_ISWBLANK 1 +/* Define to 1 when the gnulib module iswctype should be tested. */ +#define GNULIB_TEST_ISWCTYPE 1 + +/* Define to 1 when the gnulib module localeconv should be tested. */ +#define GNULIB_TEST_LOCALECONV 1 + /* Define to 1 when the gnulib module lseek should be tested. */ #define GNULIB_TEST_LSEEK 1 @@ -133,15 +228,30 @@ /* Define to 1 when the gnulib module mempcpy should be tested. */ #define GNULIB_TEST_MEMPCPY 1 +/* Define to 1 when the gnulib module memrchr should be tested. */ +#define GNULIB_TEST_MEMRCHR 1 + /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #define GNULIB_TEST_NL_LANGINFO 1 /* Define to 1 when the gnulib module open should be tested. */ #define GNULIB_TEST_OPEN 1 +/* Define to 1 when the gnulib module openat should be tested. */ +#define GNULIB_TEST_OPENAT 1 + +/* Define to 1 when the gnulib module opendir should be tested. */ +#define GNULIB_TEST_OPENDIR 1 + +/* Define to 1 when the gnulib module pipe should be tested. */ +#define GNULIB_TEST_PIPE 1 + /* Define to 1 when the gnulib module putenv should be tested. */ #define GNULIB_TEST_PUTENV 1 +/* Define to 1 when the gnulib module readdir should be tested. */ +#define GNULIB_TEST_READDIR 1 + /* Define to 1 when the gnulib module realloc-posix should be tested. */ #define GNULIB_TEST_REALLOC_POSIX 1 @@ -160,15 +270,18 @@ /* Define to 1 when the gnulib module stpcpy should be tested. */ #define GNULIB_TEST_STPCPY 1 +/* Define to 1 when the gnulib module strdup should be tested. */ +#define GNULIB_TEST_STRDUP 1 + /* Define to 1 when the gnulib module strerror should be tested. */ #define GNULIB_TEST_STRERROR 1 -/* Define to 1 when the gnulib module strndup should be tested. */ -#define GNULIB_TEST_STRNDUP 1 - /* Define to 1 when the gnulib module strnlen should be tested. */ #define GNULIB_TEST_STRNLEN 1 +/* Define to 1 when the gnulib module strtoll should be tested. */ +#define GNULIB_TEST_STRTOLL 1 + /* Define to 1 when the gnulib module strtoull should be tested. */ #define GNULIB_TEST_STRTOULL 1 @@ -181,6 +294,9 @@ /* Define to 1 when the gnulib module wcrtomb should be tested. */ #define GNULIB_TEST_WCRTOMB 1 +/* Define to 1 when the gnulib module wcscoll should be tested. */ +#define GNULIB_TEST_WCSCOLL 1 + /* Define to 1 when the gnulib module wctob should be tested. */ #define GNULIB_TEST_WCTOB 1 @@ -212,7 +328,7 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_BP_SYM_H */ -/* Define to 1 if you have the `btowc' function. */ +/* Define to 1 if you have the 'btowc' function. */ #define HAVE_BTOWC 1 /* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the @@ -223,6 +339,9 @@ the CoreFoundation framework. */ /* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ +/* Define to 1 if you have the `closedir' function. */ +#define HAVE_CLOSEDIR 1 + /* Define if the GNU dcgettext() function is already present or preinstalled. */ /* #undef HAVE_DCGETTEXT */ @@ -231,6 +350,18 @@ you don't. */ #define HAVE_DECL_CLEARERR_UNLOCKED 1 +/* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. + */ +#define HAVE_DECL_DIRFD 1 + +/* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't. + */ +#define HAVE_DECL_FCHDIR 1 + +/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you + don't. */ +#define HAVE_DECL_FDOPENDIR 1 + /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you don't. */ #define HAVE_DECL_FEOF_UNLOCKED 1 @@ -281,7 +412,27 @@ /* Define to 1 if you have the declaration of `iswblank', and to 0 if you don't. */ -#define HAVE_DECL_ISWBLANK 0 +#define HAVE_DECL_ISWBLANK 1 + +/* Define to 1 if you have the declaration of `mbrlen', and to 0 if you don't. + */ +/* #undef HAVE_DECL_MBRLEN */ + +/* Define to 1 if you have the declaration of `mbrtowc', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBRTOWC */ + +/* Define to 1 if you have the declaration of `mbsinit', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBSINIT */ + +/* Define to 1 if you have the declaration of `mbsrtowcs', and to 0 if you + don't. */ +/* #undef HAVE_DECL_MBSRTOWCS */ + +/* Define to 1 if you have the declaration of `memrchr', and to 0 if you + don't. */ +#define HAVE_DECL_MEMRCHR 1 /* Define to 1 if you have the declaration of `program_invocation_name', and to 0 if you don't. */ @@ -307,18 +458,30 @@ don't. */ #define HAVE_DECL_SNPRINTF 1 +/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't. + */ +#define HAVE_DECL_STRDUP 1 + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #define HAVE_DECL_STRERROR_R 1 -/* Define to 1 if you have the declaration of `strndup', and to 0 if you +/* Define to 1 if you have the declaration of `strncasecmp', and to 0 if you don't. */ -#define HAVE_DECL_STRNDUP 1 +#define HAVE_DECL_STRNCASECMP 1 /* Define to 1 if you have the declaration of `strnlen', and to 0 if you don't. */ #define HAVE_DECL_STRNLEN 1 +/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you + don't. */ +#define HAVE_DECL_STRTOIMAX 1 + +/* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ +/* #undef HAVE_DECL_STRTOLL */ + /* Define to 1 if you have the declaration of `strtoull', and to 0 if you don't. */ /* #undef HAVE_DECL_STRTOULL */ @@ -327,10 +490,18 @@ don't. */ #define HAVE_DECL_STRTOUMAX 1 +/* Define to 1 if you have the declaration of `towlower', and to 0 if you + don't. */ +/* #undef HAVE_DECL_TOWLOWER */ + /* Define to 1 if you have the declaration of `unsetenv', and to 0 if you don't. */ #define HAVE_DECL_UNSETENV 1 +/* Define to 1 if you have the declaration of `wcrtomb', and to 0 if you + don't. */ +/* #undef HAVE_DECL_WCRTOMB */ + /* Define to 1 if you have the declaration of `wctob', and to 0 if you don't. */ #define HAVE_DECL_WCTOB 1 @@ -351,18 +522,36 @@ */ #define HAVE_DIRENT_H 1 -/* Define to 1 if you have the `dup2' function. */ +/* Define to 1 if you have the `dirfd' function. */ +/* #undef HAVE_DIRFD */ + +/* Define to 1 if you have the 'dup2' function. */ #define HAVE_DUP2 1 /* Define if you have the declaration of environ. */ /* #undef HAVE_ENVIRON_DECL */ -/* Define to 1 if you have the `fcntl' function. */ +/* Define to 1 if you have the 'fchdir' function. */ +#define HAVE_FCHDIR 1 + +/* Define to 1 if you have the 'fcntl' function. */ #define HAVE_FCNTL 1 +/* Define to 1 if you have the 'fdopendir' function. */ +#define HAVE_FDOPENDIR 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_FEATURES_H */ +/* Define to 1 if you have the 'fstatat' function. */ +#define HAVE_FSTATAT 1 + +/* Define to 1 if you have the 'fstatfs' function. */ +#define HAVE_FSTATFS 1 + +/* Define to 1 if you have the 'getdtablesize' function. */ +#define HAVE_GETDTABLESIZE 1 + /* Define to 1 if you have the header file. */ #define HAVE_GETOPT_H 1 @@ -396,19 +585,19 @@ declares uintmax_t. */ #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -/* Define to 1 if you have the `isascii' function. */ +/* Define to 1 if you have the 'isascii' function. */ #define HAVE_ISASCII 1 -/* Define to 1 if you have the `isblank' function. */ +/* Define to 1 if you have the 'isblank' function. */ #define HAVE_ISBLANK 1 -/* Define to 1 if you have the `iswblank' function. */ +/* Define to 1 if you have the 'iswblank' function. */ #define HAVE_ISWBLANK 1 -/* Define to 1 if you have the `iswcntrl' function. */ +/* Define to 1 if you have the 'iswcntrl' function. */ #define HAVE_ISWCNTRL 1 -/* Define to 1 if you have the `iswctype' function. */ +/* Define to 1 if you have the 'iswctype' function. */ #define HAVE_ISWCTYPE 1 /* Define if you have and nl_langinfo(CODESET). */ @@ -426,10 +615,10 @@ /* Define to 1 if you have the `pcre' library (-lpcre). */ #define HAVE_LIBPCRE 0 -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #define HAVE_LONG_LONG_INT 1 -/* Define to 1 if you have the `lstat' function. */ +/* Define to 1 if you have the 'lstat' function. */ #define HAVE_LSTAT 1 /* Define to 1 if your system has a GNU libc compatible 'malloc' function, and @@ -441,21 +630,21 @@ /* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including config.h and . */ -/* #undef HAVE_MAP_ANONYMOUS */ +#define HAVE_MAP_ANONYMOUS 1 -/* Define to 1 if you have the `mbrlen' function. */ +/* Define to 1 if you have the 'mbrlen' function. */ #define HAVE_MBRLEN 1 /* Define to 1 if you have the `mbrtowc' function. */ #define HAVE_MBRTOWC 1 -/* Define to 1 if you have the `mbsinit' function. */ +/* Define to 1 if you have the 'mbsinit' function. */ #define HAVE_MBSINIT 1 -/* Define to 1 if you have the `mbslen' function. */ +/* Define to 1 if you have the 'mbslen' function. */ /* #undef HAVE_MBSLEN */ -/* Define to 1 if you have the `mbsrtowcs' function. */ +/* Define to 1 if you have the 'mbsrtowcs' function. */ #define HAVE_MBSRTOWCS 1 /* Define to 1 if declares mbstate_t. */ @@ -465,7 +654,10 @@ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `mempcpy' function. */ -/* #undef HAVE_MEMPCPY */ +#define HAVE_MEMPCPY 1 + +/* Define to 1 if you have the `memrchr' function. */ +#define HAVE_MEMRCHR 1 /* Define to 1 if defines the MIN and MAX macros. */ /* #undef HAVE_MINMAX_IN_LIMITS_H */ @@ -473,21 +665,31 @@ /* Define to 1 if defines the MIN and MAX macros. */ #define HAVE_MINMAX_IN_SYS_PARAM_H 1 -/* Define to 1 if you have the `mprotect' function. */ +/* Define to 1 if you have the 'mprotect' function. */ #define HAVE_MPROTECT 1 +/* Define to 1 on MSVC platforms that have the "invalid parameter handler" + concept. */ +/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */ + /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ -/* Define to 1 if you have the `newlocale' function. */ +/* Define to 1 if you have the 'newlocale' function. */ /* #undef HAVE_NEWLOCALE */ -/* Define to 1 if you have the `nl_langinfo' function. */ +/* Define to 1 if you have the 'nl_langinfo' function. */ #define HAVE_NL_LANGINFO 1 /* Define to 1 if libc includes obstacks. */ /* #undef HAVE_OBSTACK */ +/* Define to 1 if you have the 'openat' function. */ +#define HAVE_OPENAT 1 + +/* Define to 1 if you have the `opendir' function. */ +#define HAVE_OPENDIR 1 + /* Define to 1 if you have the header file. */ /* #undef HAVE_OS_H */ @@ -500,8 +702,8 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_PCRE_PCRE_H */ -/* Define to 1 if you have the `pthread_atfork' function. */ -#define HAVE_PTHREAD_ATFORK 1 +/* Define to 1 if you have the 'pipe' function. */ +#define HAVE_PIPE 1 /* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 @@ -522,15 +724,24 @@ macros. */ /* #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME */ +/* Define to 1 if chdir is declared even after undefining macros. */ +#define HAVE_RAW_DECL_CHDIR 1 + /* Define to 1 if chown is declared even after undefining macros. */ #define HAVE_RAW_DECL_CHOWN 1 +/* Define to 1 if closedir is declared even after undefining macros. */ +#define HAVE_RAW_DECL_CLOSEDIR 1 + /* Define to 1 if dirfd is declared even after undefining macros. */ /* #undef HAVE_RAW_DECL_DIRFD */ /* Define to 1 if dprintf is declared even after undefining macros. */ #define HAVE_RAW_DECL_DPRINTF 1 +/* Define to 1 if dup is declared even after undefining macros. */ +#define HAVE_RAW_DECL_DUP 1 + /* Define to 1 if dup2 is declared even after undefining macros. */ #define HAVE_RAW_DECL_DUP2 1 @@ -564,15 +775,30 @@ /* Define to 1 if fcntl is declared even after undefining macros. */ #define HAVE_RAW_DECL_FCNTL 1 +/* Define to 1 if fdatasync is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_FDATASYNC */ + /* Define to 1 if fdopendir is declared even after undefining macros. */ #define HAVE_RAW_DECL_FDOPENDIR 1 +/* Define to 1 if ffs is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FFS 1 + +/* Define to 1 if ffsl is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FFSL 1 + +/* Define to 1 if ffsll is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FFSLL 1 + /* Define to 1 if fpurge is declared even after undefining macros. */ #define HAVE_RAW_DECL_FPURGE 1 /* Define to 1 if fseeko is declared even after undefining macros. */ #define HAVE_RAW_DECL_FSEEKO 1 +/* Define to 1 if fstat is declared even after undefining macros. */ +#define HAVE_RAW_DECL_FSTAT 1 + /* Define to 1 if fstatat is declared even after undefining macros. */ #define HAVE_RAW_DECL_FSTATAT 1 @@ -621,6 +847,9 @@ /* Define to 1 if getpagesize is declared even after undefining macros. */ #define HAVE_RAW_DECL_GETPAGESIZE 1 +/* Define to 1 if gets is declared even after undefining macros. */ +#define HAVE_RAW_DECL_GETS 1 + /* Define to 1 if getsubopt is declared even after undefining macros. */ #define HAVE_RAW_DECL_GETSUBOPT 1 @@ -639,8 +868,14 @@ /* Define to 1 if imaxdiv is declared even after undefining macros. */ #define HAVE_RAW_DECL_IMAXDIV 1 -/* Define to 1 if initstat_r is declared even after undefining macros. */ -/* #undef HAVE_RAW_DECL_INITSTAT_R */ +/* Define to 1 if initstate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_INITSTATE 1 + +/* Define to 1 if initstate_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_INITSTATE_R */ + +/* Define to 1 if isatty is declared even after undefining macros. */ +#define HAVE_RAW_DECL_ISATTY 1 /* Define to 1 if isblank is declared even after undefining macros. */ #define HAVE_RAW_DECL_ISBLANK 1 @@ -685,7 +920,7 @@ #define HAVE_RAW_DECL_MEMMEM 1 /* Define to 1 if mempcpy is declared even after undefining macros. */ -/* #undef HAVE_RAW_DECL_MEMPCPY */ +#define HAVE_RAW_DECL_MEMPCPY 1 /* Define to 1 if memrchr is declared even after undefining macros. */ #define HAVE_RAW_DECL_MEMRCHR 1 @@ -726,6 +961,12 @@ /* Define to 1 if openat is declared even after undefining macros. */ #define HAVE_RAW_DECL_OPENAT 1 +/* Define to 1 if opendir is declared even after undefining macros. */ +#define HAVE_RAW_DECL_OPENDIR 1 + +/* Define to 1 if pclose is declared even after undefining macros. */ +#define HAVE_RAW_DECL_PCLOSE 1 + /* Define to 1 if pipe is declared even after undefining macros. */ #define HAVE_RAW_DECL_PIPE 1 @@ -735,21 +976,33 @@ /* Define to 1 if popen is declared even after undefining macros. */ #define HAVE_RAW_DECL_POPEN 1 +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +#define HAVE_RAW_DECL_POSIX_OPENPT 1 + /* Define to 1 if pread is declared even after undefining macros. */ #define HAVE_RAW_DECL_PREAD 1 /* Define to 1 if ptsname is declared even after undefining macros. */ #define HAVE_RAW_DECL_PTSNAME 1 +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +/* #undef HAVE_RAW_DECL_PTSNAME_R */ + /* Define to 1 if pwrite is declared even after undefining macros. */ #define HAVE_RAW_DECL_PWRITE 1 +/* Define to 1 if random is declared even after undefining macros. */ +#define HAVE_RAW_DECL_RANDOM 1 + /* Define to 1 if random_r is declared even after undefining macros. */ /* #undef HAVE_RAW_DECL_RANDOM_R */ /* Define to 1 if rawmemchr is declared even after undefining macros. */ /* #undef HAVE_RAW_DECL_RAWMEMCHR */ +/* Define to 1 if readdir is declared even after undefining macros. */ +#define HAVE_RAW_DECL_READDIR 1 + /* Define to 1 if readlink is declared even after undefining macros. */ #define HAVE_RAW_DECL_READLINK 1 @@ -762,6 +1015,9 @@ /* Define to 1 if renameat is declared even after undefining macros. */ #define HAVE_RAW_DECL_RENAMEAT 1 +/* Define to 1 if rewinddir is declared even after undefining macros. */ +#define HAVE_RAW_DECL_REWINDDIR 1 + /* Define to 1 if rmdir is declared even after undefining macros. */ #define HAVE_RAW_DECL_RMDIR 1 @@ -774,9 +1030,15 @@ /* Define to 1 if setenv is declared even after undefining macros. */ #define HAVE_RAW_DECL_SETENV 1 +/* Define to 1 if sethostname is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SETHOSTNAME 1 + /* Define to 1 if setlocale is declared even after undefining macros. */ #define HAVE_RAW_DECL_SETLOCALE 1 +/* Define to 1 if setstate is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SETSTATE 1 + /* Define to 1 if setstate_r is declared even after undefining macros. */ /* #undef HAVE_RAW_DECL_SETSTATE_R */ @@ -789,6 +1051,9 @@ /* Define to 1 if snprintf is declared even after undefining macros. */ #define HAVE_RAW_DECL_SNPRINTF 1 +/* Define to 1 if srandom is declared even after undefining macros. */ +#define HAVE_RAW_DECL_SRANDOM 1 + /* Define to 1 if srandom_r is declared even after undefining macros. */ /* #undef HAVE_RAW_DECL_SRANDOM_R */ @@ -799,7 +1064,10 @@ #define HAVE_RAW_DECL_STPCPY 1 /* Define to 1 if stpncpy is declared even after undefining macros. */ -/* #undef HAVE_RAW_DECL_STPNCPY */ +#define HAVE_RAW_DECL_STPNCPY 1 + +/* Define to 1 if strcasecmp is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRCASECMP 1 /* Define to 1 if strcasestr is declared even after undefining macros. */ #define HAVE_RAW_DECL_STRCASESTR 1 @@ -813,6 +1081,9 @@ /* Define to 1 if strerror_r is declared even after undefining macros. */ #define HAVE_RAW_DECL_STRERROR_R 1 +/* Define to 1 if strncasecmp is declared even after undefining macros. */ +#define HAVE_RAW_DECL_STRNCASECMP 1 + /* Define to 1 if strncat is declared even after undefining macros. */ #define HAVE_RAW_DECL_STRNCAT 1 @@ -901,7 +1172,7 @@ #define HAVE_RAW_DECL_WCRTOMB 1 /* Define to 1 if wcscasecmp is declared even after undefining macros. */ -/* #undef HAVE_RAW_DECL_WCSCASECMP */ +#define HAVE_RAW_DECL_WCSCASECMP 1 /* Define to 1 if wcscat is declared even after undefining macros. */ #define HAVE_RAW_DECL_WCSCAT 1 @@ -928,7 +1199,7 @@ #define HAVE_RAW_DECL_WCSLEN 1 /* Define to 1 if wcsncasecmp is declared even after undefining macros. */ -/* #undef HAVE_RAW_DECL_WCSNCASECMP */ +#define HAVE_RAW_DECL_WCSNCASECMP 1 /* Define to 1 if wcsncat is declared even after undefining macros. */ #define HAVE_RAW_DECL_WCSNCAT 1 @@ -999,6 +1270,9 @@ /* Define to 1 if _Exit is declared even after undefining macros. */ #define HAVE_RAW_DECL__EXIT 1 +/* Define to 1 if you have the `readdir' function. */ +#define HAVE_READDIR 1 + /* Define to 1 if your system has a GNU libc compatible 'realloc' function, and to 0 otherwise. */ #define HAVE_REALLOC_GNU 1 @@ -1009,10 +1283,10 @@ /* Define to 1 if you have the header file. */ #define HAVE_SEARCH_H 1 -/* Define to 1 if you have the `setenv' function. */ +/* Define to 1 if you have the 'setenv' function. */ #define HAVE_SETENV 1 -/* Define to 1 if you have the `setlocale' function. */ +/* Define to 1 if you have the 'setlocale' function. */ #define HAVE_SETLOCALE 1 /* Define to 1 if 'sig_atomic_t' is a signed integer type. */ @@ -1048,7 +1322,13 @@ /* Define to 1 if you have the `stpcpy' function. */ #define HAVE_STPCPY 1 -/* Define to 1 if you have the `strerror_r' function. */ +/* Define to 1 if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define to 1 if you have the 'strdup' function. */ +#define HAVE_STRDUP 1 + +/* Define to 1 if you have the 'strerror_r' function. */ #define HAVE_STRERROR_R 1 /* Define to 1 if you have the header file. */ @@ -1057,19 +1337,35 @@ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the `strndup' function. */ -#define HAVE_STRNDUP 1 +/* Define to 1 if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strnlen' function. */ #define HAVE_STRNLEN 1 +/* Define to 1 if you have the 'strtoimax' function. */ +#define HAVE_STRTOIMAX 1 + +/* Define to 1 if you have the `strtoll' function. */ +#define HAVE_STRTOLL 1 + /* Define to 1 if you have the `strtoull' function. */ #define HAVE_STRTOULL 1 -/* Define to 1 if you have the `strtoumax' function. */ -/* #undef HAVE_STRTOUMAX */ +/* Define to 1 if you have the 'strtoumax' function. */ +#define HAVE_STRTOUMAX 1 + +/* Define if there is a member named d_type in the struct describing directory + headers. */ +#define HAVE_STRUCT_DIRENT_D_TYPE 1 + +/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ +/* #undef HAVE_STRUCT_LCONV_DECIMAL_POINT */ -/* Define to 1 if you have the `symlink' function. */ +/* Define to 1 if `f_type' is a member of `struct statfs'. */ +/* #undef HAVE_STRUCT_STATFS_F_TYPE */ + +/* Define to 1 if you have the 'symlink' function. */ #define HAVE_SYMLINK 1 /* Define to 1 if you have the header file. */ @@ -1090,7 +1386,7 @@ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the header file. */ -/* #undef HAVE_SYS_PARAM_H */ +#define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 @@ -1104,6 +1400,12 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_VFS_H */ + +/* Define to 1 if you have the `towlower' function. */ +#define HAVE_TOWLOWER 1 + /* Define to 1 if you have the `tsearch' function. */ #define HAVE_TSEARCH 1 @@ -1113,13 +1415,13 @@ /* Define to 1 if you have the `unsetenv' function. */ #define HAVE_UNSETENV 1 -/* Define to 1 if the system has the type `unsigned long long int'. */ +/* Define to 1 if the system has the type 'unsigned long long int'. */ #define HAVE_UNSIGNED_LONG_LONG_INT 1 /* Define to 1 if you have the `uselocale' function. */ /* #undef HAVE_USELOCALE */ -/* Define to 1 if you have the `vasnprintf' function. */ +/* Define to 1 if you have the 'vasnprintf' function. */ /* #undef HAVE_VASNPRINTF */ /* Define to 1 if you have the header file. */ @@ -1131,7 +1433,7 @@ /* Define to 1 if you have the `wcrtomb' function. */ #define HAVE_WCRTOMB 1 -/* Define to 1 if you have the `wcscoll' function. */ +/* Define to 1 if you have the 'wcscoll' function. */ #define HAVE_WCSCOLL 1 /* Define to 1 if you have the `wcslen' function. */ @@ -1140,13 +1442,13 @@ /* Define to 1 if you have the `wcsnlen' function. */ #define HAVE_WCSNLEN 1 -/* Define to 1 if you have the `wctob' function. */ +/* Define to 1 if you have the 'wctob' function. */ #define HAVE_WCTOB 1 /* Define to 1 if you have the header file. */ #define HAVE_WCTYPE_H 1 -/* Define to 1 if you have the `wcwidth' function. */ +/* Define to 1 if you have the 'wcwidth' function. */ #define HAVE_WCWIDTH 1 /* Define to 1 if you have the header file. */ @@ -1155,15 +1457,19 @@ /* Define if you have the 'wint_t' type. */ #define HAVE_WINT_T 1 -/* Define to 1 if you have the `wmemchr' function. */ +/* Define to 1 if you have the 'wmemchr' function. */ #define HAVE_WMEMCHR 1 -/* Define to 1 if you have the `wmemcpy' function. */ +/* Define to 1 if you have the 'wmemcpy' function. */ #define HAVE_WMEMCPY 1 -/* Define to 1 if you have the `wmempcpy' function. */ +/* Define to 1 if you have the 'wmempcpy' function. */ /* #undef HAVE_WMEMPCPY */ +/* Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX + 7.1. */ +/* #undef HAVE_WORKING_FSTATAT_ZERO_FLAG */ + /* Define to 1 if O_NOATIME works. */ #define HAVE_WORKING_O_NOATIME 0 @@ -1176,10 +1482,13 @@ /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 -/* Define to 1 if you have the `__fpending' function. */ +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */ + +/* Define to 1 if you have the '__fpending' function. */ #define HAVE___FPENDING 1 -/* Define to 1 if you have the `__xpg_strerror_r' function. */ +/* Define to 1 if you have the '__xpg_strerror_r' function. */ /* #undef HAVE___XPG_STRERROR_R */ /* Define as const if the declaration of iconv() needs const. */ @@ -1192,7 +1501,7 @@ /* Define to 1 if lseek does not detect pipes. */ /* #undef LSEEK_PIPE_BROKEN */ -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 @@ -1200,7 +1509,7 @@ #define MALLOC_0_IS_NONNULL 1 /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -/* #undef MAP_ANONYMOUS */ +#define MAP_ANONYMOUS MAP_ANON /* Define if the mbrtowc function has the NULL pwc argument bug. */ /* #undef MBRTOWC_NULL_ARG1_BUG */ @@ -1224,7 +1533,7 @@ #define PACKAGE "grep" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "http://bugs.dragonflybsd.org" +#define PACKAGE_BUGREPORT "bug-grep@gnu.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "GNU grep" @@ -1239,7 +1548,7 @@ /* #undef PACKAGE_PACKAGER_VERSION */ /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "GNU grep 2.9" +#define PACKAGE_STRING "GNU grep 2.12" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "grep" @@ -1248,9 +1557,9 @@ #define PACKAGE_URL "http://www.gnu.org/software/grep/" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.9" +#define PACKAGE_VERSION "2.12" -/* the number of pending output bytes on stream `fp' */ +/* the number of pending output bytes on stream 'fp' */ /* #undef PENDING_OUTPUT_N_BYTES */ /* Define if exists and defines unusable PRI* macros. */ @@ -1267,6 +1576,9 @@ 'ptrdiff_t'. */ /* #undef PTRDIFF_T_SUFFIX */ +/* Define to 1 if gnulib's fchdir() replacement is used. */ +/* #undef REPLACE_FCHDIR */ + /* Define to 1 if stat needs help when passed a directory name with a trailing slash */ /* #undef REPLACE_FUNC_STAT_DIR */ @@ -1278,6 +1590,13 @@ /* Define if nl_langinfo exists but is overridden by gnulib. */ /* #undef REPLACE_NL_LANGINFO */ +/* Define to 1 if open() should work around the inability to open a directory. + */ +/* #undef REPLACE_OPEN_DIRECTORY */ + +/* Define to 1 if strerror(0) does not return a message implying success. */ +#define REPLACE_STRERROR_0 1 + /* Define if vasnprintf exists but is overridden by gnulib. */ /* #undef REPLACE_VASNPRINTF */ @@ -1298,9 +1617,9 @@ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if the `S_IS*' macros in do not work properly. */ @@ -1338,11 +1657,11 @@ safe for multithreaded apps. */ #define USE_UNLOCKED_IO 1 -/* Define if the Win32 multithreading API can be used. */ -/* #undef USE_WIN32_THREADS */ +/* Define if the native Windows multithreading API can be used. */ +/* #undef USE_WINDOWS_THREADS */ /* Version number of package */ -#define VERSION "2.9" +#define VERSION "2.12" /* Define to 1 if unsetenv returns void instead of int. */ /* #undef VOID_UNSETENV */ @@ -1355,25 +1674,66 @@ 'wint_t'. */ /* #undef WINT_T_SUFFIX */ +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Enable large inode numbers on Mac OS X. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* enable compile-time and run-time bounds-checking, and some warnings */ /* #undef _FORTIFY_SOURCE */ +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +/* #undef _GL_WINDOWS_64_BIT_ST_SIZE */ + /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ +/* Define to 1 on Solaris. */ +/* #undef _LCONV_C99 */ + /* Define to 1 if on MINIX. */ /* #undef _MINIX */ +/* The _Noreturn keyword of C11. */ +#ifndef _Noreturn +# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ + || 0x5110 <= __SUNPRO_C) +# define _Noreturn __attribute__ ((__noreturn__)) +# elif defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn +# endif +#endif + + /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ -/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* Define to 1 if you need to in order for 'stat' and other things to work. */ /* #undef _POSIX_SOURCE */ +/* Define if you want to include , so that it consistently + overrides 's RE_DUP_MAX. */ +#define _REGEX_INCLUDE_LIMITS_H 1 + /* Define if you want regoff_t to be at least as wide POSIX requires. */ #define _REGEX_LARGE_OFFSETS 1 @@ -1384,6 +1744,10 @@ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif +/* Enable general extensions on MacOS X. */ +#ifndef _DARWIN_C_SOURCE +# define _DARWIN_C_SOURCE 1 +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 @@ -1406,13 +1770,6 @@ used. */ #define __GETOPT_PREFIX rpl_ -/* Ensure that defines the limit macros, since gnulib's - relies on them. */ -#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -#endif - - /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ @@ -1456,6 +1813,9 @@ /* Define to `long int' if does not define. */ /* #undef off_t */ +/* Define to `int' if does not define. */ +/* #undef pid_t */ + /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ /* #undef ptrdiff_t */ diff --git a/gnu/usr.bin/grep/libgreputils/fcntl.h b/gnu/usr.bin/grep/libgreputils/fcntl.h new file mode 100644 index 0000000000..84b5996bd0 --- /dev/null +++ b/gnu/usr.bin/grep/libgreputils/fcntl.h @@ -0,0 +1,647 @@ +/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ +/* Like , but with non-working flags defined to 0. + + Copyright (C) 2006-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* written by Paul Eggert */ + +#if __GNUC__ >= 3 +#pragma GCC system_header +#endif + + +#if defined __need_system_fcntl_h +/* Special invocation convention. */ + +/* Needed before . + May also define off_t to a 64-bit type on native Windows. */ +#include +/* On some systems other than glibc, is a prerequisite of + . On glibc systems, we would like to avoid namespace pollution. + But on glibc systems, includes inside an + extern "C" { ... } block, which leads to errors in C++ mode with the + overridden from gnulib. These errors are known to be gone + with g++ version >= 4.3. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) +# include +#endif +#include_next + +#else +/* Normal invocation convention. */ + +#ifndef _GL_FCNTL_H + +/* Needed before . + May also define off_t to a 64-bit type on native Windows. */ +#include +/* On some systems other than glibc, is a prerequisite of + . On glibc systems, we would like to avoid namespace pollution. + But on glibc systems, includes inside an + extern "C" { ... } block, which leads to errors in C++ mode with the + overridden from gnulib. These errors are known to be gone + with g++ version >= 4.3. */ +#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) +# include +#endif +/* The include_next requires a split double-inclusion guard. */ +#include_next + +#ifndef _GL_FCNTL_H +#define _GL_FCNTL_H + +#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ +# include +#endif + +/* Native Windows platforms declare open(), creat() in . */ +#if (1 || defined GNULIB_POSIXCHECK) \ + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +# include +#endif + + +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +#ifndef _GL_CXXDEFS_H +#define _GL_CXXDEFS_H + +/* The three most frequent use cases of these macros are: + + * For providing a substitute for a function that is missing on some + platforms, but is declared and works fine on the platforms on which + it exists: + + #if @GNULIB_FOO@ + # if !@HAVE_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on all platforms, + but is broken/insufficient and needs to be replaced on some platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif + + * For providing a replacement for a function that exists on some platforms + but is broken/insufficient and needs to be replaced on some of them and + is additionally either missing or undeclared on some other platforms: + + #if @GNULIB_FOO@ + # if @REPLACE_FOO@ + # if !(defined __cplusplus && defined GNULIB_NAMESPACE) + # undef foo + # define foo rpl_foo + # endif + _GL_FUNCDECL_RPL (foo, ...); + _GL_CXXALIAS_RPL (foo, ...); + # else + # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ + _GL_FUNCDECL_SYS (foo, ...); + # endif + _GL_CXXALIAS_SYS (foo, ...); + # endif + _GL_CXXALIASWARN (foo); + #elif defined GNULIB_POSIXCHECK + ... + #endif +*/ + +/* _GL_EXTERN_C declaration; + performs the declaration with C linkage. */ +#if defined __cplusplus +# define _GL_EXTERN_C extern "C" +#else +# define _GL_EXTERN_C extern +#endif + +/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); + declares a replacement function, named rpl_func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ + _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) +#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype rpl_func parameters_and_attributes + +/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. + Example: + _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); + */ +#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C rettype func parameters_and_attributes + +/* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to rpl_func, if GNULIB_NAMESPACE is defined. + Example: + _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); + */ +#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ + _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = ::rpl_func; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); + is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); + except that the C function rpl_func may have a slightly different + declaration. A cast is used to silence the "invalid conversion" error + that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + rettype (*const func) parameters = \ + reinterpret_cast(::rpl_func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func + that redirects to the system provided function func, if GNULIB_NAMESPACE + is defined. + Example: + _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); + */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* If we were to write + rettype (*const func) parameters = ::func; + like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls + better (remove an indirection through a 'static' pointer variable), + but then the _GL_CXXALIASWARN macro below would cause a warning not only + for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = ::func; \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function func may have a slightly different declaration. + A cast is used to silence the "invalid conversion" error that would + otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = \ + reinterpret_cast(::func); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); + is like _GL_CXXALIAS_SYS (func, rettype, parameters); + except that the C function is picked among a set of overloaded functions, + namely the one with rettype2 and parameters2. Two consecutive casts + are used to silence the "cannot find a match" and "invalid conversion" + errors that would otherwise occur. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE + /* The outer cast must be a reinterpret_cast. + The inner cast: When the function is defined as a set of overloaded + functions, it works as a static_cast<>, choosing the designated variant. + When the function is defined as a single variant, it works as a + reinterpret_cast<>. The parenthesized cast syntax works both ways. */ +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + namespace GNULIB_NAMESPACE \ + { \ + static rettype (*func) parameters = \ + reinterpret_cast( \ + (rettype2(*)parameters2)(::func)); \ + } \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#else +# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN (func); + causes a warning to be emitted when ::func is used but not when + GNULIB_NAMESPACE::func is used. func must be defined without overloaded + variants. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN(func) \ + _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN_1(func,namespace) \ + _GL_CXXALIASWARN_2 (func, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_WARN_ON_USE (func, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN_2(func,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN_2(func,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN(func) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); + causes a warning to be emitted when the given overloaded variant of ::func + is used but not when GNULIB_NAMESPACE::func is used. */ +#if defined __cplusplus && defined GNULIB_NAMESPACE +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ + GNULIB_NAMESPACE) +# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ + _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) +/* To work around GCC bug , + we enable the warning only when not optimizing. */ +# if !__OPTIMIZE__ +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ + "The symbol ::" #func " refers to the system function. " \ + "Use " #namespace "::" #func " instead.") +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + extern __typeof__ (func) func +# else +# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +# endif +#else +# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ + _GL_EXTERN_C int _gl_cxxalias_dummy +#endif + +#endif /* _GL_CXXDEFS_H */ + +/* The definition of _GL_ARG_NONNULL is copied here. */ +/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools + that the values passed as arguments n, ..., m must be non-NULL pointers. + n = 1 stands for the first argument, n = 2 for the second argument etc. */ +#ifndef _GL_ARG_NONNULL +# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 +# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) +# else +# define _GL_ARG_NONNULL(params) +# endif +#endif + +/* The definition of _GL_WARN_ON_USE is copied here. */ +#ifndef _GL_WARN_ON_USE + +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +/* A compiler attribute is available in gcc versions 4.3.0 and later. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function __attribute__ ((__warning__ (message))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE(function, message) \ +extern __typeof__ (function) function +# else /* Unsupported. */ +# define _GL_WARN_ON_USE(function, message) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") + is like _GL_WARN_ON_USE (function, "string"), except that the function is + declared with the given prototype, consisting of return type, parameters, + and attributes. + This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does + not work in this case. */ +#ifndef _GL_WARN_ON_USE_CXX +# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes \ + __attribute__ ((__warning__ (msg))) +# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING +/* Verify the existence of the function. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +extern rettype function parameters_and_attributes +# else /* Unsupported. */ +# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ +_GL_WARN_EXTERN_C int _gl_warn_on_use +# endif +#endif + +/* _GL_WARN_EXTERN_C declaration; + performs the declaration with C linkage. */ +#ifndef _GL_WARN_EXTERN_C +# if defined __cplusplus +# define _GL_WARN_EXTERN_C extern "C" +# else +# define _GL_WARN_EXTERN_C extern +# endif +#endif + + +/* Declare overridden functions. */ + +#if 1 +# if 1 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef fcntl +# define fcntl rpl_fcntl +# endif +_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); +_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); +# else +# if !1 +_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); +# endif +_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); +# endif +_GL_CXXALIASWARN (fcntl); +#elif defined GNULIB_POSIXCHECK +# undef fcntl +# if HAVE_RAW_DECL_FCNTL +_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " + "use gnulib module fcntl for portability"); +# endif +#endif + +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef open +# define open rpl_open +# endif +_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); +# else +_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); +# endif +/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a + default argument. _GL_CXXALIASWARN does not work in this case. */ +# if !defined __hpux +_GL_CXXALIASWARN (open); +# endif +#elif defined GNULIB_POSIXCHECK +# undef open +/* Assume open is always declared. */ +_GL_WARN_ON_USE (open, "open is not always POSIX compliant - " + "use gnulib module open for portability"); +#endif + +#if 1 +# if 0 +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef openat +# define openat rpl_openat +# endif +_GL_FUNCDECL_RPL (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_RPL (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...)); +# else +# if !1 +_GL_FUNCDECL_SYS (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...) + _GL_ARG_NONNULL ((2))); +# endif +_GL_CXXALIAS_SYS (openat, int, + (int fd, char const *file, int flags, /* mode_t mode */ ...)); +# endif +_GL_CXXALIASWARN (openat); +#elif defined GNULIB_POSIXCHECK +# undef openat +# if HAVE_RAW_DECL_OPENAT +_GL_WARN_ON_USE (openat, "openat is not portable - " + "use gnulib module openat for portability"); +# endif +#endif + + +/* Fix up the FD_* macros, only known to be missing on mingw. */ + +#ifndef FD_CLOEXEC +# define FD_CLOEXEC 1 +#endif + +/* Fix up the supported F_* macros. Intentionally leave other F_* + macros undefined. Only known to be missing on mingw. */ + +#ifndef F_DUPFD_CLOEXEC +# define F_DUPFD_CLOEXEC 0x40000000 +/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ +# define GNULIB_defined_F_DUPFD_CLOEXEC 1 +#else +# define GNULIB_defined_F_DUPFD_CLOEXEC 0 +#endif + +#ifndef F_DUPFD +# define F_DUPFD 1 +#endif + +#ifndef F_GETFD +# define F_GETFD 2 +#endif + +/* Fix up the O_* macros. */ + +#if !defined O_DIRECT && defined O_DIRECTIO +/* Tru64 spells it 'O_DIRECTIO'. */ +# define O_DIRECT O_DIRECTIO +#endif + +#if !defined O_CLOEXEC && defined O_NOINHERIT +/* Mingw spells it 'O_NOINHERIT'. */ +# define O_CLOEXEC O_NOINHERIT +#endif + +#ifndef O_CLOEXEC +# define O_CLOEXEC 0 +#endif + +#ifndef O_DIRECT +# define O_DIRECT 0 +#endif + +#ifndef O_DIRECTORY +# define O_DIRECTORY 0 +#endif + +#ifndef O_DSYNC +# define O_DSYNC 0 +#endif + +#ifndef O_EXEC +# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ +#endif + +#ifndef O_NDELAY +# define O_NDELAY 0 +#endif + +#ifndef O_NOATIME +# define O_NOATIME 0 +#endif + +#ifndef O_NONBLOCK +# define O_NONBLOCK O_NDELAY +#endif + +/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero + value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY + or to 0 as fallback. */ +#if 0 +# if O_NONBLOCK +# define GNULIB_defined_O_NONBLOCK 0 +# else +# define GNULIB_defined_O_NONBLOCK 1 +# undef O_NONBLOCK +# define O_NONBLOCK 0x40000000 +# endif +#endif + +#ifndef O_NOCTTY +# define O_NOCTTY 0 +#endif + +#ifndef O_NOFOLLOW +# define O_NOFOLLOW 0 +#endif + +#ifndef O_NOLINKS +# define O_NOLINKS 0 +#endif + +#ifndef O_RSYNC +# define O_RSYNC 0 +#endif + +#ifndef O_SEARCH +# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ +#endif + +#ifndef O_SYNC +# define O_SYNC 0 +#endif + +#ifndef O_TTY_INIT +# define O_TTY_INIT 0 +#endif + +#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) +# undef O_ACCMODE +# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) +#endif + +/* For systems that distinguish between text and binary I/O. + O_BINARY is usually declared in fcntl.h */ +#if !defined O_BINARY && defined _O_BINARY + /* For MSC-compatible compilers. */ +# define O_BINARY _O_BINARY +# define O_TEXT _O_TEXT +#endif + +#if defined __BEOS__ || defined __HAIKU__ + /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ +# undef O_BINARY +# undef O_TEXT +#endif + +#ifndef O_BINARY +# define O_BINARY 0 +# define O_TEXT 0 +#endif + +/* Fix up the AT_* macros. */ + +/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its + value exceeds INT_MAX, so its use as an int doesn't conform to the + C standard, and GCC and Sun C complain in some cases. If the bug + is present, undef AT_FDCWD here, so it can be redefined below. */ +#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 +# undef AT_FDCWD +#endif + +/* Use the same bit pattern as Solaris 9, but with the proper + signedness. The bit pattern is important, in case this actually is + Solaris with the above workaround. */ +#ifndef AT_FDCWD +# define AT_FDCWD (-3041965) +#endif + +/* Use the same values as Solaris 9. This shouldn't matter, but + there's no real reason to differ. */ +#ifndef AT_SYMLINK_NOFOLLOW +# define AT_SYMLINK_NOFOLLOW 4096 +#endif + +#ifndef AT_REMOVEDIR +# define AT_REMOVEDIR 1 +#endif + +/* Solaris 9 lacks these two, so just pick unique values. */ +#ifndef AT_SYMLINK_FOLLOW +# define AT_SYMLINK_FOLLOW 2 +#endif + +#ifndef AT_EACCESS +# define AT_EACCESS 4 +#endif + + +#endif /* _GL_FCNTL_H */ +#endif /* _GL_FCNTL_H */ +#endif diff --git a/gnu/usr.bin/grep/libgreputils/getopt.h b/gnu/usr.bin/grep/libgreputils/getopt.h index a033c121ec..24da809994 100644 --- a/gnu/usr.bin/grep/libgreputils/getopt.h +++ b/gnu/usr.bin/grep/libgreputils/getopt.h @@ -1,6 +1,6 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -83,7 +83,7 @@ getopt_long_only can permute argv; this is required for backward compatibility (e.g., for LSB 2.0.1). - This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt', + This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', but it caused redefinition warnings if both unistd.h and getopt.h were included, since unistd.h includes getopt.h having previously defined __need_getopt. @@ -139,29 +139,29 @@ extern "C" { #endif -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, +/* For communication from 'getopt' to the caller. + When 'getopt' finds an option that takes an argument, the argument value is returned here. - Also, when `ordering' is RETURN_IN_ORDER, + Also, when 'ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller - and for communication between successive calls to `getopt'. + and for communication between successive calls to 'getopt'. - On entry to `getopt', zero means this is the first call; initialize. + On entry to 'getopt', zero means this is the first call; initialize. - When `getopt' returns -1, this is the index of the first of the + When 'getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. - Otherwise, `optind' communicates from one call to the next + Otherwise, 'optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; -/* Callers store zero here to inhibit the error message `getopt' prints +/* Callers store zero here to inhibit the error message 'getopt' prints for unrecognized options. */ extern int opterr; @@ -173,24 +173,24 @@ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of `struct option' terminated by an element containing a name which is + of 'struct option' terminated by an element containing a name which is zero. - The field `has_arg' is: + The field 'has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. - If the field `flag' is not NULL, it points to a variable that is set - to the value given in the field `val' when the option is found, but + If the field 'flag' is not NULL, it points to a variable that is set + to the value given in the field 'val' when the option is found, but left unchanged if the option is not found. - To have a long-named option do something other than set an `int' to - a compiled-in constant, such as set a value from `optarg', set the - option's `flag' field to zero and its `val' field to a nonzero + To have a long-named option do something other than set an 'int' to + a compiled-in constant, such as set a value from 'optarg', set the + option's 'flag' field to zero and its 'val' field to a nonzero value (the equivalent single-letter option character, if there is - one). For long options that have a zero `flag' field, `getopt' - returns the contents of the `val' field. */ + one). For long options that have a zero 'flag' field, 'getopt' + returns the contents of the 'val' field. */ # if !GNULIB_defined_struct_option struct option @@ -205,7 +205,7 @@ struct option # define GNULIB_defined_struct_option 1 # endif -/* Names for the values of the `has_arg' field of `struct option'. */ +/* Names for the values of the 'has_arg' field of 'struct option'. */ # define no_argument 0 # define required_argument 1 @@ -219,23 +219,23 @@ struct option Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options - missing arguments, `optopt' is set to the option letter, and '?' is + missing arguments, 'optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in `optarg'. + takes an argument, to be placed in 'optarg'. If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU `getopt'. + optional. This behavior is specific to the GNU 'getopt'. - The argument `--' causes premature termination of argument - scanning, explicitly telling `getopt' that there are no more + The argument '--' causes premature termination of argument + scanning, explicitly telling 'getopt' that there are no more options. - If OPTS begins with `-', then non-option arguments are treated as + If OPTS begins with '-', then non-option arguments are treated as arguments to the option '\1'. This behavior is specific to the GNU - `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in + 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in the environment, then do not permute arguments. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) diff --git a/gnu/usr.bin/grep/libgreputils/unistr.h b/gnu/usr.bin/grep/libgreputils/unistr.h index 4b6dcf90ab..c5a051dbe4 100644 --- a/gnu/usr.bin/grep/libgreputils/unistr.h +++ b/gnu/usr.bin/grep/libgreputils/unistr.h @@ -1,8 +1,6 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Elementary Unicode string functions. - Copyright (C) 2001-2002, 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2005-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -69,17 +67,20 @@ extern "C" { /* Check whether an UTF-8 string is well-formed. Return NULL if valid, or a pointer to the first invalid unit otherwise. */ extern const uint8_t * - u8_check (const uint8_t *s, size_t n); + u8_check (const uint8_t *s, size_t n) + _UC_ATTRIBUTE_PURE; /* Check whether an UTF-16 string is well-formed. Return NULL if valid, or a pointer to the first invalid unit otherwise. */ extern const uint16_t * - u16_check (const uint16_t *s, size_t n); + u16_check (const uint16_t *s, size_t n) + _UC_ATTRIBUTE_PURE; /* Check whether an UCS-4 string is well-formed. Return NULL if valid, or a pointer to the first invalid unit otherwise. */ extern const uint32_t * - u32_check (const uint32_t *s, size_t n); + u32_check (const uint32_t *s, size_t n) + _UC_ATTRIBUTE_PURE; /* Elementary string conversions. */ @@ -122,11 +123,14 @@ extern uint16_t * failure. */ /* Similar to mblen(), except that s must not be NULL. */ extern int - u8_mblen (const uint8_t *s, size_t n); + u8_mblen (const uint8_t *s, size_t n) + _UC_ATTRIBUTE_PURE; extern int - u16_mblen (const uint16_t *s, size_t n); + u16_mblen (const uint16_t *s, size_t n) + _UC_ATTRIBUTE_PURE; extern int - u32_mblen (const uint32_t *s, size_t n); + u32_mblen (const uint32_t *s, size_t n) + _UC_ATTRIBUTE_PURE; /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. Upon failure, *PUC is set to 0xfffd, @@ -403,38 +407,50 @@ extern uint32_t * /* Compare S1 and S2, each of length N. */ /* Similar to memcmp(). */ extern int - u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n); + u8_cmp (const uint8_t *s1, const uint8_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; extern int - u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n); + u16_cmp (const uint16_t *s1, const uint16_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; extern int - u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n); + u32_cmp (const uint32_t *s1, const uint32_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; /* Compare S1 and S2. */ /* Similar to the gnulib function memcmp2(). */ extern int - u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2); + u8_cmp2 (const uint8_t *s1, size_t n1, const uint8_t *s2, size_t n2) + _UC_ATTRIBUTE_PURE; extern int - u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2); + u16_cmp2 (const uint16_t *s1, size_t n1, const uint16_t *s2, size_t n2) + _UC_ATTRIBUTE_PURE; extern int - u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2); + u32_cmp2 (const uint32_t *s1, size_t n1, const uint32_t *s2, size_t n2) + _UC_ATTRIBUTE_PURE; /* Search the string at S for UC. */ /* Similar to memchr(). */ extern uint8_t * - u8_chr (const uint8_t *s, size_t n, ucs4_t uc); + u8_chr (const uint8_t *s, size_t n, ucs4_t uc) + _UC_ATTRIBUTE_PURE; extern uint16_t * - u16_chr (const uint16_t *s, size_t n, ucs4_t uc); + u16_chr (const uint16_t *s, size_t n, ucs4_t uc) + _UC_ATTRIBUTE_PURE; extern uint32_t * - u32_chr (const uint32_t *s, size_t n, ucs4_t uc); + u32_chr (const uint32_t *s, size_t n, ucs4_t uc) + _UC_ATTRIBUTE_PURE; /* Count the number of Unicode characters in the N units from S. */ /* Similar to mbsnlen(). */ extern size_t - u8_mbsnlen (const uint8_t *s, size_t n); + u8_mbsnlen (const uint8_t *s, size_t n) + _UC_ATTRIBUTE_PURE; extern size_t - u16_mbsnlen (const uint16_t *s, size_t n); + u16_mbsnlen (const uint16_t *s, size_t n) + _UC_ATTRIBUTE_PURE; extern size_t - u32_mbsnlen (const uint32_t *s, size_t n); + u32_mbsnlen (const uint32_t *s, size_t n) + _UC_ATTRIBUTE_PURE; /* Elementary string functions with memory allocation. */ @@ -451,11 +467,14 @@ extern uint32_t * /* Return the length (number of units) of the first character in S. Return 0 if it is the NUL character. Return -1 upon failure. */ extern int - u8_strmblen (const uint8_t *s); + u8_strmblen (const uint8_t *s) + _UC_ATTRIBUTE_PURE; extern int - u16_strmblen (const uint16_t *s); + u16_strmblen (const uint16_t *s) + _UC_ATTRIBUTE_PURE; extern int - u32_strmblen (const uint32_t *s); + u32_strmblen (const uint32_t *s) + _UC_ATTRIBUTE_PURE; /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. Return 0 if it is the NUL @@ -490,20 +509,26 @@ extern const uint32_t * /* Return the number of units in S. */ /* Similar to strlen(), wcslen(). */ extern size_t - u8_strlen (const uint8_t *s); + u8_strlen (const uint8_t *s) + _UC_ATTRIBUTE_PURE; extern size_t - u16_strlen (const uint16_t *s); + u16_strlen (const uint16_t *s) + _UC_ATTRIBUTE_PURE; extern size_t - u32_strlen (const uint32_t *s); + u32_strlen (const uint32_t *s) + _UC_ATTRIBUTE_PURE; /* Return the number of units in S, but at most MAXLEN. */ /* Similar to strnlen(), wcsnlen(). */ extern size_t - u8_strnlen (const uint8_t *s, size_t maxlen); + u8_strnlen (const uint8_t *s, size_t maxlen) + _UC_ATTRIBUTE_PURE; extern size_t - u16_strnlen (const uint16_t *s, size_t maxlen); + u16_strnlen (const uint16_t *s, size_t maxlen) + _UC_ATTRIBUTE_PURE; extern size_t - u32_strnlen (const uint32_t *s, size_t maxlen); + u32_strnlen (const uint32_t *s, size_t maxlen) + _UC_ATTRIBUTE_PURE; /* Copy SRC to DEST. */ /* Similar to strcpy(), wcscpy(). */ @@ -565,16 +590,20 @@ extern uint32_t * #ifdef __sun /* Avoid a collision with the u8_strcmp() function in Solaris 11 libc. */ extern int - u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2); + u8_strcmp_gnu (const uint8_t *s1, const uint8_t *s2) + _UC_ATTRIBUTE_PURE; # define u8_strcmp u8_strcmp_gnu #else extern int - u8_strcmp (const uint8_t *s1, const uint8_t *s2); + u8_strcmp (const uint8_t *s1, const uint8_t *s2) + _UC_ATTRIBUTE_PURE; #endif extern int - u16_strcmp (const uint16_t *s1, const uint16_t *s2); + u16_strcmp (const uint16_t *s1, const uint16_t *s2) + _UC_ATTRIBUTE_PURE; extern int - u32_strcmp (const uint32_t *s1, const uint32_t *s2); + u32_strcmp (const uint32_t *s1, const uint32_t *s2) + _UC_ATTRIBUTE_PURE; /* Compare S1 and S2 using the collation rules of the current locale. Return -1 if S1 < S2, 0 if S1 = S2, 1 if S1 > S2. @@ -590,11 +619,14 @@ extern int /* Compare no more than N units of S1 and S2. */ /* Similar to strncmp(), wcsncmp(). */ extern int - u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n); + u8_strncmp (const uint8_t *s1, const uint8_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; extern int - u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n); + u16_strncmp (const uint16_t *s1, const uint16_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; extern int - u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n); + u32_strncmp (const uint32_t *s1, const uint32_t *s2, size_t n) + _UC_ATTRIBUTE_PURE; /* Duplicate S, returning an identical malloc'd string. */ /* Similar to strdup(), wcsdup(). */ @@ -608,74 +640,98 @@ extern uint32_t * /* Find the first occurrence of UC in STR. */ /* Similar to strchr(), wcschr(). */ extern uint8_t * - u8_strchr (const uint8_t *str, ucs4_t uc); + u8_strchr (const uint8_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; extern uint16_t * - u16_strchr (const uint16_t *str, ucs4_t uc); + u16_strchr (const uint16_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; extern uint32_t * - u32_strchr (const uint32_t *str, ucs4_t uc); + u32_strchr (const uint32_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; /* Find the last occurrence of UC in STR. */ /* Similar to strrchr(), wcsrchr(). */ extern uint8_t * - u8_strrchr (const uint8_t *str, ucs4_t uc); + u8_strrchr (const uint8_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; extern uint16_t * - u16_strrchr (const uint16_t *str, ucs4_t uc); + u16_strrchr (const uint16_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; extern uint32_t * - u32_strrchr (const uint32_t *str, ucs4_t uc); + u32_strrchr (const uint32_t *str, ucs4_t uc) + _UC_ATTRIBUTE_PURE; /* Return the length of the initial segment of STR which consists entirely of Unicode characters not in REJECT. */ /* Similar to strcspn(), wcscspn(). */ extern size_t - u8_strcspn (const uint8_t *str, const uint8_t *reject); + u8_strcspn (const uint8_t *str, const uint8_t *reject) + _UC_ATTRIBUTE_PURE; extern size_t - u16_strcspn (const uint16_t *str, const uint16_t *reject); + u16_strcspn (const uint16_t *str, const uint16_t *reject) + _UC_ATTRIBUTE_PURE; extern size_t - u32_strcspn (const uint32_t *str, const uint32_t *reject); + u32_strcspn (const uint32_t *str, const uint32_t *reject) + _UC_ATTRIBUTE_PURE; /* Return the length of the initial segment of STR which consists entirely of Unicode characters in ACCEPT. */ /* Similar to strspn(), wcsspn(). */ extern size_t - u8_strspn (const uint8_t *str, const uint8_t *accept); + u8_strspn (const uint8_t *str, const uint8_t *accept) + _UC_ATTRIBUTE_PURE; extern size_t - u16_strspn (const uint16_t *str, const uint16_t *accept); + u16_strspn (const uint16_t *str, const uint16_t *accept) + _UC_ATTRIBUTE_PURE; extern size_t - u32_strspn (const uint32_t *str, const uint32_t *accept); + u32_strspn (const uint32_t *str, const uint32_t *accept) + _UC_ATTRIBUTE_PURE; /* Find the first occurrence in STR of any character in ACCEPT. */ /* Similar to strpbrk(), wcspbrk(). */ extern uint8_t * - u8_strpbrk (const uint8_t *str, const uint8_t *accept); + u8_strpbrk (const uint8_t *str, const uint8_t *accept) + _UC_ATTRIBUTE_PURE; extern uint16_t * - u16_strpbrk (const uint16_t *str, const uint16_t *accept); + u16_strpbrk (const uint16_t *str, const uint16_t *accept) + _UC_ATTRIBUTE_PURE; extern uint32_t * - u32_strpbrk (const uint32_t *str, const uint32_t *accept); + u32_strpbrk (const uint32_t *str, const uint32_t *accept) + _UC_ATTRIBUTE_PURE; /* Find the first occurrence of NEEDLE in HAYSTACK. */ /* Similar to strstr(), wcsstr(). */ extern uint8_t * - u8_strstr (const uint8_t *haystack, const uint8_t *needle); + u8_strstr (const uint8_t *haystack, const uint8_t *needle) + _UC_ATTRIBUTE_PURE; extern uint16_t * - u16_strstr (const uint16_t *haystack, const uint16_t *needle); + u16_strstr (const uint16_t *haystack, const uint16_t *needle) + _UC_ATTRIBUTE_PURE; extern uint32_t * - u32_strstr (const uint32_t *haystack, const uint32_t *needle); + u32_strstr (const uint32_t *haystack, const uint32_t *needle) + _UC_ATTRIBUTE_PURE; /* Test whether STR starts with PREFIX. */ extern bool - u8_startswith (const uint8_t *str, const uint8_t *prefix); + u8_startswith (const uint8_t *str, const uint8_t *prefix) + _UC_ATTRIBUTE_PURE; extern bool - u16_startswith (const uint16_t *str, const uint16_t *prefix); + u16_startswith (const uint16_t *str, const uint16_t *prefix) + _UC_ATTRIBUTE_PURE; extern bool - u32_startswith (const uint32_t *str, const uint32_t *prefix); + u32_startswith (const uint32_t *str, const uint32_t *prefix) + _UC_ATTRIBUTE_PURE; /* Test whether STR ends with SUFFIX. */ extern bool - u8_endswith (const uint8_t *str, const uint8_t *suffix); + u8_endswith (const uint8_t *str, const uint8_t *suffix) + _UC_ATTRIBUTE_PURE; extern bool - u16_endswith (const uint16_t *str, const uint16_t *suffix); + u16_endswith (const uint16_t *str, const uint16_t *suffix) + _UC_ATTRIBUTE_PURE; extern bool - u32_endswith (const uint32_t *str, const uint32_t *suffix); + u32_endswith (const uint32_t *str, const uint32_t *suffix) + _UC_ATTRIBUTE_PURE; /* Divide STR into tokens separated by characters in DELIM. This interface is actually more similar to wcstok than to strtok. */ diff --git a/gnu/usr.bin/grep/libgreputils/unitypes.h b/gnu/usr.bin/grep/libgreputils/unitypes.h index 37d3b75f3c..b85b07ae8a 100644 --- a/gnu/usr.bin/grep/libgreputils/unitypes.h +++ b/gnu/usr.bin/grep/libgreputils/unitypes.h @@ -1,8 +1,6 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* Elementary types for the GNU UniString library. - Copyright (C) 2002, 2005-2006, 2009-2011 Free Software Foundation, Inc. +/* Elementary types and macros for the GNU UniString library. + Copyright (C) 2002, 2005-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -26,4 +24,24 @@ /* Type representing a Unicode character. */ typedef uint32_t ucs4_t; +/* Attribute of a function whose result depends only on the arguments + (not pointers!) and which has no side effects. */ +#ifndef _UC_ATTRIBUTE_CONST +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) +# define _UC_ATTRIBUTE_CONST __attribute__ ((__const__)) +# else +# define _UC_ATTRIBUTE_CONST +# endif +#endif + +/* Attribute of a function whose result depends only on the arguments + (possibly pointers) and global memory, and which has no side effects. */ +#ifndef _UC_ATTRIBUTE_PURE +# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) +# define _UC_ATTRIBUTE_PURE __attribute__ ((__pure__)) +# else +# define _UC_ATTRIBUTE_PURE +# endif +#endif + #endif /* _UNITYPES_H */ diff --git a/gnu/usr.bin/grep/libgreputils/uniwidth.h b/gnu/usr.bin/grep/libgreputils/uniwidth.h index 71c652e91e..c6466b2777 100644 --- a/gnu/usr.bin/grep/libgreputils/uniwidth.h +++ b/gnu/usr.bin/grep/libgreputils/uniwidth.h @@ -1,8 +1,6 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ -/* -*- buffer-read-only: t -*- vi: set ro: */ -/* DO NOT EDIT! GENERATED AUTOMATICALLY! */ /* Display width functions. - Copyright (C) 2001-2002, 2005, 2007, 2009-2011 Free Software Foundation, + Copyright (C) 2001-2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it @@ -41,24 +39,31 @@ extern "C" { /* Determine number of column positions required for UC. */ extern int - uc_width (ucs4_t uc, const char *encoding); + uc_width (ucs4_t uc, const char *encoding) + _UC_ATTRIBUTE_PURE; /* Determine number of column positions required for first N units (or fewer if S ends before this) in S. */ extern int - u8_width (const uint8_t *s, size_t n, const char *encoding); + u8_width (const uint8_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; extern int - u16_width (const uint16_t *s, size_t n, const char *encoding); + u16_width (const uint16_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; extern int - u32_width (const uint32_t *s, size_t n, const char *encoding); + u32_width (const uint32_t *s, size_t n, const char *encoding) + _UC_ATTRIBUTE_PURE; /* Determine number of column positions required for S. */ extern int - u8_strwidth (const uint8_t *s, const char *encoding); + u8_strwidth (const uint8_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; extern int - u16_strwidth (const uint16_t *s, const char *encoding); + u16_strwidth (const uint16_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; extern int - u32_strwidth (const uint32_t *s, const char *encoding); + u32_strwidth (const uint32_t *s, const char *encoding) + _UC_ATTRIBUTE_PURE; #ifdef __cplusplus -- 2.41.0